v1

latestOpenAPI 3.1.02026-07-265814.5 KB
Jobs

Trigger Agent Job with Message

Triggers an agent job and appends an additional user message to the saved chat template before running the agent loop. Use this to wire webhooks into agent tasks.

This endpoint only supports agent jobs (jobs with a backing chat). Flow-backed jobs return 400 — use GET /job/{runchat_job_id} for those.

If message is provided, it is appended verbatim. Otherwise the entire request body is JSON-stringified and appended as the user message — useful for raw webhook payloads where the caller doesn't control the body shape. An empty body runs the saved template as-is.

The history row written to runchat_job_history is identical in shape to scheduled (GET) runs.

post/job/{runchat_job_id}

Request body

messagestring

User message to append to the saved chat template before running the agent loop.

Response

Successful agent execution.

metadatastring json

Stringified JSON containing the agent run metadata (token counts, credits, etc.).

messagesobject[]

Final transcript including the saved template, any appended user message, and the agent's responses.

job_idstring

The job identifier.

runchat_idstring

The underlying Runchat identifier.

status'success' | 'error'

Outcome of the agent run.

errorstring

Error message, present only when status is error.