---
title: "Install an action"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install an action

Path: CloudRaker Workspace API › Installed Actions

`POST /actions`

Installs a catalog entry for this organization, saving its install-time `config`. The install gets a unique per-organization `slug` derived from its name. Authorization: organization administrators only (denied → 403). Returns 400 for an unknown `action` or a slug collision.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

_Required._

- `action` (`installAction.action`; string, required) — Catalog entry to install (`action` or `slug` from `GET /actions/catalog`).
  - minLength 1; example `"extract-structured"`
- `name` (`installAction.name`; string, required)
  - minLength 1; maxLength 200; example `"Contract terms"`
- `config` (`installAction.config`; map<unknown>, optional) — Install-time configuration; shape per the manifest `config.install` schema.

## Example request

```json
{
  "action": "extract-structured",
  "name": "Contract terms",
  "config": {
    "property1": null,
    "property2": null
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/actions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "extract-structured",
  "name": "Contract terms",
  "config": {
    "property1": null,
    "property2": null
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/actions';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    action: 'extract-structured',
    name: 'Contract terms',
    config: {property1: null, property2: null}
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/actions"

payload = {
    "action": "extract-structured",
    "name": "Contract terms",
    "config": {
        "property1": None,
        "property2": None
    }
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

The installed action.

#### Example

```json
{
  "data": {
    "id": "act_01J…",
    "slug": "contract-terms-extraction",
    "action": "string",
    "name": "Contract terms",
    "config": {
      "property1": null,
      "property2": null
    },
    "revision": 1,
    "created_at": "string",
    "updated_at": "string"
  }
}
```

- `data` (`installAction.response.201.data`; object, required)
  - `id` (`installAction.response.201.data.id`; string, required)
    - example `"act_01J…"`
  - `slug` (`installAction.response.201.data.slug`; string, required) — Per-organization slug; interchangeable with `id` wherever an action is named.
    - example `"contract-terms-extraction"`
  - `action` (`installAction.response.201.data.action`; string, required) — Catalog entry this install came from.
  - `name` (`installAction.response.201.data.name`; string, required)
    - example `"Contract terms"`
  - `config` (`installAction.response.201.data.config`; any of, required)
    - any of: `map<unknown>`, `null`
  - `revision` (`installAction.response.201.data.revision`; integer, required) — The number of the saved config. It starts at 1, and each save that changes `config` adds one. Runs record the revision they used.
    - min 1; max 9007199254740991
  - `created_at` (`installAction.response.201.data.created_at`; string | null, required)
  - `updated_at` (`installAction.response.201.data.updated_at`; string | null, required)


Source: https://docs.cloudraker.com/workspace/api/installed-actions/install-action/index.md
