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

CodeStatusWhat it means and what to do
bad_request400A parameter or body that cannot be read: the message says which. Fix the request; retrying it unchanged will not help.
token_in_url400A 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_token401Missing, wrong, revoked or expired token, a deactivated person, or a phone app sign-in. Make a new token on the profile.
forbidden403The person's role lacks the permission this needs (data.read, data.enter or tasks.assign).
access_off403The group has switched apps and AI tools off. A group administrator can switch it on in Settings.
read_only_token403A write with a read-only token. Make a token that can also record values and create tasks.
not_found404It does not exist, or it is outside the properties the token's person can see: the two are not told apart.
method_not_allowed405That method is not offered on that path. OPTIONS always answers this: the API sends no CORS headers.
too_large413The body is over the cap: 1 MB of JSON, 25 MB for an evidence file. Send fewer items in a batch.
rate_limited429Over the token's calls for this minute. Wait the seconds in Retry-After, then carry on.
server_error500Something 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.