Base URL
All API requests are made to the following base URL:Content type
All request bodies must be sent as JSON. Set theContent-Type header on every POST and DELETE request:
error field describing what went wrong.
Authentication
The Knoq API authenticates requests using session cookies issued when you sign in to Knoq. There is no standalone API key system — every request must carry a valid session cookie alongside the correctOrigin header to pass CSRF checks on mutating routes.
For full details on obtaining a session, constructing authenticated requests, and handling 401/403 responses, see the Authentication guide.
Rate limits
Knoq enforces per-user rate limits to protect platform stability. Requests that exceed a limit receive a429 Too Many Requests response. The Retry-After header on that response tells you how many seconds to wait before retrying.
| Limit | Threshold |
|---|---|
| Messages sent | 60 per minute, per user |
| Sessions created | 10 per minute, per user |
Error codes
The API uses standard HTTP status codes. When a request fails, the response body contains anerror field with a human-readable description.
| Status code | Meaning |
|---|---|
400 | Bad request — A required parameter is missing, empty, or invalid. Check the error field for details on which field failed validation. |
401 | Not authenticated — Your session cookie is missing or has expired. Re-authenticate and retry. |
403 | Forbidden — Your plan does not include the feature you are trying to use, or the request failed a CSRF origin check. |
404 | Not found — The session or resource you referenced does not exist, or it belongs to a different user or organisation. |
429 | Rate limit exceeded — You have sent too many requests in the current window, or your organisation has reached its monthly query limit. Check the Retry-After header and wait before retrying. |
502 | Upstream error — The AI provider returned an error or was unreachable. Retry with backoff. |
503 | Service unavailable — Knoq is temporarily unable to handle the request. Retry with backoff. |
Available endpoints
Sessions
Create, list, and delete AI agent sessions. A session represents a
persistent conversation thread.
Messaging
Send follow-up messages to an active session and retrieve the full
transcript of a conversation.
SCIM
Provision and deprovision users and groups in Knoq from your identity
provider using the SCIM 2.0 protocol.