code field is a stable, machine-readable identifier — match on it instead of the
human message, which can change. Each error’s doc_url links straight to its
entry on this page.
New to handling our errors? Start with the Error handling guide
for the response shape, how to catch errors, and how to respond to each error type.
Authentication and access
authentication_required
401 — YourAuthorization header is missing or invalid. Send your API key as a
Bearer token: Authorization: Bearer mk_live_…. See Authentication.
SOCIAL_TOKEN_EXPIRED
401 — The connected social account needs to be reconnected (its token expired or was revoked). Reconnect the account in Social Connections, then retry.SOCIAL_CONNECT_LINK_EXPIRED
400 — The one-time sign-in link expired or was already used, usually because the user took too long on the platform’s consent screen. Nothing is wrong with the account. Start the connection again and confirm right away.SOCIAL_CONNECT_FAILED
400 — We couldn’t finish connecting a social account, for a reason other than an expired link (a permission the user didn’t grant, or a problem on the platform’s side). The message says which. Start the connection again.permission_denied
403 — Your key is valid but can’t access this resource. Usually the business doesn’t belong to your organization, or your plan doesn’t include API access. Check the business ID and your org’s plan.INVALID_API_KEY
422 — A third-party key you supplied (for example an OpenRouter or Gemini key) isn’t valid. Check the key and save it again.Invalid requests
validation_error
422 — The request body failed validation. Theparam field names the first
offending field; if several fields failed, read error.details for the full list.
missing_field
400 — A required field is missing. Theparam field tells you which one.
invalid_value
400 — A field has a value that isn’t allowed. Checkparam and message for
the specifics.
invalid_request
400 — The request couldn’t be processed and no more specific code applies. Readmessage for the reason.
resource_not_found
404 — The ID doesn’t exist, was deleted, or doesn’t belong to your organization. Check the ID and try again.already_exists
409 — A resource with that name or ID already exists. Use a different value.Plans, billing, and credits
PAYMENT_REQUIRED
402 — This feature needs a paid plan. Upgrade to use it.INSUFFICIENT_CREDITS
402 — Your organization is out of credits. The response includesrequired_credits so you can show how many more are needed. Add credits or upgrade,
then retry.
