POST
/tasks Create task
Queue a task for an agent (origin=api). Requires `tasks:write`.
Authenticate with
Authorization: Bearer obk_live_xxx. See authentication. Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Workspace-Id | header | string | required | The workspace to scope the request to. Can also be passed as a `workspace_id` query parameter. |
Request body
Send as JSON in the request body.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | required | |
title | string | required | |
summary | string | optional | |
assigned_agent_id | string | optional | |
inputs | object | optional | |
priority_score | integer | optional |
Responses
200 Created
| Field | Type | Description |
|---|---|---|
task | Task |
422 Invalid request parameters
Example request
curl --request POST \
--url https://app.orchly.ai/api/v1/tasks \
--header 'Authorization: Bearer obk_live_xxx' \
--header 'X-Workspace-Id: ws_xxx' \
--header 'Content-Type: application/json' \
--data '{ "type": "...", "title": "..." }'const res = await fetch(`https://app.orchly.ai/api/v1/tasks`, {
method: 'POST',
headers: {
'Authorization': 'Bearer obk_live_xxx',
'X-Workspace-Id': 'ws_xxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type":"...","title":"..."}),
});
const data = await res.json();import requests
resp = requests.post(
"https://app.orchly.ai/api/v1/tasks",
headers={
"Authorization": "Bearer obk_live_xxx",
"X-Workspace-Id": "ws_xxx",
},
json={"type":"...","title":"..."},
)
data = resp.json() Example response
A 200 response. Dynamic fields are shown as their type.
{
"task": {
"id": "string",
"type": "string",
"title": "string",
"summary": "string",
"status": "string",
"priority_score": 0,
"origin": "string",
"assigned_agent_id": "string",
"current_thread_id": "string",
"scheduled_for": "string",
"created_at": "string"
}
}