Skip to main content
Every error response from the KeyStone API includes a structured body with three fields:
  • detail - A human-readable description of what went wrong.
  • code - A machine-readable error code for programmatic handling.
  • docs_url - A direct link to the documentation for this specific error.
One exception: a request rejected by schema validation answers with the validation shape instead - a detail array whose items name the failing field and rule, with no code field and never the submitted value. Branch on the HTTP status first, then on code where one is present. Use the code field in your integration logic to handle errors programmatically. The detail field is informational and may change between releases.
The codes below mirror the API’s error enum one-for-one and are grouped the same way. A handful of codes are defined in the contract but not currently emitted by any endpoint - these are called out as Reserved so you can safely ignore them until they ship.

Authentication and Authorization

INVALID_TOKEN

TOKEN_EXPIRED

MISSING_TOKEN

INSUFFICIENT_SCOPES

NO_PLATFORM_CONTEXT

NO_ENVIRONMENT_CONTEXT

IP_NOT_ALLOWED

AUTH_CONTEXT_NOT_RESOLVED

PRINCIPAL_CONFLICT

USER_TOKEN_REQUIRED


Callback Authentication

MISSING_CALLBACK_SIGNATURE

INVALID_CALLBACK_SIGNATURE

CALLBACK_AUTH_NOT_CONFIGURED


Not Found

SETTLEMENT_NOT_FOUND

TEMPLATE_NOT_FOUND

PLATFORM_NOT_FOUND

ENVIRONMENT_NOT_FOUND

INSTRUCTION_NOT_FOUND

WEBHOOK_ENDPOINT_NOT_FOUND

IP_RANGE_NOT_FOUND

MEMBER_NOT_FOUND

PROVIDER_NOT_FOUND

SESSION_NOT_FOUND

LEG_NOT_FOUND

NOT_REPO_SETTLEMENT

PRINCIPAL_NOT_FOUND


Session Tokens

SESSION_TOKEN_EXPIRED

SESSION_ESCALATION_DENIED

SESSION_SETTLEMENT_SCOPE_DENIED

SESSION_WRITE_DENIED


Deposit Calldata

DEPOSIT_SECRET_NOT_AVAILABLE

NO_ESCROW_FOR_CHAIN

LEG_NOT_DEPOSITABLE

OFFCHAIN_LEG


Conflict

DUPLICATE_RESOURCE

SETTLEMENT_STATE_CONFLICT

SETTLEMENT_BUSY

NO_VALID_TRANSITION

INSTRUCTION_NOT_CANCELLABLE

NOT_REPO_OPEN

SETTLEMENT_NOT_FINALIZED

CLOSING_ALREADY_EXISTS

CLOSING_CREATION_FAILED

ENVIRONMENT_DEACTIVATED

PRINCIPAL_NO_LSEG_CASE

LSEG_TOOLKIT_STALE

MEMBER_CHANGE_IN_PROGRESS


Validation

VALIDATION_ERROR

NO_FIELDS_PROVIDED

INVALID_PARTY_CONFIGURATION

UNSUPPORTED_CHAIN_COMBINATION

UNSUPPORTED_SETTLEMENT_CHAIN

NON_INTEGRAL_QUANTITY

TEMPLATE_INACTIVE

NO_AUTH0_ORGANIZATION

SELF_ACTION_FORBIDDEN

LAST_MEMBER_MANAGER

INVALID_TARGET_STATE

CANNOT_RESOLVE_TARGET_STATE

PRINCIPAL_REFERENCE_MISSING

PRINCIPAL_REFERENCE_MISMATCH


UNRECOGNIZED_CLIENT


Rate Limiting

RATE_LIMIT_EXCEEDED

RATE_LIMIT_UNATTRIBUTED

RATE_LIMIT_CREDENTIAL_ISSUANCE


External Service Failures

AUTH0_ERROR

EXTERNAL_SERVICE_ERROR