Create External Key

Changed on

Create an external key config owned by the caller's organization.

post/v1/organizations/external_keys

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Request body

display_namestring nullable

Human-friendly display name.

geo'us'

Data residency geo. Only us is supported.

user_profile_idstring nullable

ID of a user profile to bind the key to. Omit this field for a key that isn't bound to a user profile. Such a key can be attached to a Workspace whatever its user profile. The binding cannot be changed later. A key bound to a user profile can only be attached to a Workspace that has the same user profile.

Example request

{
  "provider_config": {
    "kms_arn": "arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222",
    "region": "us-east-1",
    "role_arn": "arn:aws:iam::111122223333:role/anthropic-cmek"
  },
  "user_profile_id": "uprof_01SDCCSbTxrXDpWc1phhtcfK"
}

Response

Successful Response

created_atstring date-time required
display_namestring nullable required

Human-friendly display name. Null if none was set.

geostring required

Data residency geo. Selects the region this key is used in.

idstring required

Identifier of the external key config: a tagged ID prefixed ekey_, or, on Claude Platform on AWS, an AWS KMS key's ARN.

type'external_key' required
updated_atstring date-time required
user_profile_idstring nullable required

ID of the user profile the key is bound to, or null if the key is not bound to one. A key bound to a user profile can only be attached to a Workspace that has the same user profile. A key that isn't bound can be attached to a Workspace whatever its user profile.

Example response

{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "display_name": "prod-us-key",
  "geo": "us",
  "id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
  "provider_config": {
    "kms_arn": "arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222",
    "region": "us-east-1",
    "role_arn": "arn:aws:iam::111122223333:role/anthropic-cmek"
  },
  "updated_at": "2024-10-30T23:58:27.427722Z",
  "user_profile_id": "uprof_01SDCCSbTxrXDpWc1phhtcfK"
}

Changes

    • breaking

      the response's property type changed from no type to object for status

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • info

      removed discriminator from response property for the response status

    • info

      removed from the response property oneOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added