Errors come back as JSON with a single error message:
{ "error": "Invalid pageSize (1-100)" }
The message is meant for developers and may change. Branch on the HTTP status, not the message text.
Status codes
| Status | Meaning | What to do |
|---|---|---|
200 |
Success. | |
400 |
The request is invalid: a missing field, a bad value, or a body that isn’t JSON. | Fix the request. The message says which field. |
401 |
Missing or invalid API key. | See Authentication. |
404 |
The team, group, member, or document doesn’t exist, or your key can’t reach it. | Check the ID and that it’s inside your team. |
422 |
The request is valid, but the member can’t be used for it (for example, SSO for a member with no email). | See the endpoint’s docs. |
500 |
Something went wrong on our side. | Retry with backoff. If it keeps happening, contact us. |
502 |
An upstream step failed (for example, knowledge search). | Safe to retry. |
Retries
GET requests and knowledge search are safe to retry. Adding a member is also safe to retry: adding someone who is already on the team leaves them as they are. Removing a member that was already removed returns 404.