Errors and limits
How a refusal looks
Over REST, a refusal is a non-2xx status with a code and a plain-English message:
HTTP/1.1 400 Bad Request
{ "error": { "code": "VALIDATION", "message": "A title is required." } }
Over MCP, a refused tool call is a result with isError true and the same code and message in
structuredContent.error. Branch on the code; show the message to a person, since it
says what to change.
Codes
| Code | Status | Meaning, and what to do |
|---|---|---|
VALIDATION | 400 | The input is not right; the message says what. Fix it and send again. Also the answer to a request that is not a POST (405). |
JOB_NOT_FOUND | 400 | No Job with that id that this person can see. |
INVALID_KEY | 401 | No credential, or one that is not valid any more: revoked, expired, its person switched off. The answer carries WWW-Authenticate with where to sign in. |
TENANT_SUSPENDED, TENANT_READ_ONLY | 402 | TENANT_SUSPENDED: the account is suspended; ask the owner. TENANT_READ_ONLY: the account can read but not change right now, which is also the answer during NexaTrack maintenance; reads still work, so send the change again later. |
FORBIDDEN | 403 | The person's role, the credential's scope or its Businesses do not allow it; or the owner has switched off sending by AI for an outward operation. The message says which. |
FEATURE_DISABLED | 403 | That part of NexaTrack is switched off for this account (Estimates, Change Orders and Invoices answer this when the account does not have them). Tell the person; sending again will not help. |
NOT_FOUND | 404 | No such record that this person can see, or no such operation. |
CONFLICT | 409 | The idempotency key was already used for a different call (use a new key for a new action), someone else decided first, or the name (a template, tag, tag group or photo tag) is already used in that Business. |
SHIFT_OVERLAP, CRM_ID_TAKEN, CLIENT_UPDATE_DONE | 409 | The change clashes with what is already there: a Shift that overlaps another, a CRM id another client holds, a Client Update already sent. |
ENTRY_ALREADY_APPROVED, TAG_NOT_IN_ENTITY | 422 | The record is in a state that does not allow it: an approved Shift, a tag from another Business. |
DEPENDENCY_CYCLE, DEPENDENCY_CROSS_JOB | 422 | A Predecessor would make the schedule depend on itself, or names a Schedule Item on another Job. Pick a different Predecessor. |
RATE_LIMITED | 429 | Too many requests this minute. Wait the Retry-After seconds, then send again. |
QUOTA_EXCEEDED | 429 | The account has used its monthly allowance. |
INTERNAL | 500 | Our fault, and we are told. Send the same call again later, with the same idempotency key. |
An operation can return a code not listed here when a rule of NexaTrack's refuses it; the message always says why. Treat any 4xx as "do not send this again unchanged" and any 5xx as "send it again later".
An outward or sensitive operation that has to wait for a person is not an error: it answers 200 with
status: "waiting_for_approval" (Concepts).
Real refusals
Captured from the API on our staging system:
POST /v1/list_jobs, no Authorization header
401 { "error": { "code": "INVALID_KEY", "message": "Send a NexaTrack API key, or an AI connection's token: Authorization: Bearer ..." } }
WWW-Authenticate: Bearer resource_metadata="https://nexatrack.cc/api/.well-known/oauth-protected-resource"
POST /v1/create_task with a read-only key
403 { "error": { "code": "FORBIDDEN", "message": "create_task needs the write scope." } }
POST /v1/create_task, no title
400 { "error": { "code": "VALIDATION", "message": "A title is required." } }
POST /v1/get_job, an id that does not exist
400 { "error": { "code": "JOB_NOT_FOUND", "message": "no such job." } }
POST /v1/create_task, an Idempotency-Key already used for a different Task
409 { "error": { "code": "CONFLICT", "message": "This idempotency_key was already used for a different call. Use a new key for a new action." } }
POST /v1/send_client_update, with AI sending switched off by the owner
403 { "error": { "code": "FORBIDDEN", "message": "The owner has switched off sending by AI on this account. Ask a person to do this in NexaTrack." } }
POST /v1/no_such_operation
404 { "error": { "code": "NOT_FOUND", "message": "No such operation. The list is at /openapi.json." } }
The staging address in the first WWW-Authenticate is shown as the production one.
Limits
| Limit | Today |
|---|---|
| Requests a minute, for each key or AI connection | 120 over REST, and 120 MCP messages; counted separately |
| Requests a minute, for the whole account (all its keys and connections together) | 600 |
| REST requests and MCP messages a month, for the whole account | 250,000 of each, counted separately, unless NexaTrack has set the account another allowance |
| An idempotency key is remembered for | 24 hours |
| A request waiting for approval expires after | 24 hours |
| Undo reaches back | 24 hours, and only what the same credential made |
The limits are settings, not code, and can change; the headers always say what applies. A REST answer to a request that
was counted carries RateLimit-Limit and RateLimit-Remaining (a request refused before that, such
as a read-only key asking to write, carries neither); a 429 RATE_LIMITED also carries
Retry-After in seconds. Spread work out rather than sending bursts,
and prefer a webhook to asking again and again whether something changed.