Overview
This endpoint returns the current status of an async chat request. Use it to poll until the answer is ready. The endpoint is read-only and safe to call frequently. Typical completion time is 5-30 seconds; most requests complete within the first 10 seconds.Authentication
Requires API key in theX-API-Key header:
Path parameters
string
required
The site ID.
string
required
The request ID from the async chat submission response.
Request example
Response schema
string
The session identifier for this conversation.
string
The request ID.
string
One of:
pending, completed, failed.pending: The request is still processing.completed: The answer is ready (seeanswerfield).failed: The request failed (seeerrorfield).
string
The assistant’s response. Only present when
status is completed.string
Error description if the request failed. Only present when
status is failed.Examples: "failed to call rag service", "site not found".Response examples
Pending
Completed
Failed
Error responses
400 Bad Request
Invalid path parameters (e.g., malformed request ID).401 Unauthorized
API key is missing, invalid, expired, or revoked.403 Forbidden
The API key’s plan does not include M2M API access.404 Not Found
The site or request does not exist.- Wrong site ID
- Wrong request ID
- Request has expired or been deleted
- Request belongs to a different site
500 Internal Server Error
An unexpected error occurred.Implementation tips
Polling loop pattern
Optimal polling interval
- First poll: Wait 1-2 seconds (processing takes time)
- Subsequent polls: 1-2 second intervals
- Max attempts: 120-300 (2-5 minutes)
Handling partial failures
If the status endpoint returns 5xx errors, implement exponential backoff:Tracking in a database
Store the request ID and check status later:Related endpoints
- M2M Chat (Async) — Submit a request
- M2M Chat (Sync) — Immediate answer
- M2M Chat Feedback — Rate the answer