Dispatch a job
Creates a job and starts an agent working on it immediately. Returns as soon as the work is queued — the returned job reads `backlog` with a placeholder title, both of which change within moments. Watch it finish on `GET /v1/events` (`job.state_changed`), or poll `GET /v1/jobs/{job_id}`. Terminal states are `done`, `failed`, and `ambiguous` — the last meaning the agent needs something from you, which you answer by posting to the job's `primary_session_id`.
Creates a job and starts an agent working on it immediately. Returns as soon as the work is
queued — the returned job reads backlog with a placeholder title, both of which change within
moments.
Watch it finish on GET /v1/events (job.state_changed), or poll GET /v1/jobs/{job_id}.
Terminal states are done, failed, and ambiguous — the last meaning the agent needs
something from you, which you answer by posting to the job's primary_session_id.
Authorization
api_key jobs:writeAn atk_-prefixed API key, created under Settings → API keys.
In: header
Scope: jobs:write
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/jobs" \ -H "Content-Type: application/json" \ -d '{ "message": "string" }'{ "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "created_at": "2019-08-24T14:15:22Z", "description": "string", "failure_reason": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "last_activity": "string", "planning": true, "primary_session_id": "5fb6eee6-42c6-4a4c-8ea0-dd0a7a8d08e5", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "state": "string", "title": "string", "updated_at": "2019-08-24T14:15:22Z"}