Claude Platform Docs

Deployments

Create Deployment
beta.deployments.create(**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments
List Deployments
beta.deployments.list(**kwargs) -> PageCursor<BetaManagedAgentsDeployment>
GET/v1/deployments
Get Deployment
beta.deployments.retrieve(deployment_id, **kwargs) -> BetaManagedAgentsDeployment
GET/v1/deployments/{deployment_id}
Update Deployment
beta.deployments.update(deployment_id, **kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}
Archive Deployment
beta.deployments.archive(deployment_id, **kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/archive
Run Deployment Now
beta.deployments.run(deployment_id, **kwargs) -> BetaManagedAgentsDeploymentRun
POST/v1/deployments/{deployment_id}/run
Pause Deployment
beta.deployments.pause(deployment_id, **kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/pause
Unpause Deployment
beta.deployments.unpause(deployment_id, **kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/unpause
Models
class BetaManagedAgentsAgentArchivedDeploymentPausedReasonError { type }

The deployment's agent was archived.

type: :agent_archived_error
class BetaManagedAgentsCronSchedule { expression, timezone, type, 2 more }

5-field POSIX cron schedule with computed runtime timestamps.

expression: String

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: String

IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").

minLength1
type: :cron
last_run_at: Time

A timestamp in RFC 3339 format

formatdate-time
upcoming_runs_at: Array[Time]

Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (archived_at set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.

class BetaManagedAgentsCronScheduleParams { expression, timezone, type }

5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

expression: String

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: String

Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

minLength1
type: :cron
class BetaManagedAgentsDeployment { id, agent, archived_at, 14 more }

A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.

BetaManagedAgentsDeploymentInitialEvent = BetaManagedAgentsDeploymentUserMessageEvent { content, type } | BetaManagedAgentsDeploymentUserDefineOutcomeEvent { description, rubric, type, max_iterations } | BetaManagedAgentsDeploymentSystemMessageEvent { content, type }

An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.

One of the following:
BetaManagedAgentsDeploymentInitialEventParams = BetaManagedAgentsUserMessageEventParams { content, type } | BetaManagedAgentsUserDefineOutcomeEventParams { description, rubric, type, max_iterations } | BetaManagedAgentsSystemMessageEventParams { content, type }

An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.

One of the following:
BetaManagedAgentsDeploymentPausedReason = BetaManagedAgentsManualDeploymentPausedReason { type } | BetaManagedAgentsErrorDeploymentPausedReason { error, type }

Why a deployment is paused. Non-null exactly when status is paused.

One of the following:
class BetaManagedAgentsManualDeploymentPausedReason { type }

The caller invoked the pause endpoint on the deployment.

type: :manual
class BetaManagedAgentsErrorDeploymentPausedReason { error, type }

A scheduled fire recorded a failed run whose error auto-pauses the deployment.

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
type: :error

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
BetaManagedAgentsDeploymentStatus = :active | :paused

Lifecycle status of a deployment.

One of the following:
:active
:paused
class BetaManagedAgentsDeploymentSystemMessageEvent { content, type }

Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt.

content: Array[BetaManagedAgentsSystemContentBlock { text, type }]

System content blocks to append. Text-only.

text: String

The text content.

minLength1
type: :text
type: :"system.message"
class BetaManagedAgentsDeploymentUserDefineOutcomeEvent { description, rubric, type, max_iterations }

An outcome the agent should work toward. The agent begins work on receipt.

class BetaManagedAgentsDeploymentUserMessageEvent { content, type }

A user message sent to the session.

class BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError { type }

The deployment's environment was archived.

type: :environment_archived_error
class BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError { type }

The deployment's environment no longer exists.

type: :environment_not_found_error
class BetaManagedAgentsErrorDeploymentPausedReason { error, type }

A scheduled fire recorded a failed run whose error auto-pauses the deployment.

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
type: :error
class BetaManagedAgentsFileNotFoundDeploymentPausedReasonError { type }

A file resource referenced by the deployment no longer exists.

type: :file_not_found_error
class BetaManagedAgentsFileResourceConfig { file_id, type, mount_path }

A file mounted into each session's container.

file_id: String

ID of a previously uploaded file.

type: :file
mount_path: String

Mount path in the container. Defaults to /mnt/session/uploads/<file_id>.

class BetaManagedAgentsGitHubRepositoryResourceConfig { type, url, checkout, mount_path }

A GitHub repository mounted into each session's container. The authorization token is write-only and never returned.

class BetaManagedAgentsManualDeploymentPausedReason { type }

The caller invoked the pause endpoint on the deployment.

type: :manual
class BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError { type }

An MCP server host used by the deployment's agent is blocked by the environment's network policy.

type: :mcp_egress_blocked_error
class BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError { type }

A memory store referenced by the deployment is archived.

type: :memory_store_archived_error
class BetaManagedAgentsMemoryStoreResourceConfig { memory_store_id, type, access, instructions }

A memory store attached to each session created from this deployment.

memory_store_id: String

The memory store ID (memstore_...). Must belong to the caller's organization and workspace.

type: :memory_store
access: :read_write | :read_only

Access mode for an attached memory store.

One of the following:
:read_write
:read_only
instructions: String

Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.

class BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError { type }

The deployment's organization is disabled.

type: :organization_disabled_error
class BetaManagedAgentsSchedule { expression, timezone, type, 2 more }

5-field POSIX cron schedule with computed runtime timestamps.

expression: String

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: String

IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").

minLength1
type: :cron
last_run_at: Time

A timestamp in RFC 3339 format

formatdate-time
upcoming_runs_at: Array[Time]

Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (archived_at set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.

class BetaManagedAgentsScheduleParams { expression, timezone, type }

5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

expression: String

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: String

Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

minLength1
type: :cron
class BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError { type }

The deployment configures resources, but its environment is self-hosted and cannot mount them.

type: :self_hosted_resources_unsupported_error
BetaManagedAgentsSessionResourceConfig = BetaManagedAgentsGitHubRepositoryResourceConfig { type, url, checkout, mount_path } | BetaManagedAgentsFileResourceConfig { file_id, type, mount_path } | BetaManagedAgentsMemoryStoreResourceConfig { memory_store_id, type, access, instructions }

A configured session resource. Echoes the input minus write-only credentials.

One of the following:
class BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError { type }

A referenced resource no longer exists and its kind was not reported.

type: :session_resource_not_found_error
class BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError { type }

A skill referenced by the deployment's agent no longer exists.

type: :skill_not_found_error
class BetaManagedAgentsUnknownDeploymentPausedReasonError { type }

An unrecognized error auto-paused the deployment. A fallback variant; matches a run whose error.type is unknown_error.

type: :unknown_error
class BetaManagedAgentsVaultArchivedDeploymentPausedReasonError { type }

A vault referenced by the deployment is archived.

type: :vault_archived_error
class BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError { type }

A vault referenced by the deployment no longer exists.

type: :vault_not_found_error
class BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError { type }

The deployment's workspace was archived.

type: :workspace_archived_error