> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/agents/contacts/{contact_id}/agents/{agent_id}/run

> Ask an AI agent to plan for a contact now, with an optional note.

Asks an agent to plan for a contact now, as **Run now** does on the panel — whatever its settings say about when to plan. Anything it had planned for them and not yet done is replaced by the new plan. The plan follows the agent's approvals: when it needs one, it waits in [plans](/api-reference/ai-agents/list-plans) and `agent.plan_proposed` is sent.

<Note>Needs the `agents.contacts:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `contact_id` | string | Yes | The contact's id. |
| `agent_id` | integer | Yes | The id of the agent working them. |

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `note` | string | No | What you want it to do, for it to read while planning. Up to 500 characters. |

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.fireflo.au/v1/agents/contacts/3f6b2a1e-8c4d-4e2a-9b7f-5d1c0e8a9f42/agents/12/run" \
    -H "Authorization: Bearer $OMNI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "note": "Order A-1042 was delivered today — check he received it and ask for a review."
    }'
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.post(
      "https://api.fireflo.au/v1/agents/contacts/3f6b2a1e-8c4d-4e2a-9b7f-5d1c0e8a9f42/agents/12/run",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      json={
          "note": "Order A-1042 was delivered today — check he received it and ask for a review."
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/agents/contacts/3f6b2a1e-8c4d-4e2a-9b7f-5d1c0e8a9f42/agents/12/run", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "note": "Order A-1042 was delivered today — check he received it and ask for a review."
    }),
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK` — the agents working the contact. `contact` is the contact, and `data` the agents working them that haven't been released. For each: the `agent`; `status` — `active` (working) or `paused`; `since` when; the `deal` it works (its title and `deal_id`), if any; `paused_reason` and `resume_at` while paused; `needs_attention` when it handed over to the team; the `channels` it can answer on; and `workflow` — where the conversation is in its workflow (the version, the block, and what it is waiting for), or null.

```json theme={null}
{
  "contact": {
    "id": "3f6b2a1e-8c4d-4e2a-9b7f-5d1c0e8a9f42",
    "name": "Ravi Kumar",
    "phone": "+919876500101"
  },
  "data": [
    {
      "resume_at": null,
      "paused_by": null,
      "workflow": {
        "version": 3,
        "status": "waiting",
        "block": "Wait for reply",
        "waiting_for": "reply",
        "wake_at": "2026-10-06T11:05:00+05:30"
      },
      "agent": {
        "id": 12,
        "name": "Priya",
        "role": "support"
      },
      "status": "active",
      "since": "2026-10-06T10:35:48+05:30",
      "deal": null,
      "deal_id": null,
      "needs_attention": false,
      "paused_reason": null,
      "channels": [
        "whatsapp",
        "sms"
      ]
    },
    {
      "resume_at": null,
      "paused_by": null,
      "workflow": null,
      "agent": {
        "id": 7,
        "name": "Arjun",
        "role": "sales"
      },
      "status": "active",
      "since": "2026-09-30T16:02:11+05:30",
      "deal": "Kumar Electricals — AMC renewal",
      "deal_id": 3402,
      "needs_attention": false,
      "paused_reason": null,
      "channels": [
        "whatsapp",
        "sms"
      ]
    }
  ]
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 400 | `invalid_request` | No contact of this account's has that id (`field` is `contact`). |
| 404 | `not_found` | That agent isn't working this contact. |
| 409 | `invalid_state` | The agent is paused for this contact (resume it first), or can't plan right now — it isn't live, or the account's agents are paused. |
| 404 | `module_off` | The account doesn't have AI agents on: they aren't in its plan, or are switched off for it. |
| 403 | `scope_missing` | The key doesn't have the `agents.contacts:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.