Skip to main content

An index of Clerk Backend API errors.

Actor Tokens

ActorTokenCannotBeRevoked

Status Code: 400
{
  "shortMessage": "cannot revoke",
  "longMessage": "Actor token cannot be revoked because its status is <status>. Only pending tokens can be revoked.",
  "code": "actor_token_cannot_be_revoked_code"
}
Status Code: 400
{
  "shortMessage": "cannot revoke agent task",
  "longMessage": "cannot revoke agent task",
  "code": "agent_task_cannot_be_revoked"
}
Status Code: 404
{
  "shortMessage": "agent task not found",
  "longMessage": "The requested agent task could not be found.",
  "code": "agent_task_not_found"
}
Status Code: 404
{
  "shortMessage": "user not found",
  "longMessage": "The user of the agent task no longer exists. Please request a new one.",
  "code": "agent_task_subject_not_found"
}
Status Code: 404
{
  "shortMessage": "Identifier not found",
  "longMessage": "No identifier was found with id <identifierID>",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "duplicate allowlist identifier",
  "longMessage": "the identifier <identifier> already exists",
  "code": "duplicate_record"
}
Status Code: 422
{
  "shortMessage": "API Keys not enabled",
  "longMessage": "API Keys not enabled",
  "code": "api_keys_not_enabled"
}

Applications

AccountlessApplicationNotFound

AccountlessApplicationNotFound signifies an error when no application with the given claim token could be found

Status Code: 404
{
  "shortMessage": "Application not found",
  "longMessage": "No application was found with the given claim token.",
  "code": "resource_not_found"
}

Auth

AuthorizationMissingScopes

AuthorizationMissingScopes signifies that the authorization is missing required scope(s). Returns a 403 Forbidden error.

Status Code: 403
{
  "shortMessage": "Missing authorization scopes",
  "longMessage": "Missing authorization scopes",
  "code": "authorization_missing_scopes",
  "meta": {
    "scopes": "missing"
  }
}
Status Code: 401
{
  "shortMessage": "Could not authenticate request.",
  "longMessage": "Could not authenticate request.",
  "code": "could_not_authenticate_request"
}

IdentificationExists

IdentificationExists signifies an error when the identifier already exists

Status Code: 400
{
  "shortMessage": "already exists",
  "longMessage": "This <identifier> already exists.",
  "code": ""
}
Status Code: 403
{
  "shortMessage": "Country code not allowed.",
  "longMessage": "Phone number sign ups are not allowed for this country code. Please use a different method.",
  "code": "not_allowed_access",
  "meta": {
    "name": "phone_number"
  }
}
Status Code: 403
{
  "shortMessage": "Access not allowed.",
  "longMessage": "<who> <pluralization> not allowed to access this application.",
  "code": "not_allowed_access",
  "meta": "{\"Identifiers\": identifiers}"
}

InvalidAuthentication

InvalidAuthentication signifies an error when the request is not authenticated

Status Code: 401
{
  "shortMessage": "Invalid authentication",
  "longMessage": "Unable to authenticate the request, you need to supply an active session",
  "code": "authentication_invalid"
}

InvalidAuthorization

InvalidAuthorization signifies an error when the request is not authorized to perform the given operation

Status Code: 403
{
  "shortMessage": "Unauthorized request",
  "longMessage": "You are not authorized to perform this request",
  "code": "authorization_invalid"
}

InvalidAuthorizationHeaderFormat

InvalidAuthorizationHeaderFormat signifies an error when the Authorization header has no proper format.

Status Code: 401
{
  "shortMessage": "Invalid Authorization header format",
  "longMessage": "Invalid Authorization header format. Must be 'Bearer <YOUR_API_KEY>'",
  "code": "authorization_header_format_invalid"
}

InvalidClerkSecretKey

InvalidClerkSecretKey signifies an error when the supplied client key is invalid

Status Code: 401
{
  "shortMessage": "The provided Clerk Secret Key is invalid. Make sure that your Clerk Secret Key is correct.",
  "longMessage": "The provided Clerk Secret Key is invalid. Make sure that your Clerk Secret Key is correct.",
  "code": "clerk_key_invalid"
}

InvalidRequestForEnvironment

InvalidRequestForEnvironment signifies an error when the incoming request is invalid for given environment(s)

Status Code: 400
{
  "shortMessage": "Invalid request for environment",
  "longMessage": "Request only valid for <envTypes> instances.",
  "code": "request_invalid_for_environment"
}

RateLimitedCountry

supportEmail (_) is unused here at the moment the customer who requested this change specifically wanted to avoid adding a support email since changing this is not in control of support. reference: https://clerkinc.slack.com/archives/C07U96ZAZ9T/p1759344749115659?thread_ts=1758659910.343909&cid=C07U96ZAZ9T

Status Code: 403
{
  "shortMessage": "Rate limited country code",
  "longMessage": "SMS to the country <countryName> is temporarily disabled. Please try again later.",
  "code": "unsupported_country_code",
  "meta": "{\"Alpha2\": alpha2, \"CountryCode\": countryCode}"
}

RequestInvalidForInstance

RequestInvalidForInstance signifies an error when the incoming request is invalid for the given instance, due to the auth_config

Status Code: 400
{
  "shortMessage": "Invalid request for instance",
  "longMessage": "This request is not valid for your instance. Modify your instance settings to use this request.",
  "code": "request_invalid_for_instance"
}
Status Code: 403
{
  "shortMessage": "This email address is already in use.",
  "longMessage": "This email address is already in use. Creating multiple accounts with the same email address is not allowed.",
  "code": "not_allowed_access"
}
Status Code: 403
{
  "shortMessage": "Unsupported country code",
  "longMessage": "Phone numbers from this country (<countryName>) are currently not supported. For more information, please contact <support>.",
  "code": "unsupported_country_code",
  "meta": "{\"Alpha2\": alpha2, \"CountryCode\": countryCode}"
}
Status Code: 404
{
  "shortMessage": "Identifier not found",
  "longMessage": "No identifier was found with id <identifierID>",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "duplicate blocklist identifier",
  "longMessage": "the identifier <identifier> already exists",
  "code": "duplicate_record"
}

Clients

ClientNotFound

ClientNotFound signifies an error when no client is found with clientID

Status Code: 404
{
  "shortMessage": "Client not found",
  "longMessage": "No client was found with id <clientID>",
  "code": "resource_not_found"
}

ClientNotFoundInRequest

ClientNotFoundInRequest signifies an error when no client is found in an incoming request

Status Code: 400
{
  "shortMessage": "No client found",
  "longMessage": "This request is expecting a client and did not find one",
  "code": "client_not_found"
}
Status Code: 403
{
  "shortMessage": "Annual only plans are not enabled",
  "longMessage": "Annual only plans are not enabled, please enable the update in Clerk dashboard.",
  "code": "billing_annual_only_plans_not_enabled"
}
Status Code: 403
{
  "shortMessage": "access denied",
  "longMessage": "The billing feature for organizations is not enabled for this instance. You can enable it at https://dashboard.clerk.com.",
  "code": "billing_not_enabled"
}
Status Code: 403
{
  "shortMessage": "access denied",
  "longMessage": "The billing feature for users is not enabled for this instance. You can enable it at https://dashboard.clerk.com.",
  "code": "billing_not_enabled"
}
Status Code: 409
{
  "shortMessage": "Another checkout is already in progress",
  "longMessage": "Another checkout is already in progress",
  "code": "checkout_already_in_progress"
}
Status Code: 402
{
  "shortMessage": "Insufficient seats",
  "longMessage": "You have reached the seat limit for your current plan.",
  "code": "insufficient_seats",
  "meta": {
    "seatsquantity": "totalneeded"
  }
}
Status Code: 400
{
  "shortMessage": "Subscription item already canceled",
  "longMessage": "You can't cancel a subscription item that is already canceled",
  "code": "commerce_subscription_item_already_canceled"
}
Status Code: 422
{
  "shortMessage": "Subscription item cannot be canceled",
  "longMessage": "Subscription item cannot be canceled because <reason>",
  "code": "commerce_subscription_item_cannot_be_canceled"
}
Status Code: 422
{
  "shortMessage": "Subscription item cannot be ended",
  "longMessage": "Subscription item cannot be ended because <reason>",
  "code": "commerce_subscription_item_cannot_be_ended"
}
Status Code: 400
{
  "shortMessage": "Invalid currency",
  "longMessage": "Currency is not supported",
  "code": "currency_invalid"
}
Status Code: 422
{
  "shortMessage": "Default plan price creation forbidden",
  "longMessage": "Custom prices cannot be created for default plans. Only custom paid plans support additional pricing",
  "code": "default_plan_price_creation_forbidden"
}
Status Code: 422
{
  "shortMessage": "Insufficient credit balance",
  "longMessage": "The decrease amount exceeds the current credit balance",
  "code": "insufficient_credit_balance",
  "meta": {
    "name": "amount"
  }
}
Status Code: 422
{
  "shortMessage": "Invalid credit action",
  "longMessage": "Credit action must be either 'increase' or 'decrease'",
  "code": "invalid_credit_action"
}
Status Code: 422
{
  "shortMessage": "Invalid credit amount",
  "longMessage": "Credit amount must be greater than zero",
  "code": "invalid_credit_amount"
}
Status Code: 400
{
  "shortMessage": "Missing plan ID",
  "longMessage": "Plan ID is required to perform this operation",
  "code": "missing_plan_id"
}
Status Code: 422
{
  "shortMessage": "Organization member limit exceeded",
  "longMessage": "Plan change is not allowed because the organization's <occupiedSeatsStr> occupied seats exceed the limit of <maxAllowedStr> organization memberships.",
  "code": "org_member_limit_exceeded_for_plan_change"
}
Status Code: 409
{
  "shortMessage": "Out of date price",
  "longMessage": "There was a mismatch in the price transition. The price may have been changed by another request.",
  "code": "out_of_date_price"
}
Status Code: 409
{
  "shortMessage": "Payee not active",
  "longMessage": "Payee is not active",
  "code": "payee_not_active"
}
Status Code: 404
{
  "shortMessage": "Payee not found",
  "longMessage": "Payee not found",
  "code": "payee_not_found"
}
Status Code: 400
{
  "shortMessage": "Payee status is invalid",
  "longMessage": "Payee status is invalid",
  "code": "payee_status_invalid"
}
Status Code: 404
{
  "shortMessage": "Payer not found",
  "longMessage": "Payer not found",
  "code": "payer_not_found"
}
Status Code: 422
{
  "shortMessage": "Requires confirmation",
  "longMessage": "The payment attempt failed because it requires additional confirmation, which is not currently supported. Please use a different payment method.",
  "code": "payment_attempt_failed_requires_confirmation"
}
Status Code: 422
{
  "shortMessage": "Your card was declined",
  "longMessage": "The card was declined.",
  "code": "payment_attempt_failed_card_declined"
}
Status Code: 422
{
  "shortMessage": "Card expired",
  "longMessage": "The card has expired.",
  "code": "payment_attempt_failed_card_expired"
}
Status Code: 422
{
  "shortMessage": "Insufficient funds",
  "longMessage": "The card has insufficient funds.",
  "code": "payment_attempt_failed_card_insufficient_funds"
}
Status Code: 422
{
  "shortMessage": "Payment method required",
  "longMessage": "A payment method is required to upgrade from a free plan. The subscription payer must add a payment method before this transition can be completed.",
  "code": "payment_method_required_for_transition"
}
Status Code: 422
{
  "shortMessage": "Processing error",
  "longMessage": "There was a processing error with the payment method.",
  "code": "payment_attempt_failed_processing_error"
}
Status Code: 422
{
  "shortMessage": "Paid plan month or annual fee invalid",
  "longMessage": "Paid plan month or annual fee invalid",
  "code": "plan_amount_invalid"
}
Status Code: 422
{
  "shortMessage": "Paid plan monthly base fee exceeds upper limit",
  "longMessage": "Paid plan monthly base fee must be less than $999,999.99",
  "code": "plan_amount_exceeds_upper_limit"
}
Status Code: 422
{
  "shortMessage": "Plan does not support empty organizations",
  "longMessage": "This plan cannot be applied to an organization without members.",
  "code": "plan_does_not_support_empty_orgs"
}
Status Code: 403
{
  "shortMessage": "Free trials disabled",
  "longMessage": "Free trials are disabled for this plan",
  "code": "plan_free_trials_disabled"
}
Status Code: 404
{
  "shortMessage": "Plan not found",
  "longMessage": "Plan not found",
  "code": "plan_not_found"
}
Status Code: 422
{
  "shortMessage": "Plan seat limit exceeded",
  "longMessage": "Your organization has <currentMembersStr> members, but the requested plan would only support <seatLimitStr> members. Please remove members before switching to this plan.",
  "code": "plan_seat_limit_exceeded",
  "meta": "{\"PlanSeatLimit\": planSeatLimit, \"CurrentMembers\": currentMembers}"
}
Status Code: 422
{
  "shortMessage": "Price transition not allowed",
  "longMessage": "Price transition not allowed because <reason>",
  "code": "price_transition_not_allowed"
}
Status Code: 422
{
  "shortMessage": "Seat-based billing exceeds plan's organization member limit",
  "longMessage": "The seat-based plan you are trying to create exceeds your Clerk plan's organization member limit. Adjust your seat limits to match your plan's limit or upgrade your subscription.",
  "code": "seat_based_billing_exceeds_org_member_limit"
}
Status Code: 422
{
  "shortMessage": "Subscription already ended",
  "longMessage": "Subscription is already ended",
  "code": "subscription_already_ended"
}
Status Code: 409
{
  "shortMessage": "Subscription item is no longer active",
  "longMessage": "The subscription item is no longer the payer's active subscription item. It may have been changed by another request.",
  "code": "subscription_item_no_longer_active"
}
Status Code: 404
{
  "shortMessage": "Subscription item not found",
  "longMessage": "Subscription item not found",
  "code": "subscription_item_not_found"
}
Status Code: 403
{
  "shortMessage": "Subscription item is not in free trial",
  "longMessage": "Subscription item is not in free trial",
  "code": "subscription_item_not_in_free_trial"
}
Status Code: 404
{
  "shortMessage": "Subscription not found",
  "longMessage": "Subscription not found",
  "code": "subscription_not_found"
}
Status Code: 422
{
  "shortMessage": "Supported billing period mismatch",
  "longMessage": "<field> cannot be set when supported_billing_periods is %q",
  "code": "supported_billing_period_mismatch",
  "meta": {
    "name": "field"
  }
}
Status Code: 422
{
  "shortMessage": "Invalid unit price amount per block",
  "longMessage": "Unit price '<unitName>' tier %d has invalid amount_per_block '%d'. Amount per block must be non-negative (>= 0)",
  "code": "unit_price_amount_per_block_invalid"
}
Status Code: 422
{
  "shortMessage": "Invalid unit price block size",
  "longMessage": "Unit price block size '%d' is not supported. Supported block size: %d",
  "code": "unit_price_block_size_invalid"
}
Status Code: 422
{
  "shortMessage": "Invalid unit price currency",
  "longMessage": "Unit price currency '<currency>' is not supported. Only '<validCurrency>' is currently supported for unit prices",
  "code": "unit_price_currency_invalid"
}
Status Code: 422
{
  "shortMessage": "Invalid tier range",
  "longMessage": "Unit price '<unitName>' tier %d has ends_after_block (%d) less than starts_at_block (%d). The end must be greater than or equal to the start",
  "code": "unit_price_ends_after_block_invalid"
}
Status Code: 422
{
  "shortMessage": "Free tier cannot follow a paid tier",
  "longMessage": "Unit price '<unitName>' tier %d is free but a preceding tier is paid. Once a tier is paid, all subsequent tiers must also be paid",
  "code": "unit_price_free_tier_after_paid_tier"
}
Status Code: 422
{
  "shortMessage": "Invalid unit price name",
  "longMessage": "Unit price name '<name>' is not supported. Supported names: <validName>",
  "code": "unit_price_name_invalid"
}
Status Code: 422
{
  "shortMessage": "Unit prices not allowed for user plans",
  "longMessage": "unit_prices can only be provided for organization plans, not user plans",
  "code": "unit_prices_not_allowed_for_user_plans"
}
Status Code: 422
{
  "shortMessage": "Invalid unit price starts at block",
  "longMessage": "Unit price starts at block '%d' is not supported. Supported starts at block: %d",
  "code": "unit_price_starts_at_block_invalid"
}
Status Code: 422
{
  "shortMessage": "Gap or overlap in tier ranges",
  "longMessage": "Unit price '<unitName>' tier %d should start at block %d but starts at %d. Tiers must be continuous with no gaps or overlaps",
  "code": "unit_price_tier_gap_or_overlap_detected"
}
Status Code: 422
{
  "shortMessage": "Tiers missing",
  "longMessage": "Unit price '<unitName>' must have at least one tier defined",
  "code": "unit_price_tiers_missing"
}
Status Code: 422
{
  "shortMessage": "Unlimited tier must be last",
  "longMessage": "Unit price '<unitName>' tier %d has unlimited range (null ends_after_block) but is not the last tier. Only the last tier can be unlimited",
  "code": "unit_price_unlimited_tier_must_be_last"
}

InvalidCookie signifies an error when cookie is invalid

Status Code: 400
{
  "shortMessage": "",
  "code": "cookie_invalid"
}

InvalidRotatingToken

InvalidRotatingToken signifies an error when rotating token does not match the client's rotating token

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "The client's rotating key does not match the given one <token>",
  "code": "cookie_invalid"
}

MissingClaims

MissingClaims signifies an error when token is missing claim

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "The token is missing the following claims: <claims>",
  "code": "cookie_invalid"
}
Status Code: 410
{
  "shortMessage": "endpoint is deprecated and pending removal",
  "longMessage": "endpoint is deprecated and pending removal",
  "code": "operation_deprecated"
}
Status Code: 409
{
  "shortMessage": "Discount already applied",
  "longMessage": "This subscription item already has an active discount applied",
  "code": "discount_already_applied"
}
Status Code: 422
{
  "shortMessage": "Discount inactive",
  "longMessage": "This discount is not currently active",
  "code": "discount_inactive"
}
Status Code: 422
{
  "shortMessage": "Discount not applicable",
  "longMessage": "This discount cannot be applied to this subscription item",
  "code": "discount_not_applicable_to_subscription_item"
}
Status Code: 404
{
  "shortMessage": "Discount not found",
  "longMessage": "The discount was not found",
  "code": "discount_not_found"
}

Domains

DomainUpdateForbidden

DomainUpdateForbidden signifies an error when trying to update an non production instance domain

Status Code: 400
{
  "shortMessage": "Domain update was forbidden",
  "longMessage": "Domain can be only updated for production instances",
  "code": "domain_update_forbidden"
}

FeatureRequiresCustomDomain

FeatureRequiresCustomDomain signifies an error when a feature is blocked because the instance only has a provider domain (e.g. vercel.app).

Status Code: 403
{
  "shortMessage": "custom domain required",
  "longMessage": "<feature> requires a custom domain. Add a custom domain to unlock this feature.",
  "code": "feature_requires_custom_domain"
}
Status Code: 422
{
  "shortMessage": "",
  "longMessage": "Clerk Frontend API cannot be accessed through the proxy URL. Make sure your proxy is configured correctly.",
  "code": "invalid_proxy_configuration",
  "meta": {
    "name": "proxy_url"
  }
}
Status Code: 403
{
  "shortMessage": "operation not allowed",
  "longMessage": "This operation is not allowed on a primary domain. Try again with a satellite domain of the instance.",
  "code": "operation_not_allowed_on_primary_domain"
}

PrimaryDomainAlreadyExists

PrimaryDomainAlreadyExists signifies an error when a new domain is added as primary when there is already once in the instance. Currently, we only support a single primary domain per instance.

Status Code: 422
{
  "shortMessage": "primary domain already exists",
  "longMessage": "Currently, only a single primary domain is supported and the current instance already has one. All new domains need to be set a satellites.",
  "code": "primary_domain_already_exists",
  "meta": {
    "name": "is_satellite"
  }
}

ProviderDomainOperationNotAllowedForAPI

Return this error when an API other than Platform API is used to create/update/delete a provider domain.

Status Code: 403
{
  "shortMessage": "operation not allowed",
  "longMessage": "*<provider> domains are not supported for production instances. Please purchase a domain then try again.",
  "code": "provider_domain_operation_not_allowed"
}

ProxyURLRequiredForProviderDomain

ProxyURLRequiredForProviderDomain signifies an error when a provider domain (e.g., replit.app, vercel.app) is created without a proxy URL.

Status Code: 422
{
  "shortMessage": "proxy URL required",
  "longMessage": "Provider domain <domainName> requires a proxy URL. Provider domains must be configured with a proxy.",
  "code": "proxy_url_required_for_provider_domain",
  "meta": {
    "name": "paramname"
  }
}

Email

DevMonthlyEmailLimitExceeded

DevMonthlyEmailLimitExceeded signifies an error when an email sending attempt is made while the development limit has already been reached

Status Code: 400
{
  "shortMessage": "Development monthly email limit exceeded",
  "longMessage": "The monthly limit for email messages in development (%d) has been reached. Please use test emails (https://go.clerk.com/test-emails) instead",
  "code": "dev_monthly_email_limit_exceeded",
  "meta": "{\"DevMonthlyEmailLimit\": limit}"
}
Status Code:
{
  "shortMessage": "Email template customization is locked",
  "longMessage": "Email template customization is locked. Revert to the default template or contact support to regain customization access.",
  "code": "email_template_customization_locked"
}
Status Code: 429
{
  "shortMessage": "Email template customization rate limit exceeded",
  "longMessage": "The email template customization rate limit was exceeded. Please try again later or contact support if you continue to experience issues.",
  "code": "email_template_customization_rate_limited"
}
Status Code: 403
{
  "shortMessage": "Email template update blocked",
  "longMessage": "Email template update blocked",
  "code": "email_template_suspicious_blocked"
}
Status Code: 422
{
  "shortMessage": "No Enterprise Connection for this sign-up",
  "longMessage": "The current sign-up does not have a corresponding Enterprise Connection. Please check the domain of the provided email address.",
  "code": "enterprise_sso_sign_up_connection_missing"
}
Status Code: 403
{
  "shortMessage": "not enabled",
  "longMessage": "This feature is not enabled on this instance",
  "code": "feature_not_enabled"
}
Status Code: 403
{
  "shortMessage": "not enabled",
  "longMessage": "This feature is not enabled on this instance",
  "code": "feature_not_enabled",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 422
{
  "shortMessage": "Email address attribute must be enabled",
  "longMessage": "This feature requires the email address attribute to be enabled. Please enable it in your instance settings to continue.",
  "code": "feature_requires_email_address_enabled"
}
Status Code: 422
{
  "shortMessage": "not an OIDC provider",
  "longMessage": "You are using the legacy OAuth 2.0 provider. Please migrate to the new OIDC compatible provider to use this feature",
  "code": "feature_requires_oidc_provider"
}
Status Code: 422
{
  "shortMessage": "not a Progressive Sign Up instance",
  "longMessage": "<feature> can only be used in instances that migrated to Progressive Sign Up. This feature is deprecated, please contact support if you need assistance.",
  "code": "feature_requires_progressive_sign_up"
}
Status Code: 403
{
  "shortMessage": "not implemented",
  "longMessage": "Feature `<feature>` is not available yet",
  "code": "feature_not_implemented"
}

Forms

FormAlreadyExists

FormAlreadyExists signifies an error when given resource already exists

Status Code: 422
{
  "shortMessage": "",
  "code": "form_already_exists",
  "meta": {
    "name": "param"
  }
}

FormAtLeastOneOptionalParameterMissing

FormAtLeastOneOptionalParameterMissing signifies an error when at least one optional parameter must be provided

Status Code: 422
{
  "shortMessage": "at least one parameter must be provided",
  "longMessage": "at least one of `<parameters>` must be provided",
  "code": "form_param_missing",
  "meta": {
    "names": "paramnames"
  }
}
Status Code: 422
{
  "shortMessage": "Date values must not be in the future.",
  "longMessage": "Date values must not be in the future.",
  "code": "form_disallow_future_date",
  "meta": {
    "name": "param"
  }
}

FormDuplicateParameter

FormDuplicateParameter signifies an error when a duplicate parameter is found in a form

Status Code: 422
{
  "shortMessage": "is duplicate",
  "longMessage": "<param> included multiple times. There should only be one.",
  "code": "form_param_duplicate",
  "meta": {
    "name": "param"
  }
}

FormDuplicateParameterValue

FormDuplicateParameterValue signifies an error when a value has been provided multiple times

Status Code: 422
{
  "shortMessage": "duplicate values",
  "longMessage": "<value> contains duplicate values",
  "code": "form_param_duplicate",
  "meta": {
    "name": "param"
  }
}

FormIdentifierExists

FormIdentifierExists signifies an error when given identifier already exists

Status Code: 422
{
  "shortMessage": "",
  "code": "form_identifier_exists",
  "meta": {
    "name": "param"
  }
}

FormIdentifierExistsWithAnotherAccount

FormIdentifierExistsWithAnotherAccount signifies an error when given identifier already exists. This is used to signal to a user that the identifier, phone number, is already associated with another account and should remove it from the other account.

Status Code: 422
{
  "shortMessage": "",
  "code": "form_identifier_exists",
  "meta": {
    "name": "param"
  }
}

FormIdentifierNotFound

FormIdentifierNotFound signifies an error when a required identifier is not found

Status Code: 422
{
  "shortMessage": "",
  "code": "form_identifier_not_found",
  "meta": {
    "name": "param"
  }
}

FormIncorrectCode

FormIncorrectCode signifies an error when the given code is incorrect

Status Code: 422
{
  "shortMessage": "is incorrect",
  "longMessage": "Incorrect code",
  "code": "form_code_incorrect",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Date values must be given in Unix millisecond timestamp format.",
  "longMessage": "Date values must be given in Unix millisecond timestamp format.",
  "code": "form_param_invalid_date",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<parameter> must be a valid email address.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be a valid email address local part.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidEncodingParameterValue

FormInvalidEncodingParameterValue signifies an error when the given parameter has an invalid encoding

Status Code: 422
{
  "shortMessage": "invalid character encoding",
  "longMessage": "<param> contains invalid UTF-8 characters",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be either a valid email address, a valid phone number according to E.164 international standard or a valid web3 wallet.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidOrigin

FormInvalidOrigin signifies an error when the given origin is http/https

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> must be a valid origin such as my-app://localhost, chrome-extension://mnhbilbfebpbokpjjamapdecdgieldho, or capacitor://localhost:3000",
  "code": "form_invalid_origin",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterFormat

FormInvalidParameterFormat signifies an error when the given parameter has an invalid format

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterFormatBCP47

FormInvalidParameterFormatBCP47 signifies an error when the given parameter does not match the BCP-47 format

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<parameter> must be a valid BCP-47 language tag.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> is invalid. Only one of the following parameter values is allowed: <allowedValues>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterValue

FormInvalidParameterValue signifies an error when the given parameter has an invalid value

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<value> does not match one of the allowed values for parameter <param>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<param> is invalid. Must be not empty",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidParameterValueWithAllowed

FormInvalidParameterValueWithAllowed signifies an error when the given parameter has an invalid value. The difference with FormInvalidParameterValue is that this error also includes the allowed values

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<value> does not match the allowed values for parameter <param>. Allowed values: <allowedValues>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordLengthTooLong

FormInvalidPasswordLengthTooLong signifies an error when the password is invalid because of its length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_length_too_long",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordLengthTooShort

FormInvalidPasswordLengthTooShort signifies an error when the password is invalid because of its length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_length_too_short",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one lowercase character.",
  "longMessage": "Passwords must contain at least one lowercase character.",
  "code": "form_password_no_lowercase",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one number.",
  "longMessage": "Passwords must contain at least one number.",
  "code": "form_password_no_number",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_no_special_char",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Given password is not strong enough.",
  "longMessage": "Given password is not strong enough.",
  "code": "form_password_not_strong_enough"
}
Status Code: 422
{
  "shortMessage": "Passwords must contain at least one uppercase character.",
  "longMessage": "Passwords must contain at least one uppercase character.",
  "code": "form_password_no_uppercase",
  "meta": {
    "name": "param"
  }
}

FormInvalidPasswordSizeInBytesExceeded

FormInvalidPasswordSizeInBytesExceeded signifies that the size in bytes was exceeded. Note that the maximum character length constraint may fail to detect this case, if multi-byte characters are included in the password. For example, bcrypt limit https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.8.0:bcrypt/bcrypt.go;l=87

Status Code: 422
{
  "shortMessage": "Your password is too long. Please use a shorter one.",
  "longMessage": "Your password is too long. Please use a shorter one.",
  "code": "form_password_size_in_bytes_exceeded",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<parameter> must be a valid phone number according to E.164 international standard.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "invalid format",
  "longMessage": "<param> must contain a datetime specified in RFC3339 format (e.g. `2022-10-20T10:00:27.645Z`).",
  "code": "form_param_invalid_time",
  "meta": {
    "name": "param"
  }
}

FormInvalidTypeParameter

FormInvalidTypeParameter signifies an error when a form parameter has the wrong type

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "`<param>` must be a `<paramType>`.",
  "code": "form_param_type_invalid",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameCharacter

FormInvalidUsernameCharacter signifies an error when the given username does not match username regex

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_invalid_character",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameLength

FormInvalidUsernameLength signifies an error when the given username does not have required length

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_invalid_length",
  "meta": {
    "name": "param"
  }
}

FormInvalidUsernameNeedsNonNumberCharCode

FormInvalidUsernameNeedsNonNumberCharCode signifies an error when the given username does not match username regex

Status Code: 422
{
  "shortMessage": "",
  "code": "form_username_needs_non_number_char",
  "meta": {
    "name": "param"
  }
}

FormInvalidWeb3WalletAddress

FormInvalidWeb3WalletAddress signifies an error when the given web3 wallet address is invalid

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<parameter> must be a valid web3 wallet address.",
  "code": "form_param_format_invalid",
  "meta": {
    "name": "param"
  }
}

FormMetadataInvalidType

FormMetadataInvalidType signifies an error when the given metadata is not a valid key-value object

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "param"
  }
}

FormMissingConditionalParameter

FormMissingConditionalParameter signifies an error when required parameter based on conditions is missing

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "`<param>` is required when `<leftCondition>` is `<rightCondition>`.",
  "code": "form_conditional_param_missing"
}

FormMissingConditionalParameterOnExistence

FormMissingConditionalParameterOnExistence signifies an error when parameter is required because of the existence of another

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "`<missingParam>` is required when `<conditionalParam>` is present.",
  "code": "form_conditional_param_missing",
  "meta": {
    "name": "missingparam"
  }
}

FormMissingParameter

FormMissingParameter signifies an error when an expected form parameter is missing

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "<param> must be included.",
  "code": "form_param_missing",
  "meta": {
    "name": "param"
  }
}

FormMissingResource

FormMissingResource signifies an error when the form parameter is referring to a missing resource

Status Code: 422
{
  "shortMessage": "is missing",
  "longMessage": "The resource associated with the supplied <param> was not found.",
  "code": "form_resource_not_found",
  "meta": {
    "name": "param"
  }
}

FormNilParameter

FormNilParameter signifies an error when a nil parameter is found in a form

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_nil",
  "meta": {
    "name": "param"
  }
}

FormNotAllowedToDisableDefaultSecondFactor

FormNotAllowedToDisableDefaultSecondFactor signifies an error when trying to disable the default flag from a second-factor

Status Code: 422
{
  "shortMessage": "The default second factor method can only be changed by assigning another method as the default.",
  "longMessage": "The default second factor method can only be changed by assigning another method as the default.",
  "code": "form_disable_default_second_factor_not_allowed",
  "meta": {
    "name": "param"
  }
}

FormParameterArrayLengthMismatch

FormParameterArrayLengthMismatch signifies an error when a parallel array parameter does not have the same number of items as the array it qualifies.

Status Code: 422
{
  "shortMessage": "length mismatch",
  "longMessage": "<parameter> must contain exactly one item for each item in <otherParam>.",
  "code": "form_param_array_length_mismatch",
  "meta": {
    "name": "param"
  }
}

FormParameterArraySizeExceeded

FormParameterArraySizeExceeded signifies an error when the given array exceeds the maximum allowed size

Status Code: 422
{
  "shortMessage": "exceeds maximum size",
  "longMessage": "<parameter> should not exceed %d items.",
  "code": "form_param_array_size_exceeded",
  "meta": {
    "name": "param"
  }
}

FormParameterDeprecated

FormParameterDeprecated signifies an error when a form parameter has been deprecated and is no longer accepted by the endpoint. The resolution argument can describe the recommended replacement (e.g. a different endpoint) and is appended to the long message when non-empty.

Status Code: 422
{
  "shortMessage": "is deprecated",
  "longMessage": "is deprecated",
  "code": "form_param_deprecated",
  "meta": {
    "name": "param"
  }
}

FormParameterMaxLengthExceeded

FormParameterMaxLengthExceeded signifies an error when the given param value exceeds the maximum allowed length

Status Code: 422
{
  "shortMessage": "exceeds maximum length",
  "longMessage": "<parameter> should not exceed %d characters.",
  "code": "form_param_max_length_exceeded",
  "meta": {
    "name": "param"
  }
}

FormParameterMinLengthExceeded

FormParameterMinLengthExceeded signifies an error when the given param value is less than the minimum allowed length

Status Code: 422
{
  "shortMessage": "does not reach minimum length",
  "longMessage": "<parameter> must be at least %d characters long.",
  "code": "form_param_min_length_exceeded",
  "meta": {
    "name": "param"
  }
}

FormParameterNotAllowedConditionally

FormParameterNotAllowedConditionally signifies an error when parameter is not allowed based on condition

Status Code: 422
{
  "shortMessage": "is not allowed",
  "longMessage": "`<param>` isn't allowed when `<leftCondition>` is <rightCondition>.",
  "code": "form_conditional_param_disallowed",
  "meta": {
    "name": "param"
  }
}

FormParameterNotAllowedIfAnotherParameterIsPresent

FormParameterNotAllowedIfAnotherParameterIsPresent signifies an error when a parameter is present but is not allowed because another parameter is also present

Status Code: 422
{
  "shortMessage": "is not allowed",
  "longMessage": "`<notAllowedParam>` isn't allowed when `<existingParam>` is present.",
  "code": "form_conditional_param_disallowed",
  "meta": {
    "name": "notallowedparam"
  }
}

FormParameterSizeTooLarge

FormParameterSizeTooLarge signifies an error when a parameter exceeds the max allowed size

Status Code: 422
{
  "shortMessage": "",
  "code": "form_param_exceeds_allowed_size",
  "meta": {
    "name": "param"
  }
}

FormParameterValueConflict

FormParameterValueConflict signifies an error when two parameters that name the same underlying value — typically a legacy name and the name that replaces it — are both present but carry different values.

Either name is accepted on its own and both may be sent together as long as they agree, so this is a conflict between the two values rather than one parameter disallowing the other. Use [FormParameterNotAllowedIfAnotherParameterIsPresent] for that case.

Status Code: 422
{
  "shortMessage": "conflicting values",
  "longMessage": "`<param>` and `<otherParam>` refer to the same value, so they must match when both are sent.",
  "code": "form_param_value_conflict",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "Value too large",
  "longMessage": "The value of <param> can't be greater than %d",
  "code": "form_param_value_too_large",
  "meta": {
    "name": "param"
  }
}

FormPasswordDigestInvalid

FormPasswordDigestInvalid signifies an error when the provided password_digest is not valid for the provided password_hasher

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_digest_invalid_code",
  "meta": {
    "name": "param"
  }
}

FormPasswordMatchesIdentifier

FormPasswordMatchesIdentifier signifies an error when the chosen password is identical to one of the account's identifiers (email address, phone number or username).

Status Code: 422
{
  "shortMessage": "Password cannot match your email address, phone number or username. For account safety, please use a different password.",
  "longMessage": "Password cannot match your email address, phone number or username. For account safety, please use a different password.",
  "code": "form_password_matches_identifier",
  "meta": {
    "name": "param"
  }
}

FormPasswordValidationFailed

FormPasswordValidationFailed signifies a generic error when the password validation failed

Status Code: 422
{
  "shortMessage": "Incorrect password. Please try again.",
  "longMessage": "Incorrect password. Please try again.",
  "code": "form_password_validation_failed",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "PKCE is required for OAuth clients without a secret",
  "code": "form_public_client_requires_pkce",
  "meta": {
    "name": "param"
  }
}

FormPwnedPassword

FormPwnedPassword signifies an error when the chosen password has been found in the pwned list

Status Code: 422
{
  "shortMessage": "",
  "code": "form_password_pwned",
  "meta": {
    "name": "param"
  }
}

FormUnknownParameter

FormUnknownParameter signifies an error when an unexpected parameter is found in a form

Status Code: 422
{
  "shortMessage": "is unknown",
  "longMessage": "<param> is not a valid parameter for this request.",
  "code": "form_param_unknown",
  "meta": {
    "name": "param"
  }
}

FormUnknownParameterDueToDisabledFeature

FormUnknownParameterDueToDisabledFeature signifies an error when an unexpected parameter is found in a form due to a disabled feature

Status Code: 422
{
  "shortMessage": "is unknown",
  "longMessage": "<param> is not a valid parameter for this request.<possibleResolution>",
  "code": "form_param_unknown",
  "meta": {
    "name": "param"
  }
}

FormUnverifiedIdentification

FormUnverifiedIdentification signifies an error when the identification included in the form is unverified

Status Code: 422
{
  "shortMessage": "is unverified",
  "longMessage": "This identification needs to be verified before you can perform this action.",
  "code": "form_verification_needed",
  "meta": {
    "name": "param"
  }
}

FormUsernameCannotBePhoneNumber

FormUsernameCannotBePhoneNumber signifies an error when the given username is in canonical E.164 phone-number format. This is rejected regardless of the configured username character set so that the value remains reserved for the phone-number identifier and avoids ambiguity at sign-in.

Status Code: 422
{
  "shortMessage": "",
  "longMessage": "<parameter> cannot be a phone number. Please choose a different username.",
  "code": "form_username_cannot_be_phone_number",
  "meta": {
    "name": "param"
  }
}

FormValidationFailed

FormValidationFailed converts validator.ValidationErrors to Error.

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "<sanitizedField> is invalid",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "sanitizedfield"
  }
}
Status Code: 403
{
  "shortMessage": "Action blocked",
  "longMessage": "This action was detected as suspicious and has been blocked. If you believe this was a mistake, please contact support.",
  "code": "action_blocked"
}
Status Code: 403
{
  "shortMessage": "Protect check required",
  "longMessage": "A Protect check is required before this action can continue.",
  "code": "requires_protect_check",
  "meta": {
    "protect_check": "protectcheck"
  }
}

Home Url

HomeURLTaken

HomeURLTaken signifies an error when the root domain of the provided home_url already in use by another application

Status Code: 422
{
  "shortMessage": "Domain already in use",
  "longMessage": "The <homeURL> root domain is already in use by another application.",
  "code": "home_url_taken",
  "meta": {
    "name": "paramname"
  }
}

HomeURLTakenByProvider

HomeURLTakenByProvider signifies an error when the root domain of the provided home_url is already used by a provider-managed app.

Status Code: 422
{
  "shortMessage": "",
  "longMessage": "The <homeURL> root domain is already in use by a <providerName> app. Delete the <providerName> app or contact <providerName> support to remove the domain before using it in Clerk.",
  "code": "home_url_taken",
  "meta": {
    "name": "paramname"
  }
}

KnownHostingDomain

KnownHostingDomain signifies an error when the domain extracted from the provided home_url belongs to a known hosting service and cannot be used to deploy production apps

Status Code: 422
{
  "shortMessage": "Known hosting domain",
  "longMessage": "The <domain> domain cannot be used to deploy production apps.",
  "code": "known_hosting_domain",
  "meta": {
    "name": "paramname"
  }
}

ReservedDomain

ReservedDomain signifies an error when the domain extracted from the provided home_url is reserved by Clerk

Status Code: 422
{
  "shortMessage": "Domain reserved by Clerk",
  "longMessage": "The <domain> domain is reserved by Clerk.",
  "code": "reserved_domain",
  "meta": {
    "name": "paramname"
  }
}

ReservedSubdomain

ReservedSubdomain signifies an error when the subdomain extracted from the provided home_url is reserved by Clerk

Status Code: 422
{
  "shortMessage": "Reserved subdomain",
  "longMessage": "The <subdomain> subdomain is reserved by Clerk.",
  "code": "reserved_subdomain",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 400
{
  "shortMessage": "Create failed",
  "longMessage": "Unverified identifications cannot be a second factor",
  "code": "identification_create_second_factor_unverified"
}

IdentificationNotFound

IdentificationNotFound signifies an error when comm is not found

Status Code: 404
{
  "shortMessage": "Resource not found",
  "longMessage": "Resource not found",
  "code": "resource_not_found"
}

LastIdentificationDeletionFailed

LastIdentificationDeletionFailed signifies an error when trying to delete the last identification associated with a user

Status Code: 400
{
  "shortMessage": "Deletion failed",
  "longMessage": "You cannot delete your last identification.",
  "code": "identification_deletion_failed"
}
Status Code: 400
{
  "shortMessage": "Update failed",
  "longMessage": "You cannot set your last identification as second factor.",
  "code": "identification_update_failed"
}
Status Code: 400
{
  "shortMessage": "",
  "longMessage": "You are required to maintain at least one <sanitizedIdentType> in your account at all times",
  "code": "last_required_identification_deletion_failed"
}
Status Code: 400
{
  "shortMessage": "Update failed",
  "longMessage": "Cannot update second factor attributes for unverified identification",
  "code": "identification_update_second_factor_unverified"
}
Status Code: 400
{
  "shortMessage": "Image decode error",
  "longMessage": "The image could not be decoded. Please ensure the image is valid and try again.",
  "code": "request_body_invalid"
}
Status Code: 404
{
  "shortMessage": "Image not found",
  "longMessage": "Image not found",
  "code": "image_not_found"
}

ImageTooLarge

ImageTooLarge signifies an error when the image being uploaded is too large to handle.

Status Code: 413
{
  "shortMessage": "Image too large",
  "longMessage": "The image being uploaded is more than 10MB. Please choose a smaller one.",
  "code": "image_too_large"
}
Status Code: 400
{
  "shortMessage": "Unsupported image type",
  "longMessage": "'<imageType>' images are not currently supported. Please consult the API documentation for more information.",
  "code": "request_body_invalid"
}

RequestWithoutImage

RequestWithoutImage signifies an error when no image was present in the request.

Status Code: 400
{
  "shortMessage": "Image file missing",
  "longMessage": "There was no image file present in the request",
  "code": "form_param_missing"
}
Status Code: 422
{
  "shortMessage": "Impersonation limit exceeded",
  "longMessage": "Your application has reached the impersonation limit for your plan (%d/%d). The limit will reset at the beginning of the next billing period.",
  "code": "impersonation_limit_exceeded",
  "meta": "{\"Limit\": limit, \"Used\": used}"
}

Instance Keys

InstanceKeyRequired

InstanceKeyRequired signifies an error when no instance keys exist

Status Code: 400
{
  "shortMessage": "Key required",
  "longMessage": "Please generate at least one instance key",
  "code": "instance_key_required"
}
Status Code: 422
{
  "shortMessage": "is not allowed",
  "longMessage": "`<param>` isn't allowed to be set for this instance",
  "code": "disabled_instance_restriction",
  "meta": {
    "name": "param"
  }
}

Instances

BreaksInstanceInvariant

BreaksInstanceInvariantCode

Status Code: 400
{
  "shortMessage": "Breaks instance invariant",
  "longMessage": "%v - This invariant is determined by your user settings",
  "code": "breaks_instance_invariant"
}

InstanceNotFound

InstanceNotFound signifies an error when no instance with given instanceID was found

Status Code: 404
{
  "shortMessage": "Instance not found",
  "longMessage": "No instance was found with id <instanceID>",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "Bad request",
  "longMessage": "Bad request",
  "code": "bad_request"
}
Status Code: 400
{
  "shortMessage": "",
  "code": "bad_request"
}

Conflict

409 - conflict. This apierror provides very little context and should likely be avoided for errors that will be customer- or end-user-facing. For lock errors, consider instead ResourceBusy().

Status Code: 409
{
  "shortMessage": "Conflict",
  "longMessage": "Conflict",
  "code": "conflict"
}

QuotaExceeded

403 - quota exceeded

Status Code: 403
{
  "shortMessage": "Quota exceeded",
  "longMessage": "Quota exceeded, you have reached your limit.",
  "code": "quota_exceeded"
}

ResourceBusy

409 - resource locked

Status Code: 409
{
  "shortMessage": "resource busy",
  "longMessage": "This resource is currently being modified by another request. Please try again.",
  "code": "resource_locked"
}

ServiceUnavailable

503 - service unavailable Unwraps the error chain to check if an API error was wrapped, and returns that instead of creating a 503 error

Status Code: 503
{
  "shortMessage": "Service unavailable",
  "longMessage": "Service unavailable",
  "code": "service_unavailable"
}

Unexpected

Unexpected is used for all unexpected errors It unwraps the error chain to check if an API error was wrapped, and returns that instead of creating a 500 error

Status Code: 500
{
  "shortMessage": "Oops, an unexpected error occurred",
  "longMessage": "There was an internal error on our servers. We've been notified and are working on fixing it.",
  "code": "internal_clerk_error"
}

Invitations

DuplicateInvitations

DuplicateInvitations denotes an error when there are already invitations for the given email addresses

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "There are already pending invitations for the following email addresses: <emails>",
  "code": "duplicate_record",
  "meta": {
    "emailaddresses": "emailaddresses"
  }
}

InvitationAlreadyAccepted

InvitationAlreadyAccepted denotes an error when someone tries to use an invitation which is already accepted.

Status Code: 400
{
  "shortMessage": "Invitation is already accepted, try signing in instead.",
  "longMessage": "Invitation is already accepted, try signing in instead.",
  "code": "invitation_already_accepted"
}

InvitationAlreadyRevoked

InvitationAlreadyRevoked denotes an error when someone tries to revoke an invitation which is already revoked.

Status Code: 400
{
  "shortMessage": "Invitation is already revoked.",
  "longMessage": "Invitation is already revoked.",
  "code": "invitation_already_revoked"
}

InvitationNotFound

InvitationNotFound denotes an error when there is no invitation with the given id

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No invitation was found with id <invitationID>.",
  "code": "resource_not_found"
}

InvitationsNotSupportedInInstance

InvitationsNotSupportedInInstance denotes an error when user is trying to create an invitation on an instance that doesn't support it

Status Code: 400
{
  "shortMessage": "Invitations are only supported on instances that accept email addresses.",
  "longMessage": "Invitations are only supported on instances that accept email addresses.",
  "code": "invitations_not_supported"
}

RevokedInvitation

RevokedInvitation denotes an error when the given invitation token does not correspond to any invitations, which means that the invitation has been removed.

Status Code: 400
{
  "shortMessage": "The invitation was revoked.",
  "longMessage": "The invitation was revoked.",
  "code": "revoked_invitation"
}

Jwt Templates

JWTTemplateNotFound

JWTTemplateNotFound signifies an error when a JWT template was not found by the provided attribute

Status Code: 404
{
  "shortMessage": "JWT template not found",
  "longMessage": "No JWT template exists with <attribute>: <val>",
  "code": "resource_not_found"
}

JWTTemplateReservedClaim

JWTTemplateReservedClaim denotes an error when the provided template contains a reserved claim.

Status Code: 400
{
  "shortMessage": "reserved claim used",
  "longMessage": "You can't use the reserved claim: '<claim>'",
  "code": "jwt_template_reserved_claim",
  "meta": {
    "name": "param"
  }
}
Status Code: 403
{
  "shortMessage": "session token template cannot be deleted",
  "longMessage": "This template cannot be deleted because it's a session token template",
  "code": "session_token_jwt_template"
}

Log Drains

LogDrainConfigInvalidStateTransition

LogDrainConfigInvalidStateTransition returns a 409 error indicating the requested lifecycle action is not legal from the log drain's current state (e.g. pausing a drain that is not active). The from/to are state names.

Status Code: 409
{
  "shortMessage": "Invalid log drain state transition",
  "longMessage": "A log drain in the %q state cannot transition to %q.",
  "code": "log_drain_config_invalid_state_transition"
}

Machine Token

MachineTokenReservedClaim

MachineTokenReservedClaim denotes an error when the provided machine token claims object contains a reserved claim.

Status Code: 400
{
  "shortMessage": "reserved claim used",
  "longMessage": "You can't use the reserved claim: '<claim>'",
  "code": "machine_token_reserved_claim",
  "meta": {
    "name": "param"
  }
}

Network

GatewayTimeout

GatewayTimeout signifies an error when a 3rd party service takes too long to respond.

Status Code: 504
{
  "shortMessage": "Gateway Timeout",
  "longMessage": "A request to a 3rd party service timed out",
  "code": "gateway_timeout"
}
Status Code: 422
{
  "shortMessage": "custom OAuth provider cannot use discovery URL",
  "longMessage": "The custom OAuth provider cannot use the discovery URL. Please provide the necessary configuration manually.",
  "code": "custom_oauth_provider_cannot_use_discovery_url",
  "meta": {
    "name": "discovery_url"
  }
}
Status Code: 422
{
  "shortMessage": "issuer mismatch in custom OAuth provider discovery URL",
  "longMessage": "The issuer in the discovery URL (<url>) does not match the issuer returned in the configuration (<issuer>).",
  "code": "custom_oauth_provider_discovery_issuer_mismatch",
  "meta": {
    "name": "discovery_url"
  }
}
Status Code: 422
{
  "shortMessage": "error retrieving OAuth response from provider's discovery URL",
  "longMessage": "An error was encountered when attempting to retrieve metadata from the oauth url %q: %q",
  "code": "custom_oauth_provider_discovery_server_retrieval_error",
  "meta": {
    "name": "discovery_url"
  }
}

ExternalAccountEmailAddressVerificationRequired

ExternalAccountEmailAddressVerificationRequired signifies an error when the external account requires email address verification

Status Code: 400
{
  "shortMessage": "Email address verification required",
  "longMessage": "Your associated email address is required to be verified, because it was initially created as unverified.",
  "code": "external_account_email_address_verification_required"
}
Status Code: 400
{
  "shortMessage": "Missing refresh token",
  "longMessage": "We cannot refresh your OAuth access token because the server didn't provide a refresh token. Please re-connect your account.",
  "code": "external_account_missing_refresh_token"
}

ExternalAccountNotFound

ExternalAccountNotFound signifies an error when the external account of the oauth callback is not found NOTE: This legacy error message and code is misleading. We also throw this error in transfer flows where an external account was created, but no corresponding user has yet been created.

Status Code: 404
{
  "shortMessage": "Invalid external account",
  "longMessage": "The External Account was not found.",
  "code": "external_account_not_found"
}
Status Code: 422
{
  "shortMessage": "Missing OAuth access token",
  "longMessage": "OAuth access token is missing",
  "code": "oauth_missing_access_token"
}
Status Code: 422
{
  "shortMessage": "Cannot refresh OAuth access token",
  "longMessage": "The current access token has expired and we cannot refresh it, because the authorization server hasn't provided us with a refresh token",
  "code": "oauth_missing_refresh_token"
}

OAuthSharedCredentialsStoredTokenNotRetrievable

OAuthSharedCredentialsStoredTokenNotRetrievable signifies an error when a caller attempts to retrieve a stored provider access token that was minted with Clerk's shared development OAuth credentials, even though the provider now uses custom credentials. The stored token cannot be exposed; the account must be reconnected to reissue a token under the custom credentials.

Status Code: 400
{
  "shortMessage": "Stored access token not retrievable",
  "longMessage": "This account's OAuth access token was issued with Clerk's shared development credentials and cannot be retrieved. Reconnect the account to reissue a token under your own OAuth credentials.",
  "code": "oauth_shared_credentials_stored_token_not_retrievable"
}

OAuthSharedCredentialsTokenRetrievalNotSupported

OAuthSharedCredentialsTokenRetrievalNotSupported signifies an error when a caller attempts to retrieve a provider access token while the provider is currently configured to use Clerk's shared development OAuth credentials. Retrieving raw provider tokens is only supported for custom OAuth credentials.

Status Code: 400
{
  "shortMessage": "Access token retrieval not supported with shared credentials",
  "longMessage": "Retrieving the OAuth access token is not supported while using Clerk's shared development credentials. Configure custom OAuth credentials for this provider to retrieve access tokens.",
  "code": "oauth_shared_credentials_token_retrieval_not_supported"
}
Status Code: 404
{
  "shortMessage": "OAuth provider not enabled",
  "longMessage": "Single-sign on for this OAuth provider is not enabled in the instance settings.",
  "code": "oauth_token_provider_not_enabled"
}
Status Code: 400
{
  "shortMessage": "Token retrieval failed",
  "longMessage": "Failed to retrieve a new access token from the OAuth provider",
  "code": "oauth_token_retrieval_error"
}

UnsupportedOauthProvider

UnsupportedOauthProvider signifies an error when an instance tries to enable an OAuth external provider which is not supported.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "%v OAuth is not supported. Please contact us if you think this error should not appear.",
  "code": "oauth_unsupported_provider"
}
Status Code: 400
{
  "shortMessage": "duplicate redirect URI",
  "longMessage": "the redirect URI already exists",
  "code": "duplicate_record"
}
Status Code: 422
{
  "shortMessage": "consent screen cannot be disabled",
  "longMessage": "Consent screen cannot be disabled for a dynamically registered OAuth Application",
  "code": "oauth_application_consent_screen_cannot_be_disabled"
}
Status Code: 422
{
  "shortMessage": "consent screen requires a consent path",
  "longMessage": "consent screen requires a consent path",
  "code": "oauth_application_consent_screen_requires_consent_path"
}

Organizations

AlreadyAMemberOfOrganization

400 - User with given identifier is already a member of the organization and cannot be added again

Status Code: 400
{
  "shortMessage": "already a member",
  "longMessage": "<user> is already a member of the organization.",
  "code": "already_a_member_in_organization"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Default organization role not found",
  "code": "resource_not_found"
}

ExclusiveOrganizationMembership

422 - Returned when a user cannot join (or be added to) an organization because either the user already belongs to an exclusive organization or the target organization is exclusive and the user has other memberships.

Status Code: 422
{
  "shortMessage": "exclusive organization membership",
  "longMessage": "User cannot belong to multiple organizations because exclusive membership is enabled.",
  "code": "exclusive_organization_membership"
}

ExclusiveOrganizationMembershipExistingMembers

422 - Returned when enabling exclusive_membership on an organization is rejected because the organization already has members who belong to other organizations in the same instance. Enabling the flag would retroactively violate the invariant for those pre-existing members, so the flip is denied.

Status Code: 422
{
  "shortMessage": "exclusive organization membership cannot be enabled",
  "longMessage": "Exclusive membership cannot be enabled because existing members of this organization belong to other organizations. Remove their other memberships before enabling exclusive membership.",
  "code": "exclusive_organization_membership_existing_members"
}
Status Code: 422
{
  "shortMessage": "not allowed",
  "longMessage": "`force_organization_selection` cannot be enabled when organizations are disabled. Please enable organizations first.",
  "code": "force_organization_selection_not_allowed_when_organizations_disabled"
}
Status Code: 403
{
  "shortMessage": "missing permission",
  "longMessage": "Current user is missing an organization permission.",
  "code": "missing_organization_permission",
  "meta": {
    "permissions": "permissions"
  }
}

NotAMemberInOrganization

403 - Only for organization members Deprecated: This error reveals the existence of an organization to an unauthorized user. Use OrganizationNotFoundOrUnauthorized instead, and ensure other pathways that error when the organization isn't found also use OrganizationNotFoundOrUnauthorized

Status Code: 403
{
  "shortMessage": "not a member",
  "longMessage": "Current user is not a member of the organization. Only organization members can perform this action.",
  "code": "not_a_member_in_organization"
}
Status Code: 422
{
  "shortMessage": "this organization already has an SSO connection",
  "longMessage": "This organization already has an SSO connection.",
  "code": "organization_already_has_sso_connection",
  "meta": {
    "name": "organization_id"
  }
}

OrganizationCreatorNotFound

400 - Creator doesn't exist

Status Code: 400
{
  "shortMessage": "creator not found",
  "longMessage": "No users found with id <userID>.",
  "code": "organization_creator_not_found"
}
Status Code: 422
{
  "shortMessage": "organizaton domain already exists",
  "longMessage": "This domain is already used by another organization.",
  "code": "organization_domain_already_exists",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "organization domain already exists",
  "longMessage": "This domain is already used by your organization.",
  "code": "organization_domain_already_exists_same_organization",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "blocked email domain",
  "longMessage": "This is a blocked email provider domain. Please use a different one.",
  "code": "organization_domain_blocked",
  "meta": {
    "name": "param"
  }
}
Status Code: 422
{
  "shortMessage": "common email domain",
  "longMessage": "This is a common email provider domain. Please use a different one.",
  "code": "organization_domain_common",
  "meta": {
    "name": "param"
  }
}
Status Code: 403
{
  "shortMessage": "organization enrollment mode not enabled",
  "longMessage": "Enrollment mode <enrollmentMode> is not enabled for this instances's organizations.",
  "code": "organization_domain_enrollment_mode_not_enabled"
}
Status Code: 422
{
  "shortMessage": "domain used for organization enrollment",
  "longMessage": "This domain is already used for organization enrollment with verified domains. Please use a different one.",
  "code": "organization_domain_exists_for_enrollment"
}
Status Code: 422
{
  "shortMessage": "domain exists for an organization enterprise connection",
  "longMessage": "This domain is already used for your organization’s SSO. Please use a different one.",
  "code": "organization_domain_exists_for_enterprise_connection"
}
Status Code: 403
{
  "shortMessage": "organization domains quota exceeded",
  "longMessage": "You have reached your limit of %d domains per organization.",
  "code": "organization_domain_quota_exceeded"
}
Status Code: 403
{
  "shortMessage": "organization domains not enabled",
  "longMessage": "This instance does not have domains enabled for organizations.",
  "code": "organization_domains_not_enabled"
}
Status Code: 403
{
  "shortMessage": "organization role sets for instance quota exceeded",
  "longMessage": "You have reached your limit of %d organization role sets per instance.",
  "code": "organization_instance_role_sets_quota_exceeded"
}
Status Code: 403
{
  "shortMessage": "organization roles for instance quota exceeded",
  "longMessage": "You have reached your limit of %d organization roles per instance.",
  "code": "organization_instance_roles_quota_exceeded"
}
Status Code: 400
{
  "shortMessage": "invitation has already been accepted",
  "longMessage": "This invitation has already been accepted. Sign in instead.",
  "code": "organization_invitation_already_accepted"
}

OrganizationInvitationNotPending

404 - Invitation is not pending.

Status Code: 404
{
  "shortMessage": "not pending",
  "longMessage": "The organization invitation is not in the 'pending' status.",
  "code": "organization_invitation_not_pending"
}
Status Code: 400
{
  "shortMessage": "organization invitation not unique",
  "longMessage": "Organizations cannot have duplicate pending invitations for an email address.",
  "code": "organization_invitation_not_unique"
}
Status Code: 400
{
  "shortMessage": "invitation has been revoked",
  "longMessage": "This invitation has been revoked and cannot be used anymore.",
  "code": "organization_invitation_revoked_code"
}

OrganizationMemberLimitManagedByBilling

OrganizationMemberLimitManagedByBilling returns an error when trying to update the member limit for an organization that is on a seat-based billing plan

Status Code: 400
{
  "shortMessage": "member limit managed by Billing",
  "longMessage": "This organization's member limit is managed by their subscription. It cannot be edited directly.",
  "code": "organization_member_limit_managed_by_billing",
  "meta": {
    "name": "max_allowed_memberships"
  }
}
Status Code: 403
{
  "shortMessage": "organization membership quota exceeded",
  "longMessage": "You have reached your limit of %d organization memberships, including outstanding invitations.",
  "code": "organization_membership_quota_exceeded"
}
Status Code: 403
{
  "shortMessage": "organization membership quota exceeded for sso per org",
  "longMessage": "The organization you are trying to join is full. Please contact support.",
  "code": "organization_membership_quota_exceeded_for_sso"
}
Status Code: 409
{
  "shortMessage": "membership role managed by directory sync",
  "longMessage": "This membership is managed by a directory and cannot be changed manually.",
  "code": "organization_membership_managed_by_scim"
}
Status Code: 400
{
  "shortMessage": "minimum organization permissions needed",
  "longMessage": "There has to be at least one organization member with the minimum required permissions",
  "code": "organization_minimum_permissions_needed"
}
Status Code: 422
{
  "shortMessage": "missing permissions for creator role",
  "longMessage": "The creator role must contain the following permissions: <permissionKeys>",
  "code": "organization_missing_creator_role_permissions"
}
Status Code: 422
{
  "shortMessage": "invalid organization name",
  "longMessage": "The organization name %q is invalid: <name>",
  "code": "form_param_value_invalid",
  "meta": {
    "name": "name"
  }
}
Status Code: 403
{
  "shortMessage": "access denied",
  "longMessage": "The organizations feature is not enabled for this instance. You can enable it at https://dashboard.clerk.com.",
  "code": "organization_not_enabled_in_instance"
}

OrganizationNotFound

404 - Organization not found WARNING: This is safe to use for endpoints where the caller is authorized to be aware of every organization. But if the endpoint errors if the caller is not authorized on the organization, do not use this, because it leaks the existence of the organization! Use OrganizationNotFoundOrUnauthorized instead.

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Given organization not found.",
  "code": "resource_not_found"
}

OrganizationNotFoundOrUnauthorized

404 - Used for any case

Status Code: 404
{
  "shortMessage": "not found or unauthorized",
  "longMessage": "Given organization not found, or you don't have permission to access the organization",
  "code": "organization_not_found_or_unauthorized"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Organization permission not found",
  "code": "resource_not_found"
}
Status Code: 403
{
  "shortMessage": "organization quota exceeded",
  "longMessage": "You have reached your limit of %d organizations. You can remove the organization limit by upgrading to a paid plan or using a production instance.",
  "code": "organization_quota_exceeded"
}
Status Code: 422
{
  "shortMessage": "role is assigned to organization members",
  "longMessage": "The organization role is currently assigned to one or more organization members.",
  "code": "organization_role_assigned_members"
}
Status Code: 422
{
  "shortMessage": "role exists in pending organization invitations",
  "longMessage": "The organization role exists in one or more pending organization invitations. Please revoke these invitations to proceed.",
  "code": "organization_role_exists_in_invitations"
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Organization role not found",
  "code": "resource_not_found",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 422
{
  "shortMessage": "role is assigned to users",
  "longMessage": "The role <roleKey> is assigned to one or more users. Please re-assign the role to the users to proceed.",
  "code": "organization_role_on_set_assigned_to_user",
  "meta": {
    "rolekey": "rolekey"
  }
}
Status Code: 409
{
  "shortMessage": "permission already assigned to role",
  "longMessage": "This organization permission is already associated to this organization role.",
  "code": "organization_role_permission_association_exists"
}
Status Code: 404
{
  "shortMessage": "permission not assigned to role",
  "longMessage": "This organization permission is not associated with the organization role.",
  "code": "organization_role_permission_association_not_found"
}
Status Code: 422
{
  "shortMessage": "contact support",
  "longMessage": "This reassignment affects %d memberships, contact support to complete this operation",
  "code": "organization_role_set_reassignment_contact_support"
}
Status Code: 422
{
  "shortMessage": "reassignment mappings invalid",
  "longMessage": "The role <roleKey> is invalid in the reassignment mappings. It must be present in the new role set.",
  "code": "organization_role_set_reassignment_mappings_invalid",
  "meta": {
    "rolekey": "rolekey"
  }
}
Status Code: 422
{
  "shortMessage": "reassignment mappings missing",
  "longMessage": "The following roles are missing from the reassignment mappings: %s",
  "code": "organization_role_set_reassignment_mappings_missing",
  "meta": {
    "rolekeys": "rolekeys"
  }
}
Status Code: 422
{
  "shortMessage": "role is used as the creator role",
  "longMessage": "The organization role cannot be deleted as it is currently used as the creator role.",
  "code": "organization_role_default_creator_role"
}
Status Code: 422
{
  "shortMessage": "role is used as the domain default role",
  "longMessage": "The organization role cannot be deleted as it is currently used as the default domain role.",
  "code": "organization_role_domain_default_role"
}

OrganizationsCannotBeEnabled

403 - Organizations cannot be enabled for this workspace.

Status Code: 403
{
  "shortMessage": "Organizations cannot be enabled for this workspace.",
  "longMessage": "Organizations cannot be enabled for this workspace.",
  "code": "organizations_cannot_be_enabled"
}
Status Code: 400
{
  "shortMessage": "cannot disable organizations",
  "longMessage": "Cannot disable organizations because <reason>.",
  "code": "organizations_disable_not_allowed"
}
Status Code: 403
{
  "shortMessage": "organization slugs not enabled",
  "longMessage": "This instance does not have slugs enabled for organizations.",
  "code": "organization_slugs_disabled"
}
Status Code: 403
{
  "shortMessage": "organization system permission cannot be modified",
  "longMessage": "This organization permission cannot be modified because it is a system permission.",
  "code": "organization_system_permission_not_modifiable"
}

OrgCreationLimitExceededError

403 - Organization Creation Limit Exceeded

Status Code: 403
{
  "shortMessage": "Organization Creation Limit Exceeded",
  "longMessage": "You have exceeded the maximum number of organizations you can create.",
  "code": "org_creation_limit_exceeded"
}
Status Code: 422
{
  "shortMessage": "personal accounts are not allowed",
  "longMessage": "You must maintain at least one organization membership since personal accounts are not allowed on the application",
  "code": "personal_accounts_not_allowed"
}
Status Code: 409
{
  "shortMessage": "migration in progress",
  "longMessage": "Cannot modify role set while role reassignment is in progress. Please wait for the migration to complete.",
  "code": "role_migration_in_progress"
}
Status Code: 404
{
  "shortMessage": "not registered",
  "longMessage": "Passkey is not registered.",
  "code": "passkey_not_registered"
}

Platform

PlatformAPIAuthStrategyNotAllowed

PlatformAPIAuthStrategyNotAllowed signifies that the endpoint does not accept the authentication strategy used for the request.

Status Code: 403
{
  "shortMessage": "Authentication method not allowed",
  "longMessage": "This endpoint does not accept the credential type used. Use an authentication method allowed for this operation.",
  "code": "platform_api_auth_strategy_not_allowed"
}
Status Code: 402
{
  "shortMessage": "Unsupported plan features",
  "longMessage": "Some features are not supported in your current plan. Upgrade your subscription to unlock them.",
  "code": "unsupported_subscription_plan_features",
  "meta": {
    "unsupportedfeatures": "unsupportedfeatures"
  }
}

Promo Codes

CheckoutPromoCodeInvalid

CheckoutPromoCodeInvalid is returned when the code a C2 typed at checkout cannot be applied for any reason that the client should render as the single "Invalid promo code" inline state: the code does not exist, is archived, its parent discount's redemption window is not open, or the discount does not target this checkout's price, period, or currency. The cause is deliberately not disclosed so codes cannot be probed.

Status Code: 422
{
  "shortMessage": "Invalid promo code",
  "longMessage": "This promo code cannot be applied to this checkout",
  "code": "checkout_promo_code_invalid",
  "meta": {
    "name": "paramname"
  }
}

Public Keys

PublicKeyNotFound

PublicKeyNotFound signifies an error when no public key was found with the given id

Status Code: 404
{
  "shortMessage": "Public key not found",
  "longMessage": "No public key was found with id <publicKeyID>",
  "code": "resource_not_found"
}

Redirect Urls

RedirectURLNotFound

RedirectURLNotFound signifies an error when a RedirectURL was not found by the provided attribute

Status Code: 404
{
  "shortMessage": "Redirect url not found",
  "longMessage": "No RedirectURL exists with <attribute>: <val>",
  "code": "resource_not_found"
}
Status Code: 400
{
  "shortMessage": "bulk size exceeded",
  "longMessage": "Parameters exceed the maximum allowed bulk processing size of %d.",
  "code": "bulk_size_exceeded"
}

FailedToParseRequestBody

FailedToParseRequestBody is a dynamic error which should be used after receiving an error from a JSON decode attempt.

Status Code: 422
{
  "shortMessage": "is invalid",
  "longMessage": "%v is invalid. Received %v, must be of type %v.",
  "code": "form_param_value_invalid"
}
Status Code: 400
{
  "shortMessage": "Infinite redirect loop detected",
  "longMessage": "Infinite redirect loop detected. That usually means that we were not able to determine the auth state for this request.",
  "code": "infinite_redirect_loop"
}
Status Code: 400
{
  "shortMessage": "invalid API version",
  "longMessage": "Invalid Clerk API version: <reason>",
  "code": "api_version_invalid"
}

InvalidRequestBody

InvalidRequestBody signifies an error when the body of the request does not conform to the expected format

Status Code: 400
{
  "shortMessage": "Request body invalid",
  "longMessage": "The request body is invalid. Please consult the API documentation for more information.",
  "code": "request_body_invalid"
}
Status Code: 400
{
  "shortMessage": "Malformed publishable key",
  "longMessage": "Ensure the provided publishable key (<key>) is the one displayed in Dashboard",
  "code": "malformed_publishable_key"
}

MalformedRequestParameters

MalformedRequestParameters signifies an error when the request parameters are malformed and result in parsing errors

Status Code: 400
{
  "shortMessage": "Malformed request parameters",
  "longMessage": "The request parameters are malformed and could not be parsed",
  "code": "malformed_request_parameters"
}
Status Code: 400
{
  "shortMessage": "Missing query parameter",
  "longMessage": "Either of the following query parameters must be provided: <parameters>.",
  "code": "missing_query_parameter"
}

MissingQueryParameter

MissingQueryParameter denotes that the required query parameter, param, was not provided by the request.

Status Code: 400
{
  "shortMessage": "",
  "longMessage": "The query parameter '<param>' is missing from the request. Please consult the API documentation for more information.",
  "code": "missing_query_parameter"
}
Status Code: 413
{
  "shortMessage": "Request body too large",
  "longMessage": "The request body exceeds the maximum allowed size of %d bytes.",
  "code": "request_body_too_large"
}

UnsupportedContentType

UnsupportedContentType signifies an error when provided content type is unsupported

Status Code: 415
{
  "shortMessage": "Content-Type is unsupported",
  "longMessage": "Content-Type <actual> is unsupported. You should use <expected> instead.",
  "code": "unsupported_content_type"
}
Status Code: 422
{
  "shortMessage": "SAML Connection can't be activated",
  "longMessage": "You have to provide the <fields> before you are able to activate this connection.",
  "code": "saml_connection_cant_be_activated"
}
Status Code: 400
{
  "shortMessage": "Failed to fetch IdP metadata",
  "longMessage": "We failed to fetch the IdP metadata. If the error persists, please provide the IdP configuration data explicitly.",
  "code": "saml_failed_to_fetch_idp_metadata"
}
Status Code: 422
{
  "shortMessage": "Failed to parse IdP metadata",
  "longMessage": "We failed to parse the IdP metadata. If the error persists, please provide the IdP configuration data explicitly.",
  "code": "saml_failed_to_parse_idp_metadata"
}
Status Code: 422
{
  "shortMessage": "IdP metadata is missing required fields",
  "longMessage": "The IdP metadata is missing the following required fields: <fields>",
  "code": "saml_metadata_missing_fields",
  "meta": {
    "missingfields": "missingfields"
  }
}

Scim

SCIMAttributeManagedByDirectory

SCIMAttributeManagedByDirectory returns a 409 Conflict error when attempting to update an attribute that is managed by a directory.

Status Code: 409
{
  "shortMessage": "attribute managed by directory sync",
  "longMessage": "attribute managed by directory sync",
  "code": "attribute_managed_by_scim",
  "meta": {
    "name": "paramname"
  }
}

SCIMDirectoryDisabled

SCIMDirectoryDisabled returns an error when attempting to trigger a pull sync on a disabled directory.

Status Code: 400
{
  "shortMessage": "directory disabled",
  "longMessage": "This directory is disabled.",
  "code": "scim_directory_disabled"
}
Status Code: 422
{
  "shortMessage": "enterprise connection already in use",
  "longMessage": "This enterprise connection is already associated with another directory.",
  "code": "scim_directory_enterprise_connection_already_used",
  "meta": {
    "name": "scim_connection_id"
  }
}

SCIMDirectoryOrganizationAlreadyUsed

SCIMDirectoryOrganizationAlreadyUsed returns an error when attempting to create a SCIM directory for an organization that already has one. [paramName] identifies the request parameter through which the organization was supplied.

Status Code: 400
{
  "shortMessage": "organization already has a SCIM directory",
  "longMessage": "This organization is already associated with another SCIM directory.",
  "code": "scim_directory_organization_already_used",
  "meta": {
    "name": "paramname"
  }
}

SCIMDirectoryPullModeNotConfigured

SCIMDirectoryPullModeNotConfigured returns an error when attempting to trigger a pull sync on a directory that is not configured for pull-mode sync.

Status Code: 400
{
  "shortMessage": "directory not configured for pull-mode sync",
  "longMessage": "This directory is not configured for pull-mode sync.",
  "code": "scim_directory_pull_mode_not_configured"
}

SCIMDirectorySyncThrottled

SCIMDirectorySyncThrottled returns a 409 Conflict error when a manual pull sync is requested while one is already running or another just started.

Status Code: 409
{
  "shortMessage": "sync already in progress",
  "longMessage": "A sync for this directory is already running.",
  "code": "scim_directory_sync_throttled"
}

SCIMGroupRoleMappingDisabled

SCIMGroupRoleMappingDisabled returns an error when attempting to mutate group role mappings on a directory that has role mapping disabled.

Status Code: 400
{
  "shortMessage": "role mapping disabled",
  "longMessage": "Role mapping is disabled for this directory. Enable role mapping to add, edit, or remove mappings.",
  "code": "feature_not_enabled"
}
Status Code: 401
{
  "shortMessage": "expired session token consumed",
  "longMessage": "The provided expired session token was already consumed in a previous refresh request",
  "code": "session_refresh_expired_session_token_consumed"
}
Status Code: 401
{
  "shortMessage": "Invalid expired_token param",
  "longMessage": "The session token provided could not be successfully verified",
  "code": "expired_session_token_invalid"
}
Status Code: 401
{
  "shortMessage": "session token too old",
  "longMessage": "The provided expired session token is too old",
  "code": "session_refresh_expired_session_token_too_old"
}
Status Code: 401
{
  "shortMessage": "session inactive",
  "longMessage": "The provided session is not active",
  "code": "session_refresh_inactive_session"
}
Status Code: 401
{
  "shortMessage": "expired session token ineligible",
  "longMessage": "The provided expired session token is not eligible for refresh",
  "code": "session_refresh_session_token_ineligible"
}
Status Code: 401
{
  "shortMessage": "Request origin is invalid",
  "longMessage": "The request_origin parameter could not be parsed",
  "code": "refresh_request_origin_invalid"
}
Status Code: 401
{
  "shortMessage": "missing 'azp' claim",
  "longMessage": "No 'azp' claim present in the provided expired session token",
  "code": "expired_session_token_missing_azp"
}
Status Code: 401
{
  "shortMessage": "missing 'iat' claim",
  "longMessage": "No 'iat' claim present in the provided expired session token",
  "code": "session_refresh_expired_session_token_missing_iat"
}
Status Code: 401
{
  "shortMessage": "missing 'sid' claim",
  "longMessage": "No 'sid' claim present in the provided expired session token",
  "code": "expired_session_token_missing_sid"
}
Status Code: 401
{
  "shortMessage": "Request origin does not match azp claim",
  "longMessage": "The request_origin parameter does not match the 'azp' claim of expired_token",
  "code": "refresh_request_origin_azp_mismatch"
}
Status Code: 401
{
  "shortMessage": "Session not found",
  "longMessage": "No session was found with id <sessionID>",
  "code": "session_refresh_session_not_found"
}
Status Code: 401
{
  "shortMessage": "Session ID does not match the 'sid' claim",
  "longMessage": "The 'sid' claim of the provided expired session token does not match the session ID provided in the request path",
  "code": "refresh_sid_mismatch"
}
Status Code: 401
{
  "shortMessage": "Refresh token not found",
  "longMessage": "The provided refresh token was not found",
  "code": "refresh_token_not_found"
}
Status Code: 401
{
  "shortMessage": "user not found",
  "longMessage": "The provided user was not found",
  "code": "session_refresh_user_not_found"
}
Status Code: 409
{
  "shortMessage": "unable to create session",
  "longMessage": "Unable to create new session when an impersonation session is present. Please sign out first.",
  "code": "session_creation_not_allowed"
}
Status Code: 401
{
  "shortMessage": "account deprovisioned",
  "longMessage": "Your account is deprovisioned",
  "code": "deprovisioned"
}
Status Code: 400
{
  "shortMessage": "account deprovisioned",
  "longMessage": "The target user's account has been deprovisioned according to their external identity provider",
  "code": "deprovisioned"
}
Status Code: 400
{
  "shortMessage": "Invalid session token",
  "longMessage": "The token provided could not be successfully verified",
  "code": "invalid_session_token"
}

SessionNotFound

SessionNotFound signifies an error when no session with given sessionID was found

Status Code: 404
{
  "shortMessage": "Session not found",
  "longMessage": "No session was found with id <sessionID>",
  "code": "resource_not_found"
}

Sign In

IdentificationClaimed

IdentificationClaimed signifies an error when the requested identification is already claimed by another user

Status Code: 400
{
  "shortMessage": "Identification claimed by another user",
  "longMessage": "One or more identifiers on this sign up have since been connected to a different User. Please sign up again.",
  "code": "identification_claimed"
}

InvalidClientStateForAction

InvalidClientStateForAction signifies an error when trying to perform an invalid action for the current client state

Status Code: 400
{
  "shortMessage": "Invalid action",
  "longMessage": "We were unable to complete <action> for this Client. <resolution>",
  "code": "client_state_invalid"
}
Status Code: 400
{
  "shortMessage": "cannot revoke",
  "longMessage": "Sign in token cannot be revoked because its status is <status>. Only pending tokens can be revoked.",
  "code": "sign_in_token_cannot_be_revoked_code"
}
Status Code: 422
{
  "shortMessage": "is not allowed",
  "longMessage": "`<param>` isn't allowed to be `%v` when sign-up mode is set to <value>",
  "code": "sign_up_mode_restricted_invalid_value",
  "meta": {
    "name": "param"
  }
}
Status Code: 403
{
  "shortMessage": "Sign up cannot be updated",
  "longMessage": "This sign up has reached a terminal state and cannot be updated",
  "code": "sign_up_cannot_be_updated"
}

Signing Keys

SigningKeyNotFound

SigningKeyNotFound signifies an error when no signing key with a given signingKeyID was found

Status Code: 404
{
  "shortMessage": "Signing key not found",
  "longMessage": "No signing key was found with id <signingKeyID>",
  "code": "resource_not_found"
}

Sms

DevMonthlySMSLimitExceeded

DevMonthlySMSLimitExceeded signifies an error when an SMS sending attempt is made while the development limit has already been reached

Status Code: 400
{
  "shortMessage": "Development monthly SMS limit exceeded",
  "longMessage": "Operation cannot be completed because the monthly limit for SMS messages in development (%d) has been reached.",
  "code": "dev_monthly_sms_limit_exceeded",
  "meta": "{\"limit\"}"
}

SMSCountryRemovalRestricted

SMSCountryRemovalRestricted signals that the caller tried to remove one or more tier B-F countries from the SMS blocklist on an instance whose plan lacks the phone_code feature. Removing those countries is restricted to prevent SMS pumping abuse on free/dev instances; activating them requires upgrading the plan or contacting support.

Status Code: 422
{
  "shortMessage": "SMS country removal restricted",
  "longMessage": "Cannot remove the following countries from the SMS blocklist without an upgraded plan: %v. Contact support to activate these countries.",
  "code": "sms_country_removal_restricted",
  "meta": "{\"CountryCodes\": countryCodes}"
}
Status Code: 400
{
  "shortMessage": "Sending SMS failed",
  "longMessage": "Sending SMS failed. Please contact support or try again later.",
  "code": "sms_send_error"
}
Status Code: 422
{
  "shortMessage": "Invalid template body",
  "longMessage": "This template body is invalid and cannot be rendered successfully, please check for syntax errors",
  "code": "invalid_template_body",
  "meta": {
    "name": "body"
  }
}
Status Code: 422
{
  "shortMessage": "",
  "longMessage": "Body should contain the {{<requiredVariable>}} variable",
  "code": "required_variable_missing",
  "meta": {
    "name": "body"
  }
}
Status Code: 400
{
  "shortMessage": "Template body cannot be modified",
  "longMessage": "The body of template with slug <slug> can't be modified",
  "code": "template_body_modification_restricted"
}

TemplateDeletionRestricted

TemplateDeletionRestricted signifies an error when a deletion is attempted for a built-in (non-custom) template

Status Code: 400
{
  "shortMessage": "Template deletion restricted",
  "longMessage": "Template with slug <slug> can't be deleted",
  "code": "template_deletion_restricted"
}

TemplateNotFound

TemplateNotFound signifies an error when no template with given slug was found

Status Code: 404
{
  "shortMessage": "Template not found",
  "longMessage": "No template was found with slug <slug>",
  "code": "resource_not_found"
}

TemplateRevertRestricted

TemplateRevertRestricted signifies an error when a custom template is attempted to be reverted

Status Code: 400
{
  "shortMessage": "Template revert restricted",
  "longMessage": "Template with slug <slug> can't be reverted",
  "code": "template_revert_error"
}

TemplateTypeUnsupported

TemplateTypeUnsupported signifies an error when an invalid template type is provided

Status Code: 400
{
  "shortMessage": "Template type not supported",
  "longMessage": "Template type <templateType> is not supported",
  "code": "template_type_unsupported"
}
Status Code: 422
{
  "shortMessage": "invalid TOTP secret",
  "longMessage": "The TOTP secret is invalid, please provide a valid one base32 encoded",
  "code": "invalid_totp_secret_code"
}
Status Code: 422
{
  "shortMessage": "Insecure URL",
  "longMessage": "Please provide a secure URL (https)",
  "code": "insecure_url",
  "meta": {
    "name": "paramname"
  }
}
Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "Resource not found",
  "code": "resource_not_found"
}

Users

DeleteLinkedCommNotAllowed

DeleteLinkedCommNotAllowed signifies an error when trying to delete a linked communication TODO Alex: Check if this is the correct place for this error

Status Code: 400
{
  "shortMessage": "Deleting a linked email address is not allowed",
  "longMessage": "This email address is linked to one or more Connected Accounts. Remove the Connected Account before deleting this email address.",
  "code": "delete_linked_identification_disallowed"
}
Status Code: 422
{
  "shortMessage": "incorrect password",
  "longMessage": "The provided password is not the one the user has set",
  "code": "incorrect_password"
}
Status Code: 422
{
  "shortMessage": "incorrect TOTP",
  "longMessage": "The provided TOTP code is incorrect",
  "code": "totp_incorrect_code"
}
Status Code: 422
{
  "shortMessage": "invalid length",
  "longMessage": "The provided TOTP code must be 6 characters long.",
  "code": "totp_invalid_length"
}
Status Code: 400
{
  "shortMessage": "no password set",
  "longMessage": "This user does not have a password set for their account",
  "code": "no_password_set"
}
Status Code: 403
{
  "shortMessage": "password disabled",
  "longMessage": "Password is disabled for this instance. Cannot force a password reset.",
  "code": "password_disabled"
}
Status Code: 400
{
  "shortMessage": "TOTP is disabled",
  "longMessage": "This user does not have TOTP enabled in their account",
  "code": "totp_disabled"
}

UserBanned

UserBanned signifies an error when a user is banned

Status Code: 403
{
  "shortMessage": "User banned",
  "longMessage": "You have been banned. If you think this was by mistake, please contact support.",
  "code": "user_banned"
}
Status Code: 422
{
  "shortMessage": "missing data",
  "longMessage": "%q data doesn't match user requirements set for this instance",
  "code": "form_data_missing",
  "meta": {
    "names": "missingparams"
  }
}
Status Code: 403
{
  "shortMessage": "User deactivated",
  "longMessage": "You have been deactivated. Please contact support.",
  "code": "user_deactivated"
}

UserNotFound

UserNotFound signifies an error when no user is found with userID

Status Code: 404
{
  "shortMessage": "not found",
  "longMessage": "No user was found with id <userID>",
  "code": "resource_not_found"
}
Status Code: 403
{
  "shortMessage": "user quota exceeded",
  "longMessage": "You have reached your limit of %d users. <maxAllowed>",
  "code": "user_quota_exceeded"
}
Status Code: 409
{
  "shortMessage": "user managed by directory sync",
  "longMessage": "This user is managed by a directory and cannot be deleted manually.",
  "code": "user_managed_by_scim"
}

Verification

VerificationAlreadyVerified

VerificationAlreadyVerified signifies an error when verification has already been verified

Status Code: 400
{
  "shortMessage": "already verified",
  "longMessage": "This verification has already been verified.",
  "code": "verification_already_verified"
}
Status Code: 429
{
  "shortMessage": "Too many verification code requests",
  "longMessage": "Too many verification code requests. Please wait at least 30 seconds to receive your code before trying again.",
  "code": "verification_code_too_many_requests"
}

VerificationExpired

VerificationExpired signifies an error when verification has expired

Status Code: 400
{
  "shortMessage": "expired",
  "longMessage": "This verification has expired. You must create a new one.",
  "code": "verification_expired"
}

VerificationFailed

VerificationFailed signifies an error when verification fails

Status Code: 400
{
  "shortMessage": "failed",
  "longMessage": "Too many failed attempts. You have to try again with the same or another method.",
  "code": "verification_failed"
}

VerificationInvalidStrategy

VerificationInvalidStrategy signifies an error when the given strategy is not valid for current verification

Status Code: 400
{
  "shortMessage": "has invalid strategy",
  "longMessage": "The strategy is not valid for the current verification.",
  "code": "verification_strategy_invalid"
}

VerificationNotSent

VerificationNotSent signifies an error when verification email was not sent

Status Code: 400
{
  "shortMessage": "not sent",
  "longMessage": "You need to send a verification code before attempting to verify.",
  "code": "verification_not_sent"
}

VerificationUnknownStatus

VerificationUnknownStatus signifies an unexpected error when unknown verification status is found

Status Code: 500
{
  "shortMessage": "Unknown verification status",
  "longMessage": "Found unknown verification status <status>",
  "code": "verification_status_unknown"
}
Status Code: 409
{
  "shortMessage": "Waitlist entry already completed",
  "longMessage": "The waitlist entry has already been completed.",
  "code": "waitlist_entry_already_completed"
}
Status Code: 409
{
  "shortMessage": "Waitlist entry already invited",
  "longMessage": "The waitlist entry has already been invited.",
  "code": "waitlist_entry_already_invited"
}
Status Code: 409
{
  "shortMessage": "Waitlist entry already rejected",
  "longMessage": "The waitlist entry has already been rejected.",
  "code": "waitlist_entry_already_rejected"
}
Status Code: 409
{
  "shortMessage": "Waitlist entry is locked",
  "longMessage": "This waitlist entry is locked and cannot be modified at this time. Please try again later.",
  "code": "waitlist_entry_locked"
}
Status Code: 400
{
  "shortMessage": "Only one Svix app is allowed per instance.",
  "longMessage": "Only one Svix app is allowed per instance.",
  "code": "svix_app_exists"
}
Status Code: 400
{
  "shortMessage": "Svix app creation failed",
  "longMessage": "Could not create a Svix app with name <name> at this time. Please contact us if this error persists.",
  "code": "svix_app_create_error"
}
Status Code: 400
{
  "shortMessage": "No Svix apps are associated with the current instance.",
  "longMessage": "No Svix apps are associated with the current instance.",
  "code": "svix_app_missing"
}

Feedback

What did you think of this content?

Last updated on