Execute a published agent asynchronously
POSThttps://platform.docana.com/api/v1/agents/:agentId/execute/
Validates the request, schedules a background run of the published agent version and returns immediately. Body: { prompt: string, threadId?: string, context?: object }. Supports the Idempotency-Key header: a retry with the same key and body replays the stored ack instead of running the agent a second time.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 500
The run was scheduled
Missing prompt or agent without application
The API key or session is missing, expired, or malformed.
No access to the application or thread
Agent or thread not found
Agent not published, or Idempotency-Key conflict/in-progress
Unexpected server error.