Errors

The refusal body every failed call returns, the API key error codes, and the one field safe to branch on.

Every refusal comes back as JSON in the same shape:

{
	"success": false,
	"data": null,
	"message": "This API key is read-only. A read & write key is required for POST requests.",
	"code": "API_KEY_READ_ONLY"
}

message is written for a human. Most messages are translated into the company's language, so a Norwegian tenant gets Norwegian prose and your English substring match quietly stops working. Branch on the HTTP status, and on code when the refusal carries one.

code appears on refusals that name themselves, which is how you tell two different 403s apart. A plain 404 has no code.

API key codes

Every refusal about the key itself carries one of these codes. Their messages are always English, so they read the same in your logs whatever language the company uses.

StatusCodeWhenMessage
401API_KEY_MISSINGno x-api-key header and no session"No API key was sent. Put your key in the x-api-key header."
401API_KEY_INVALIDunknown key"The API key is not recognised. Check the value in the x-api-key header."
401API_KEY_REVOKEDkey exists but is revoked"This API key has been revoked. Create a new key in Settings > API keys."
401API_KEY_EXPIREDthe key's expiry date has passed"This API key has expired. Create a new key in Settings > API keys."
401API_KEY_CREATOR_REMOVEDcreator no longer a member, or account disabled"This API key is no longer valid because its creator left the company. Create a new key."
403API_KEY_ORIGIN_NOT_ALLOWEDOrigin header not in the key's allowlist"This API key is not allowed from origin <origin>."
403API_KEY_READ_ONLYwrite method on a READ key, outside routes marked x-readonly"This API key is read-only. A read & write key is required for <METHOD> requests."
403API_KEY_WRONG_COMPANYx-company-id names a company other than the key's"This API key belongs to a different company than the one in the request."
403API_KEY_PLAN_REQUIREDthe company's plan no longer includes API access"API access is not included in the company's current plan. Upgrade to Premium to use this key."
429API_KEY_RATE_LIMITEDper-key window spent"Rate limit exceeded for this API key. Retry after <n> seconds." plus Retry-After
429API_KEY_COMPANY_RATE_LIMITEDper-company window, shared by all its keys, spent"Rate limit exceeded for this company's API keys combined. Retry after <n> seconds." plus Retry-After
429API_KEY_AUTH_LOCKEDtoo many unknown, revoked or expired keys from your address"Too many failed API key attempts from this address. Retry after <n> seconds." plus Retry-After

<origin>, <METHOD> and <n> are filled in with the request's own values.

Company header codes

The x-company-id header has two refusals of its own. Both are 400 and both are refused before the handler runs; their messages are English.

StatusCodeWhenMessage
400COMPANY_ID_MISSINGno x-company-id header on a session request"Missing x-company-id header"
400COMPANY_ID_INVALIDthe header is present but is not a 24 character hex id"x-company-id must be a 24 character hex id"

A request with an API key and no header never gets COMPANY_ID_MISSING: the key's own company fills in. A header naming a company other than the key's answers 403 with API_KEY_WRONG_COMPANY from the table above.

Unknown, revoked and expired keys get different codes on purpose. An unknown key usually means a typo or a truncated copy; a revoked one means someone deleted it, or its creator lost access; an expired one ran past the date set when it was created. Only a new key helps with the last two.

Each of those refusals also counts against the address that sent it. More than 60 in one minute and every key request from that address is refused with API_KEY_AUTH_LOCKED until the minute is up, valid keys included. An integration retrying a dead key in a loop is the usual way to get there, so stop on a 401 instead of retrying.

OAuth and company access codes

OAuth tokens and company membership have refusals of their own. The OAuth messages are always English; COMPANY_ACCESS_DENIED is translated into the company's language.

StatusCodeWhenMessage
401OAUTH_TOKEN_INVALIDthe OAuth access token is unknown, malformed or expired"The OAuth access token is invalid or expired. Reconnect the app to get a new one."
403OAUTH_MEMBERSHIP_REVOKEDthe user who granted the token has left the company it was granted for"The user behind this OAuth token is no longer a member of the company it was granted for."
403OAUTH_WRONG_COMPANYx-company-id names a company other than the token's, or the request names a company outside the token company's chain"This OAuth token is bound to a different company than the one in the request."
403OAUTH_ROUTE_FORBIDDENthe route is on the AI app block list: account or company deletion, invites and membership, login methods, plan purchase or cancellation, API keys, calendar connection, AI app connections, staff routes"This route is not available to OAuth access tokens. Sign in to Vadio directly to use it."
403COMPANY_ACCESS_DENIEDthe caller is not a member of the company the request addresses"You are not a member of this company"
403CHAIN_ACCESS_BLOCKEDa chain admin tried an action reserved for the member company's own admins"Chain admins cannot perform this action on a member company. Contact the member company admin directly."

Validation errors

A body or query that fails validation returns 400 with an errors array next to the message:

{
	"success": false,
	"data": null,
	"message": "Name must be 200 characters or less.",
	"errors": [{ "path": "input.name", "expected": "maxLength 200", "received": "length 247" }]
}

path points at the field that failed, which is what you want for putting the message back on a form.

A malformed record id on a CRM route (a contact, company, lead or deal id that is not a 24 character hex string, in the path, the query or the body) is refused earlier, by the id check rather than the body validator, and returns 400 with the code CRM_INVALID_ID and no errors array:

{
	"code": "CRM_INVALID_ID",
	"message": "That record id is not valid"
}

The message is translated into the company's language, so branch on the code.

Statuses

StatusWhat it means
400The request body or query did not validate, or the x-company-id header is missing or malformed
401The key is missing, unknown, revoked or expired, or its creator has left. The code says which
403The key cannot do this: read-only, wrong company, disallowed origin, plan lapsed, or an add-on is off
404No such record in this company. A record owned by another company reads as missing, on purpose
429Over a rate limit, or locked out after failed key attempts. See Rate limits
500Our fault. Retry once, and tell us if it sticks

Every 401 is worth handling on its own: retrying the same key never helps. Someone has to create a new key, or fix the value your integration sends.

On this page