Skip to main content

Envelope

Every non-2xx response, except on /oauth/*, has the same shape:
code is stable and machine-readable. Branch your handling on it, not on message, which is for humans and can change wording. request_id is also sent as the X-Request-Id header — include it if you contact [email protected] about a specific failed call.

OAuth errors

POST /oauth/token and POST /oauth/revoke answer the way OAuth client libraries expect (RFC 6749 §5.2), with no ok and no nested error object:
error is the standard OAuth code where one applies (invalid_request, invalid_client, invalid_grant, unsupported_grant_type) and the API’s own code otherwise (rate_limited, internal_error and the other generic ones in the table below). The HTTP status is the one the table gives for that code. error_description is for humans. Treat an error you don’t know as a failure. Every other endpoint keeps the envelope above.

Forward compatibility

The API is additive-only within /v1 (see Versioning). New error codes can be added over time. Treat an unknown code as a generic failure, not a crash: a code is never removed or renamed within /v1.

Every code

token_expired is reserved for if and when refresh tokens are added — bot tokens don’t currently expire, so you won’t see it.