Enqueue message for async processing (Beta)
POST/v1/desks/:desk_id/sessions/:session_id/enqueue
Beta: This endpoint is in beta and may change without notice.
Enqueue a message for asynchronous processing. Unlike the synchronous /message endpoint, this returns immediately (202 Accepted) after the message is queued. The response will be delivered via the configured channel callback.
Benefits:
- Lower latency for the caller (no waiting for AI response)
- Better handling of slow or long-running responses
- Automatic retries on failure
Permissions -
desks.readandsessions.write. API keys -manage,use.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
- 500
Message successfully enqueued for processing
BadRequest
Response Headers
Unique identifier for the API request, useful for debugging and tracking.
abc123xyz789Unauthorized
Response Headers
Unique identifier for the API request, useful for debugging and tracking.
abc123xyz789Forbidden – missing desks.read or sessions.write
The specified resource was not found
Response Headers
Unique identifier for the API request, useful for debugging and tracking.
abc123xyz789An external runtime owns the session's turns (external_runtime_active). Send the message after the leg ends.
Internal Server Error
Response Headers
Unique identifier for the API request, useful for debugging and tracking.
abc123xyz789