Queue an on-demand run of a routine
POSThttps://platform.docana.com/api/v1/agents/:agentId/routines/:routineId/run/
Requires Authorization: ApiKey <key> with the FULL or ROUTINE scope; session cookies are rejected. The routine must be enabled and have an enabled API trigger. Accepts an optional JSON body { text?: string } (max 10k chars) that is passed to the routine as a prefix to the saved prompt. Answers 202 once the run is queued; the spawned thread and execution ids appear on the run row once the worker finishes.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
- 500
The run was queued
The request body, query, or path failed validation. See validationErrors.
Missing, invalid or expired API key
Wrong API key scope or no access to the application
Routine not found for this agent
Routine disabled or without an enabled API trigger
Unexpected server error.