Create Deployment

post/v1/deployments?beta=true

Headers

anthropic-versionstring
anthropic-betastring

Request body

namestring required

Human-readable name for the deployment.

descriptionstring nullable

Description of what the deployment does.

environment_idstring required

ID of the environment defining the container configuration for sessions created from this deployment.

vault_idsstring[]

Vault IDs for stored credentials the agent can use during sessions created from this deployment. Maximum 50.

metadataobject

Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

Example request

{
  "initial_events": [
    {
      "type": "user.message",
      "content": [
        {
          "type": "text",
          "text": "Where is my order #1234?"
        }
      ]
    }
  ],
  "resources": [
    {
      "type": "github_repository",
      "url": "https://github.com/example-org/example-repo",
      "authorization_token": "ghp_exampletoken"
    }
  ]
}

Response

Successful response (OK)

type'deployment' required
idstring required

Unique identifier for this deployment.

namestring required

Human-readable name.

descriptionstring nullable required

Description of what the deployment does.

environment_idstring required

ID of the environment where sessions run.

vault_idsstring[] required

Vault IDs supplying stored credentials for sessions created from this deployment.

metadataobject required

Arbitrary key-value metadata. Maximum 16 pairs.

status'active' | 'paused' required

Lifecycle status of a deployment.

created_atstring date-time required

A timestamp in RFC 3339 format

updated_atstring date-time required

A timestamp in RFC 3339 format

archived_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "agent": {
    "type": "agent",
    "id": "agent_011CZkYqphY8vELVzwCUpqiQ",
    "version": 1
  },
  "initial_events": [
    {
      "content": [
        {
          "type": "text",
          "text": "Where is my order #1234?"
        }
      ]
    }
  ],
  "resources": [
    {
      "checkout": {
        "type": "branch",
        "name": "main"
      }
    }
  ]
}

Changes