Skip to content

Errors

Errors have one shape, and each code always has the same HTTP status:

{ "error": { "code": "INSUFFICIENT_SCOPE", "message": "This operation needs the assessments:write scope", "scope": "assessments:write" } }
  • Branch on error.code, not on message, which is for people and can change.
  • Some codes add fields: scope (INSUFFICIENT_SCOPE), reason (FORBIDDEN), entitlement, limit, used, plan (PLAN_LIMIT_REACHED), feature (PLAN_FEATURE_UNAVAILABLE).
  • Not found is always 404 NOT_FOUND: an unknown id, a malformed id and another organization’s id look the same.
  • A 401 carries WWW-Authenticate: Bearer realm="tradecraft", resource_metadata="https://api.tradecrafthub.ai/.well-known/oauth-protected-resource", with error="invalid_token" when a token was sent.
  • 500 INTERNAL never carries details. Quote the response’s X-Request-Id when you contact support.
  • New codes can be added for new situations. Treat an unknown code by its HTTP status.

The OAuth endpoints (/oauth/*, /.well-known/*) use the OAuth format instead: { "error": "invalid_client", "error_description": "…" } (RFC 6749).

The reference lists these on the operations that can return them:

StatusCodeMeaning
400VALIDATION_ERRORThe body, query or path is invalid. Also: an access token in the URL, a missing required Idempotency-Key, or a cursor from another organization or filter set.
400ASSET_KIND_NOT_ALLOWEDThe library does not accept this kind of document.
401UNAUTHENTICATEDNo valid credential: the token is missing, unknown, expired or revoked, or was issued for another resource (such as an MCP connection).
402SPEND_CAP_EXCEEDEDThe platform's monthly AI spend cap is reached. Operations that call AI models stop until it resets.
402TENANT_AI_BUDGET_EXCEEDEDYour organization's monthly AI budget is used up.
403FORBIDDENAuthenticated, but the role, an object rule or a policy does not allow this. error.reason says why (for example member_inactive, permission_missing, not_opted_in, user_only, role).
403PLAN_LIMIT_REACHEDA limit of your organization's plan is reached (error.entitlement, limit, used, plan).
403PLAN_FEATURE_UNAVAILABLEYour organization's plan does not include this feature (error.feature, plan). The API is on the Enterprise plan.
403TRIAL_EXPIREDThe trial ended or the subscription was cancelled; the organization is read-only.
403INSUFFICIENT_SCOPEThe token lacks the scope this operation needs. error.scope names it; WWW-Authenticate: Bearer error="insufficient_scope" too.
403API_DISABLEDYour organization has not turned the API on (Admin → API → Settings).
404NOT_FOUNDNo such resource in your organization. Unknown ids, malformed ids and another organization's ids all answer this.
409CONFLICTThe resource's state does not allow this now: wrong lifecycle state, a duplicate, or already running.
409LIBRARY_ARCHIVEDThe library is archived and read-only.
409IDEMPOTENCY_CONFLICTThe Idempotency-Key was already used for a different request, or the first request with it is still running.
429RATE_LIMITEDToo many requests. Wait for the number of seconds in Retry-After.

Tradecraft uses one catalogue across the product. These codes come from features that the API does not expose today, or from rare cases; most of them will not reach an API client, but handle them by status if they do:

StatusCodeMeaning
400WEAK_PASSWORDSign-in screens only: the password does not meet the policy.
400INVALID_TOKENSign-in screens only: the email link or invitation is invalid or already used.
400EXPIRED_TOKENSign-in screens only: the email link or invitation expired.
400ASSET_SOURCE_NOT_ALLOWEDThe library does not accept documents from this source.
400MISSING_SCOPESIntegrations only: the pasted Confluence credential lacks required scopes (error.missing lists them).
400CLASSIC_TOKENIntegrations only: a classic (unscoped) Atlassian API token was pasted.
400INVALID_CREDENTIALIntegrations only: the provider rejected the pasted credential.
400CLOUD_ID_UNRESOLVEDIntegrations only: the Atlassian site could not be resolved.
400SITE_NOT_FOUNDIntegrations only: the Atlassian site address that was entered does not exist.
401INVALID_CREDENTIALSSign-in screens only: wrong email or password.
401INVALID_CODESign-in screens only: wrong or expired authenticator code.
403SSO_REQUIREDYour organization requires single sign-on.
409SLUG_TAKENSign-up only: the organization address is taken.
409LAST_ADMINThe change would leave the organization without an active admin.
409MANAGED_BY_IDPThe member is managed by your identity provider (SCIM or directory sync).
409INTEGRATION_AUTHThe connected source needs to be reconnected.
409INTEGRATION_NOT_CONNECTEDThe source is not connected.
409SITE_CHOICE_EXPIREDIntegrations only: the pending Atlassian site choice expired.
410GONEThe resource existed but is gone for good.
410ENDPOINT_REMOVEDThe endpoint was removed. The message names its replacement.
413PAYLOAD_TOO_LARGEThe upload is larger than allowed.
415UNSUPPORTED_MEDIA_TYPEThe request's content type is not accepted.
429LOCKEDToo many failed attempts. Locked until Retry-After.
500INTERNALUnexpected server error. The body carries no details; quote the X-Request-Id when you contact support.
502PROVIDER_ERRORAn upstream provider (an AI model, Confluence, an identity provider or a directory) failed.
503SERVICE_UNAVAILABLEA dependency is unavailable or not configured.
503PLATFORM_NOT_CONFIGUREDThe platform app for this source is not configured.

Both tables are generated from the published OpenAPI description at build time.

Privacy preference center

When you visit tradecrafthub.ai, we store or read a small number of cookies in your browser. Strictly necessary cookies make the website and the Tradecraft app work. Analytics cookies are used only if you allow them. Open a category to learn more, and see our privacy policy for how we handle the information you enter on this site.

Manage consent preferences

  • Always active