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

# Run AI employee

> Runs the assigned AI employee (or an explicit one)

<Info>
  **Endpoint** · `POST /conversation/actions`
</Info>

Runs an AI employee. `ai_employee` is optional — without it, it uses the one
assigned to the conversation. `instructions` is optional.

**Fields**

* `ai_employee` — `{ name }` of the AI employee (optional; without it, uses the one assigned to the conversation).
* `instructions` — free text (optional).

```jsonc theme={null}
{
  "type": "run_ai",
  "ai_employee": { "name": "Agente Ventas" },
  "instructions": "Offer a 10% discount and confirm the delivery time"
}
```

```jsonc theme={null}
// no ai_employee: runs the one assigned to the conversation
{
  "type": "run_ai"
}
```

In a list, this object goes in the `actions` array of a `POST /conversation/actions` — see [Assembling an action list](/en/action-groups/overview#assembling-an-action-list).

## Executable example

A `run_ai` on a conversation identified by phone and channel. With `ai_employee`
it runs an explicit employee; without it, it runs the AI employee assigned to the
conversation. `instructions` is optional.

### Request

<CodeGroup>
  ```bash Explicit employee theme={null}
  curl -X POST "https://app.1to1.ai/api/v1/public/{slug}/conversation/actions" \
    -H "Authorization: Bearer sk_1to1_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "conversation": {
        "phone": "+5215512345678",
        "channel": "ch_7A9K2M4Q"
      },
      "actions": [
        {
          "type": "run_ai",
          "ai_employee": { "name": "Agente Ventas" },
          "instructions": "Offer a 10% discount and confirm the delivery time"
        }
      ]
    }'
  ```

  ```bash Assigned employee theme={null}
  curl -X POST "https://app.1to1.ai/api/v1/public/{slug}/conversation/actions" \
    -H "Authorization: Bearer sk_1to1_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "conversation": {
        "phone": "+5215512345678",
        "channel": "ch_7A9K2M4Q"
      },
      "actions": [
        {
          "type": "run_ai"
        }
      ]
    }'
  ```
</CodeGroup>

### Response

`202 Accepted` — the group was accepted and runs in the **background**. The
per-action result does not travel in the response (query it later — see [How it runs](/en/action-groups/overview#how-it-runs)).

```json theme={null}
{
  "status": "processing",
  "actions_accepted": 1
}
```

<ResponseField name="status" type="string">
  Always `processing`: confirms the group was accepted and is running.
</ResponseField>

<ResponseField name="actions_accepted" type="integer">
  How many actions in the array were **admitted** for execution — not how many
  succeeded.
</ResponseField>
