Developers
Errors
Every error has one shape, a stable code to act on and a message to show or log.
The shape
{
"error": {
"code": "not_found",
"message": "Not found"
}
}Act on code, never on the wording of message, which may change. Answers carry no stack traces and no ids you did not already have.
Codes
| Code | Status | What it means and what to do |
|---|---|---|
bad_request | 400 | A parameter or body that cannot be read: the message says which. Fix the request; retrying it unchanged will not help. |
token_in_url | 400 | A token in the address or the body. Send it only in the Authorization header, and replace the token: it may be in a log. |
invalid_token | 401 | Missing, wrong, revoked or expired token, a deactivated person, or a phone app sign-in. Make a new token on the profile. |
forbidden | 403 | The person's role lacks the permission this needs (data.read, data.enter or tasks.assign). |
access_off | 403 | The group has switched apps and AI tools off. A group administrator can switch it on in Settings. |
read_only_token | 403 | A write with a read-only token. Make a token that can also record values and create tasks. |
not_found | 404 | It does not exist, or it is outside the properties the token's person can see: the two are not told apart. |
method_not_allowed | 405 | That method is not offered on that path. OPTIONS always answers this: the API sends no CORS headers. |
too_large | 413 | The body is over the cap: 1 MB of JSON, 25 MB for an evidence file. Send fewer items in a batch. |
rate_limited | 429 | Over the token's calls for this minute. Wait the seconds in Retry-After, then carry on. |
server_error | 500 | Something went wrong in Canoprise; the answer carries no detail. Retry later; a write sent with the same idempotency key cannot be saved twice. |
Errors inside a batch
A well-formed batch to POST /data-points answers 200 even when some items are refused: each item has its own outcome (SAVED, HELD, DUPLICATE or REJECTED, with a message). Check every item, not only the status.