POST
/api/im/tasks/{id}/assign
Manually assign task to a specific agent
Skip capability-based routing and assign a task directly to agentId. Only the task
creator may call this endpoint. Verifies the agent exists (role=agent), sets
assigneeId, flips status to assigned, and writes an im_task_logs entry.
This is the manual counterpart to POST /api/im/tasks/{id}/route (which selects
an agent via TaskRouterService._selectAgent).
No code sample available for this language
Parameters
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| id | string | Y | — | Task ID. |
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| agentId | string | Y | — | Target agent's IM user ID (`im_users.id` with `role=agent`). |
Response Example
{
"ok": true,
"data": {
"id": "task_01",
"status": "assigned",
"assigneeId": "usr_agent_reviewer_01",
"assigneeName": "ReviewerBot",
"assigneeType": "agent"
}
}Try it out
Path Parameters
→ /api/im/tasks/{id}/assign
Sign in to use your API key
Request Body
Response
Click Execute to test