---
title: Shared
url: https://platform.claude.com/docs/en/api/http/$shared
---

# Shared

## Domain types

### API Error Object

- `APIErrorObject object`

  - `type: "api_error"`

    The broad category of the error.

    default: api_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Internal server error

### Authentication Error

- `AuthenticationError object`

  - `type: "authentication_error"`

    The broad category of the error.

    default: authentication_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Authentication error

### Billing Error

- `BillingError object`

  - `type: "billing_error"`

    The broad category of the error.

    default: billing_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Billing error

### Claude Code Key Creator Not Member Error Details

- `ClaudeCodeKeyCreatorNotMemberErrorDetails object`

  The API key belongs to the Claude Code workspace, and the user who created it is no longer a member of the organization or of that workspace.

  - `error_code: "claude_code_key_creator_not_member"`

### Claude Code Version Too Old Error Details

- `ClaudeCodeVersionTooOldErrorDetails object`

  The request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.

  - `error_code: "claude_code_version_too_old"`

### CMEK Context Unavailable Error Details

- `CMEKContextUnavailableErrorDetails object`

  The workspace's encryption settings could not be read, so the request was refused. Retry in a few minutes.

  - `error_code: "cmek_context_unavailable"`

### CMEK Key Disabled Error Details

- `CMEKKeyDisabledErrorDetails object`

  The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.

  - `error_code: "cmek_key_disabled"`

### CMEK Key Network Blocked Error Details

- `CMEKKeyNetworkBlockedErrorDetails object`

  The key management service's network access controls blocked the request to the workspace's customer-managed encryption key. The key itself may be healthy.

  - `error_code: "cmek_key_network_blocked"`

### CMEK Key Unreachable Error Details

- `CMEKKeyUnreachableErrorDetails object`

  The workspace's customer-managed encryption key could not be reached. Retry the request; if this continues, check that the key is available in your key management service, or contact Anthropic support.

  - `error_code: "cmek_key_unreachable"`

### Enforced Spend Limit Reached Error Details

- `EnforcedSpendLimitReachedErrorDetails object`

  The organization has crossed the monthly API usage threshold of its API tier.

  - `error_code: "enforced_spend_limit_reached"`

### Error Details

- `ErrorDetails = AvailableToolsLimitExceededErrorDetails or ClaudeCodeKeyCreatorNotMemberErrorDetails or ClaudeCodeVersionTooOldErrorDetails or 81 more`

  - `AvailableToolsLimitExceededErrorDetails object`

    The tools available after a message exceed a limit on their number or their size.

    - `error_code: "available_tools_limit_exceeded"`

  - `ClaudeCodeKeyCreatorNotMemberErrorDetails object`

    The API key belongs to the Claude Code workspace, and the user who created it is no longer a member of the organization or of that workspace.

    - `error_code: "claude_code_key_creator_not_member"`

  - `ClaudeCodeVersionTooOldErrorDetails object`

    The request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.

    - `error_code: "claude_code_version_too_old"`

  - `CMEKKeyDisabledErrorDetails object`

    The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.

    - `error_code: "cmek_key_disabled"`

  - `CMEKKeyNetworkBlockedErrorDetails object`

    The key management service's network access controls blocked the request to the workspace's customer-managed encryption key. The key itself may be healthy.

    - `error_code: "cmek_key_network_blocked"`

  - `CompactionBlockAmbiguousErrorDetails object`

    `messages` holds more than one `compaction` block with content. Send only the block the conversation returned last.

    - `error_code: "compaction_block_ambiguous"`

  - `CompactionBlockMisplacedErrorDetails object`

    The `compaction` block is not the first block of the conversation, or is in a `system` message.

    - `error_code: "compaction_block_misplaced"`

  - `CompactionContentMismatchErrorDetails object`

    The `compaction` block's `content` differs from the text its `signature` recorded.

    - `error_code: "compaction_content_mismatch"`

  - `CompactionIncompleteTurnErrorDetails object`

    The compaction request ends on an `assistant` turn that is not finished.

    - `error_code: "compaction_incomplete_turn"`

  - `CompactionNothingToSummarizeErrorDetails object`

    `messages` holds no `user` or `assistant` content to summarize or adopt.

    - `error_code: "compaction_nothing_to_summarize"`

  - `CompactionSignatureInvalidErrorDetails object`

    The `compaction` block's `signature` does not verify.

    - `error_code: "compaction_signature_invalid"`

  - `CompactionTooManyToolReferencesErrorDetails object`

    The conversation references more distinct tools than a `compaction` block can record.

    - `error_code: "compaction_too_many_tool_references"`

  - `CompactionToolChangesMismatchErrorDetails object`

    The `compaction` block's `tool_changes` differs from what was returned with the block.

    - `error_code: "compaction_tool_changes_mismatch"`

  - `OrganizationOnHoldErrorDetails object`

    Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. `appeal_url`, when present, is where the organization can appeal.

    - `error_code: "organization_on_hold"`

    - `appeal_url: optional string or null`

  - `RequestBodyEncodingInvalidErrorDetails object`

    The request body is not valid for its `Content-Encoding`.

    - `error_code: "request_body_encoding_invalid"`

  - `RequestBodyEncodingUnsupportedErrorDetails object`

    The request's `Content-Encoding` is not supported.

    - `error_code: "request_body_encoding_unsupported"`

  - `ThreadAlreadyContinuedErrorDetails object`

    The response that `previous_message_id` names has already been continued, and each response can be continued only once. Continue from the Thread's most recent response `id`.

    - `error_code: "thread_already_continued"`

  - `ThreadContinueInFlightErrorDetails object`

    Another request is still continuing from the same `previous_message_id`. Wait for it to complete and continue from its response `id`, or replay the full conversation with `thread: {"type": "create"}`.

    - `error_code: "thread_continue_in_flight"`

  - `ThreadFingerprintMismatchErrorDetails object`

    A field that must stay the same across a Thread's turns differs from the value stored with the Thread; the message names each such field. Send the stored values, or replay the full conversation with `thread: {"type": "create"}` to change them.

    - `error_code: "thread_fingerprint_mismatch"`

  - `ThreadUnsupportedRequestErrorDetails object`

    The request combines `thread` with a request field or an organization setting that Threads do not support; `unsupported`, when present, names it. Send the full conversation without `thread`, or change that field.

    - `error_code: "thread_unsupported_request"`

    - `unsupported: optional array of ThreadUnsupportedFeatureName or null`

      Each entry names a request field or an organization setting that Threads do not support. On a value you do not recognize, send the full conversation without `thread`.

      - `"cache_control"`

      - `"context_management"`

      - `"fallbacks"`

      - `"hipaa"`

      - `"inference_hooks"`

      - `"thinking"`

  - `ToolNameConflictErrorDetails object`

    A tool made available in `messages` takes a name that an available tool of another kind, or of another MCP server, already holds.

    - `error_code: "tool_name_conflict"`

  - `ToolReferenceUnresolvedErrorDetails object`

    A tool change or MCP tool listing references a tool or MCP server that is not defined at that position in the conversation.

    - `error_code: "tool_reference_unresolved"`

  - `ThreadNotFoundErrorDetails object`

    No usable Thread state was found for `previous_message_id`. Replay the full conversation with `thread: {"type": "create"}` to start a new Thread.

    - `error_code: "thread_not_found"`

  - `SkillReadBlockedUndecryptableErrorDetails object`

    A custom skill the request names is stored under an encryption key state the workspace cannot currently decrypt.

    - `error_code: "skill_read_blocked_undecryptable"`

  - `RequestBodyTooLargeAfterDecodingErrorDetails object`

    The compressed request body exceeds the request size limit once decoded.

    - `error_code: "request_body_too_large_after_decoding"`

  - `EnforcedSpendLimitReachedErrorDetails object`

    The organization has crossed the monthly API usage threshold of its API tier.

    - `error_code: "enforced_spend_limit_reached"`

  - `RampLimitExceededErrorDetails object`

    The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the `retry-after` header.

    - `error_code: "ramp_limit_exceeded"`

  - `CMEKKeyUnreachableErrorDetails object`

    The workspace's customer-managed encryption key could not be reached. Retry the request; if this continues, check that the key is available in your key management service, or contact Anthropic support.

    - `error_code: "cmek_key_unreachable"`

  - `CompactionUnavailableErrorDetails object`

    The compaction could not be completed for a transient server reason. Retry the request.

    - `error_code: "compaction_unavailable"`

  - `StorageQuotaExceededErrorDetails object`

    The organization's file storage quota is exhausted. Delete files to free up space, then retry the upload.

    - `error_code: "storage_quota_exceeded"`

  - `FileNotDownloadableErrorDetails object`

    The file has `downloadable: false`. Only files generated by a tool, such as the code execution tool, can be downloaded.

    - `error_code: "file_not_downloadable"`

  - `FileExpiredErrorDetails object`

    The file's `expires_at` has passed, so its content is no longer available.

    - `error_code: "file_expired"`

  - `CMEKContextUnavailableErrorDetails object`

    The workspace's encryption settings could not be read, so the request was refused. Retry in a few minutes.

    - `error_code: "cmek_context_unavailable"`

  - `OrgAPIKeyLimitExceededErrorDetails object`

    The organization has reached its limit of active API keys.

    - `error_code: "org_api_key_limit_exceeded"`

  - `WorkspaceAPIKeyLimitExceededErrorDetails object`

    The workspace has reached its limit of active API keys.

    - `error_code: "workspace_api_key_limit_exceeded"`

  - `SandboxEgressRestrictedErrorDetails object`

    The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

    - `error_code: "sandbox_egress_restricted"`

  - `UserProfileNotFoundErrorDetails object`

    The request depends on a user profile that does not exist in the organization or is no longer active. The request either names this user profile by ID, or names a resource, such as an External Key, that is bound to it.

    - `error_code: "user_profile_not_found"`

  - `ExternalKeyInWorkspacePolicyErrorDetails object`

    The External Key can't be deleted or reconfigured while the organization's Workspace Policy lists it as an allowed key.

    - `error_code: "external_key_in_workspace_policy"`

  - `AlreadyMemberErrorDetails object`

    The email address already belongs to a user in the organization. The message names the user.

    - `error_code: "already_member"`

  - `CannotInviteEmailsWithUnverifiedDomainsErrorDetails object`

    The email address's domain is not one of the verified domains of the organization's parent organization.

    - `error_code: "cannot_invite_emails_with_unverified_domains"`

  - `EmailDomainNotAllowedErrorDetails object`

    The organization restricts invites to an allowed list of email domains, and the list is empty or does not include the email address's domain.

    - `error_code: "email_domain_not_allowed"`

  - `InviteAlreadyExistsErrorDetails object`

    A pending invite already exists for the email address. The message names the invite.

    - `error_code: "invite_already_exists"`

  - `OrgMemberLimitExceededErrorDetails object`

    The organization has reached the member limit that Anthropic set for it. Pending invites count toward the limit.

    - `error_code: "org_member_limit_exceeded"`

  - `RBACGroupGrantsOwnerAccessErrorDetails object`

    A role attached to an RBAC Group in the request grants owner access, so this API does not add members to that group (directly or through an invite), remove its members, or delete it. Make the change in the organization's admin settings in Claude.

    - `error_code: "rbac_group_grants_owner_access"`

  - `RBACGroupOwnerAccessUnconfirmedErrorDetails object`

    The API could not finish checking whether an RBAC Group in the request grants owner access, so it made no change. Retrying the same request will not help. Make the change in the organization's admin settings in Claude.

    - `error_code: "rbac_group_owner_access_unconfirmed"`

  - `CannotRemoveLastMemberErrorDetails object`

    The user is the organization's only member. Add another member before removing this one.

    - `error_code: "cannot_remove_last_member"`

  - `ConcurrentMembershipChangeErrorDetails object`

    Another change to the organization's members is in progress. Retry the request once it completes.

    - `error_code: "concurrent_membership_change"`

  - `ExternalKeyValidationFailedErrorDetails object`

    The External Key failed Anthropic's validation, so the request was refused. The message gives the reason, if there is one.

    - `error_code: "external_key_validation_failed"`

  - `ExternalKeyValidationTimedOutErrorDetails object`

    Anthropic's validation of the External Key did not finish in time, so the request was refused. Wait a moment, then send the request again.

    - `error_code: "external_key_validation_timed_out"`

  - `KeyProfileMismatchErrorDetails object`

    The External Key is bound to a user profile, and the Workspace does not have that user profile. A Workspace can use only a key bound to its own user profile or a key that isn't bound to one.

    - `error_code: "key_profile_mismatch"`

  - `WorkspacePolicyViolationErrorDetails object`

    The request breaks the organization's Workspace Policy. The message says which rule it broke; an organization admin can see and change the policy in the Console.

    - `error_code: "workspace_policy_violation"`

    - `field: WorkspacePolicyField`

      The request field the broken rule applies to.

  - `ExternalKeyChangedErrorDetails object`

    The external key changed while the request was validating it. Send the request again.

    - `error_code: "external_key_changed"`

  - `WorkspaceMemberLimitExceededErrorDetails object`

    The workspace has reached the member limit that Anthropic set for it.

    - `error_code: "workspace_member_limit_exceeded"`

  - `OrganizationTypeNotSupportedErrorDetails object`

    The endpoint does not support the organization's type. Each endpoint's description says which organization types it supports.

    - `error_code: "organization_type_not_supported"`

  - `ParentOrganizationRequiredErrorDetails object`

    The endpoint serves only organizations that belong to a parent organization, and this organization belongs to none.

    - `error_code: "parent_organization_required"`

  - `RBACRoleNotFoundErrorDetails object`

    No RBAC Role with this ID was found.

    - `error_code: "rbac_role_not_found"`

  - `BetaEnvironmentCreateDisabledErrorDetails object`

    Anthropic has turned off creating environments for this organization. Existing environments still work.

    - `error_code: "environment_create_disabled"`

  - `BetaEnvironmentArchivedErrorDetails object`

    The environment is archived, so it cannot be updated.

    - `error_code: "environment_archived"`

  - `BetaInvalidConfigTypeChangeErrorDetails object`

    `config.type` differs from the environment's stored type, which cannot change after creation.

    - `error_code: "invalid_config_type_change"`

  - `BetaEnvironmentUpdateDisabledErrorDetails object`

    Anthropic has turned off updating environments for this organization. Existing environments still work as they are.

    - `error_code: "environment_update_disabled"`

  - `BetaHeartbeatPreconditionFailedErrorDetails object`

    `expected_last_heartbeat` does not match the stored heartbeat, so another worker may hold the lease.

    - `current_state: BetaWorkLeaseState`

      The lease as the server holds it.

      - `last_heartbeat: string or null`

        RFC 3339 timestamp of the stored heartbeat, or null if there has been none

      - `lease_extended: boolean`

        Always false: a refused heartbeat does not extend the lease

      - `state: "queued" or "starting" or "active" or 2 more`

        Current state of the work item

        - `"queued"`

        - `"starting"`

        - `"active"`

        - `"stopping"`

        - `"stopped"`

      - `ttl_seconds: number`

        TTL of the lease

    - `error_code: "heartbeat_precondition_failed"`

  - `BetaInvalidMetadataErrorDetails object`

    `metadata` has too many keys, a key or value that is too long, or a reserved key. The message names each problem.

    - `error_code: "invalid_metadata"`

  - `BetaCannotSignOutPrimaryOwnerErrorDetails object`

    The member is the organization's primary owner, whom no API key or token can sign out.

    - `error_code: "cannot_sign_out_primary_owner"`

  - `BetaCannotSignOutSelfErrorDetails object`

    The member is the user the API key or token belongs to.

    - `error_code: "cannot_sign_out_self"`

  - `BetaOrganizationNotEnrolledInBetaErrorDetails object`

    The beta that the endpoint requires is not enabled for the organization. The message names the beta value.

    - `error_code: "organization_not_enrolled_in_beta"`

  - `BetaCannotSignOutManagedMemberErrorDetails object`

    The member has the `managed` role, and this API key or token cannot sign them out. The error message says which keys and tokens can.

    - `error_code: "cannot_sign_out_managed_member"`

  - `BetaCannotSignOutMembershipAdminErrorDetails object`

    The member is a membership admin, and the person the API key or token belongs to is not allowed to sign out membership admins.

    - `error_code: "cannot_sign_out_membership_admin"`

  - `BetaCannotSignOutOwnerErrorDetails object`

    The member is an owner or has owner permissions, and this API key or token cannot sign them out. In a Claude Enterprise organization, an API key with the `write:members` scope can.

    - `error_code: "cannot_sign_out_owner"`

  - `BetaCannotSignOutPrivilegedMemberErrorDetails object`

    This OAuth token cannot sign out a membership admin or a member whose roles grant owner, user management, or identity and access management.

    - `error_code: "cannot_sign_out_privileged_member"`

  - `BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails object`

    The organization cannot retrieve, set or delete spend limits with an Admin API credential.

    - `error_code: "spend_limits_admin_api_writes_not_enabled"`

  - `BetaUnsupportedCharsetErrorDetails object`

    The request's `Content-Type` header names a charset other than UTF-8, ISO-8859-1 or US-ASCII. Send the request with no charset, or with one of these.

    - `error_code: "unsupported_charset"`

  - `BetaPluginNameTakenErrorDetails object`

    The marketplace already holds this name. `plugin_id` is the Plugin that holds it, and can be absent.

    - `error_code: "plugin_name_taken"`

    - `plugin_id: optional string or null`

  - `BetaSkillNameTakenErrorDetails object`

    One of the Plugin's skills has the name of an organization skill. `skill_name` is that name.

    - `error_code: "skill_name_taken"`

    - `skill_name: string`

  - `BetaRegistrationPendingErrorDetails object`

    The Plugin version was stored but is not yet usable in claude.ai. `plugin_id` and `plugin_version_id` identify what was stored.

    - `error_code: "registration_pending"`

    - `plugin_id: string`

    - `plugin_version_id: string`

  - `BetaScanFailedErrorDetails object`

    The version in `plugin_version_id` did not pass its content scan, so it cannot be served.

    - `error_code: "scan_failed"`

    - `plugin_version_id: string`

  - `BetaScanPendingErrorDetails object`

    The content scan of the version in `plugin_version_id` is still running. Retry once the scan finishes.

    - `error_code: "scan_pending"`

    - `plugin_version_id: string`

  - `BetaSlackChannelSetUpSettingsRefusedErrorDetails object`

    The request set the channel up, and `settings` was then refused. The channel stays set up with every setting unset.

    - `error_code: "slack_channel_set_up_settings_refused"`

      A stable code that names the cause.

    - `slack_channel_id: string`

      The identifier of the channel the request set up, starting with `slch_`.

  - `BetaAPIKeyScopeMissingErrorDetails object`

    The API key lacks the scope the request needs: `read:claude_tag` for a read, `write:claude_tag` for a change.

    - `error_code: "api_key_scope_missing"`

  - `BetaClaudeTagWritesNotEnabledErrorDetails object`

    Changes through the Claude Tag API are not enabled for the organization.

    - `error_code: "claude_tag_writes_not_enabled"`

  - `BetaComplianceConfigurationRestrictedErrorDetails object`

    The organization's compliance configuration does not let Claude Tag store anything new.

    - `error_code: "compliance_configuration_restricted"`

  - `BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails object`

    The credential is not a scoped API key that is bound at the organization level.

    - `error_code: "organization_level_scoped_api_key_required"`

  - `BetaEnvironmentNotFoundErrorDetails object`

    `settings.environment_id` names no Environment within the organization's reach.

    - `error_code: "environment_not_found"`

  - `BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails object`

    `settings.environment_id` names no Environment within the organization's reach, and the request had set the channel up by then. The channel stays set up with every setting unset.

    - `error_code: "slack_channel_set_up_environment_not_found"`

    - `slack_channel_id: string`

      The identifier of the channel the request set up, starting with `slch_`.

  - `BetaSlackChannelSetUpSettingsConflictErrorDetails object`

    The request set the channel up, and something else then changed the channel or removed it. Nothing of `settings` was stored.

    - `error_code: "slack_channel_set_up_settings_conflict"`

      A stable code that names the cause.

    - `slack_channel_id: string`

      The identifier of the channel the request set up, starting with `slch_`.

### Error Object

- `ErrorObject = InvalidRequestError or AuthenticationError or BillingError or 6 more`

  - `InvalidRequestError object`

    - `type: "invalid_request_error"`

      The broad category of the error.

      default: invalid_request_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Invalid request

  - `AuthenticationError object`

    - `type: "authentication_error"`

      The broad category of the error.

      default: authentication_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Authentication error

  - `BillingError object`

    - `type: "billing_error"`

      The broad category of the error.

      default: billing_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Billing error

  - `PermissionError object`

    - `type: "permission_error"`

      The broad category of the error.

      default: permission_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Permission denied

  - `NotFoundError object`

    - `type: "not_found_error"`

      The broad category of the error.

      default: not_found_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Not found

  - `RateLimitError object`

    - `type: "rate_limit_error"`

      The broad category of the error.

      default: rate_limit_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Rate limited

  - `GatewayTimeoutError object`

    - `type: "timeout_error"`

      The broad category of the error.

      default: timeout_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Request timeout

  - `APIErrorObject object`

    - `type: "api_error"`

      The broad category of the error.

      default: api_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Internal server error

  - `OverloadedError object`

    - `type: "overloaded_error"`

      The broad category of the error.

      default: overloaded_error

    - `message: string`

      A human-readable explanation of the error. Its wording can change, so don't match on it.

      default: Overloaded

### Error Response

- `ErrorResponse object`

  - `type: "error"`

    default: error

  - `error: ErrorObject`

    - `InvalidRequestError object`

      - `type: "invalid_request_error"`

        The broad category of the error.

        default: invalid_request_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Invalid request

    - `AuthenticationError object`

      - `type: "authentication_error"`

        The broad category of the error.

        default: authentication_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Authentication error

    - `BillingError object`

      - `type: "billing_error"`

        The broad category of the error.

        default: billing_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Billing error

    - `PermissionError object`

      - `type: "permission_error"`

        The broad category of the error.

        default: permission_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Permission denied

    - `NotFoundError object`

      - `type: "not_found_error"`

        The broad category of the error.

        default: not_found_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Not found

    - `RateLimitError object`

      - `type: "rate_limit_error"`

        The broad category of the error.

        default: rate_limit_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Rate limited

    - `GatewayTimeoutError object`

      - `type: "timeout_error"`

        The broad category of the error.

        default: timeout_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Request timeout

    - `APIErrorObject object`

      - `type: "api_error"`

        The broad category of the error.

        default: api_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Internal server error

    - `OverloadedError object`

      - `type: "overloaded_error"`

        The broad category of the error.

        default: overloaded_error

      - `message: string`

        A human-readable explanation of the error. Its wording can change, so don't match on it.

        default: Overloaded

  - `request_id: string or null`

### Error Type

- `ErrorType = "invalid_request_error" or "authentication_error" or "billing_error" or 9 more`

  - `"invalid_request_error"`

  - `"authentication_error"`

  - `"billing_error"`

  - `"permission_error"`

  - `"not_found_error"`

  - `"rate_limit_error"`

  - `"timeout_error"`

  - `"api_error"`

  - `"overloaded_error"`

  - `"memory_precondition_failed_error"`

  - `"memory_path_conflict_error"`

  - `"conflict_error"`

### Gateway Timeout Error

- `GatewayTimeoutError object`

  - `type: "timeout_error"`

    The broad category of the error.

    default: timeout_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Request timeout

### Invalid Request Error

- `InvalidRequestError object`

  - `type: "invalid_request_error"`

    The broad category of the error.

    default: invalid_request_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Invalid request

### Not Found Error

- `NotFoundError object`

  - `type: "not_found_error"`

    The broad category of the error.

    default: not_found_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Not found

### Organization On Hold Error Details

- `OrganizationOnHoldErrorDetails object`

  Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. `appeal_url`, when present, is where the organization can appeal.

  - `error_code: "organization_on_hold"`

  - `appeal_url: optional string or null`

### Organization Type Not Supported Error Details

- `OrganizationTypeNotSupportedErrorDetails object`

  The endpoint does not support the organization's type. Each endpoint's description says which organization types it supports.

  - `error_code: "organization_type_not_supported"`

### Overloaded Error

- `OverloadedError object`

  - `type: "overloaded_error"`

    The broad category of the error.

    default: overloaded_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Overloaded

### Parent Organization Required Error Details

- `ParentOrganizationRequiredErrorDetails object`

  The endpoint serves only organizations that belong to a parent organization, and this organization belongs to none.

  - `error_code: "parent_organization_required"`

### Permission Error

- `PermissionError object`

  - `type: "permission_error"`

    The broad category of the error.

    default: permission_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Permission denied

### Ramp Limit Exceeded Error Details

- `RampLimitExceededErrorDetails object`

  The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the `retry-after` header.

  - `error_code: "ramp_limit_exceeded"`

### Rate Limit Error

- `RateLimitError object`

  - `type: "rate_limit_error"`

    The broad category of the error.

    default: rate_limit_error

  - `message: string`

    A human-readable explanation of the error. Its wording can change, so don't match on it.

    default: Rate limited

### Request Body Encoding Invalid Error Details

- `RequestBodyEncodingInvalidErrorDetails object`

  The request body is not valid for its `Content-Encoding`.

  - `error_code: "request_body_encoding_invalid"`

### Request Body Encoding Unsupported Error Details

- `RequestBodyEncodingUnsupportedErrorDetails object`

  The request's `Content-Encoding` is not supported.

  - `error_code: "request_body_encoding_unsupported"`

### Request Body Too Large After Decoding Error Details

- `RequestBodyTooLargeAfterDecodingErrorDetails object`

  The compressed request body exceeds the request size limit once decoded.

  - `error_code: "request_body_too_large_after_decoding"`

### Sandbox Egress Restricted Error Details

- `SandboxEgressRestrictedErrorDetails object`

  The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

  - `error_code: "sandbox_egress_restricted"`
