Claude Platform Docs

Deployments

Create Deployment
BetaManagedAgentsDeployment Beta.Deployments.Create(parameters, cancellationToken = default)
POST/v1/deployments
List Deployments
DeploymentListPage Beta.Deployments.List(parameters, cancellationToken = default)
GET/v1/deployments
Get Deployment
BetaManagedAgentsDeployment Beta.Deployments.Retrieve(parameters, cancellationToken = default)
GET/v1/deployments/{deployment_id}
Update Deployment
BetaManagedAgentsDeployment Beta.Deployments.Update(parameters, cancellationToken = default)
POST/v1/deployments/{deployment_id}
Archive Deployment
BetaManagedAgentsDeployment Beta.Deployments.Archive(parameters, cancellationToken = default)
POST/v1/deployments/{deployment_id}/archive
Run Deployment Now
BetaManagedAgentsDeploymentRun Beta.Deployments.Run(parameters, cancellationToken = default)
POST/v1/deployments/{deployment_id}/run
Pause Deployment
BetaManagedAgentsDeployment Beta.Deployments.Pause(parameters, cancellationToken = default)
POST/v1/deployments/{deployment_id}/pause
Unpause Deployment
BetaManagedAgentsDeployment Beta.Deployments.Unpause(parameters, cancellationToken = default)
POST/v1/deployments/{deployment_id}/unpause
Models
class BetaManagedAgentsAgentArchivedDeploymentPausedReasonError { Type = "agent_archived_error"; }

The deployment's agent was archived.

JsonElement Type = "agent_archived_error"
class BetaManagedAgentsCronSchedule { Type = "cron"; Expression; Timezone; /* 2 more */ }

5-field POSIX cron schedule with computed runtime timestamps.

JsonElement Type = "cron"
required string Expression

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
required string Timezone

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

minLength1
DateTimeOffset? LastRunAt

Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.

formatdate-time
IReadOnlyList<DateTimeOffset> UpcomingRunsAt

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 { Type = "cron"; Expression; Timezone; }

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

JsonElement Type = "cron"
required string Expression

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
required string Timezone

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

minLength1
class BetaManagedAgentsDeployment { Type = "deployment"; ID; Agent; /* 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.

class BetaManagedAgentsDeploymentInitialEvent: union

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

class BetaManagedAgentsDeploymentUserMessageEvent { Type = "user.message"; Content; }

A user message sent to the session.

class BetaManagedAgentsDeploymentUserDefineOutcomeEvent { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }

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

class BetaManagedAgentsDeploymentSystemMessageEvent { Type = "system.message"; Content; }

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.

JsonElement Type = "system.message"
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> Content

System content blocks to append. Text-only.

JsonElement Type = "text"
required string Text

The text content.

minLength1
class BetaManagedAgentsDeploymentInitialEventParams: union

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

class BetaManagedAgentsUserMessageEventParams { Type = "user.message"; Content; }

Parameters for sending a user message to the session.

class BetaManagedAgentsUserDefineOutcomeEventParams { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }

Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.

class BetaManagedAgentsSystemMessageEventParams { Type = "system.message"; Content; }

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. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.

JsonElement Type = "system.message"
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> Content

System content blocks to append. Text-only.

JsonElement Type = "text"
required string Text

The text content.

minLength1
class BetaManagedAgentsDeploymentPausedReason: union

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

class BetaManagedAgentsManualDeploymentPausedReason { Type = "manual"; }

The caller invoked the pause endpoint on the deployment.

JsonElement Type = "manual"
class BetaManagedAgentsErrorDeploymentPausedReason { Type = "error"; Error; }

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

JsonElement Type = "error"

The failed run's error.

One of the following:
class BetaManagedAgentsDeploymentPausedReasonError: union

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

enum BetaManagedAgentsDeploymentStatus

Lifecycle status of a deployment.

Active("active")

The deployment is active and can run sessions. Archived deployments also report this status; check archived_at to distinguish them.

Paused("paused")

The deployment is paused. Autonomous triggers are suppressed; manual runs are still permitted.

class BetaManagedAgentsDeploymentSystemMessageEvent { Type = "system.message"; Content; }

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.

JsonElement Type = "system.message"
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> Content

System content blocks to append. Text-only.

JsonElement Type = "text"
required string Text

The text content.

minLength1
class BetaManagedAgentsDeploymentUserDefineOutcomeEvent { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }

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

class BetaManagedAgentsDeploymentUserMessageEvent { Type = "user.message"; Content; }

A user message sent to the session.

class BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError { Type = "environment_archived_error"; }

The deployment's environment was archived.

JsonElement Type = "environment_archived_error"
class BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError { Type = "environment_not_found_error"; }

The deployment's environment no longer exists.

JsonElement Type = "environment_not_found_error"
class BetaManagedAgentsErrorDeploymentPausedReason { Type = "error"; Error; }

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

JsonElement Type = "error"

The failed run's error.

One of the following:
class BetaManagedAgentsFileNotFoundDeploymentPausedReasonError { Type = "file_not_found_error"; }

A file resource referenced by the deployment no longer exists.

JsonElement Type = "file_not_found_error"
class BetaManagedAgentsFileResourceConfig { Type = "file"; FileID; MountPath; }

A file mounted into each session's container.

JsonElement Type = "file"
required string FileID

ID of a previously uploaded file.

string? MountPath

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

class BetaManagedAgentsGitHubRepositoryResourceConfig { Type = "github_repository"; Url; Checkout; MountPath; }

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

class BetaManagedAgentsManualDeploymentPausedReason { Type = "manual"; }

The caller invoked the pause endpoint on the deployment.

JsonElement Type = "manual"
class BetaManagedAgentsMcpEgressBlockedDeploymentPausedReasonError { Type = "mcp_egress_blocked_error"; }

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

JsonElement Type = "mcp_egress_blocked_error"
class BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError { Type = "memory_store_archived_error"; }

A memory store referenced by the deployment is archived.

JsonElement Type = "memory_store_archived_error"
class BetaManagedAgentsMemoryStoreResourceConfig { Type = "memory_store"; MemoryStoreID; Access; Instructions; }

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

JsonElement Type = "memory_store"
required string MemoryStoreID

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

Access? Access

Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.

One of the following:
ReadWrite("read_write")
ReadOnly("read_only")
string? Instructions

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 = "organization_disabled_error"; }

The deployment's organization is disabled.

JsonElement Type = "organization_disabled_error"
class BetaManagedAgentsSchedule { Type = "cron"; Expression; Timezone; /* 2 more */ }

A recurring schedule with computed runtime timestamps. Discriminated union — only cron is supported currently.

JsonElement Type = "cron"
required string Expression

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
required string Timezone

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

minLength1
DateTimeOffset? LastRunAt

Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.

formatdate-time
IReadOnlyList<DateTimeOffset> UpcomingRunsAt

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 { Type = "cron"; Expression; Timezone; }

A recurring schedule. Discriminated union — only cron is supported currently.

JsonElement Type = "cron"
required string Expression

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
required string Timezone

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

minLength1
class BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError { Type = "self_hosted_resources_unsupported_error"; }

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

JsonElement Type = "self_hosted_resources_unsupported_error"
class BetaManagedAgentsSessionResourceConfig: union

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

class BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError { Type = "session_resource_not_found_error"; }

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

JsonElement Type = "session_resource_not_found_error"
class BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError { Type = "skill_not_found_error"; }

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

JsonElement Type = "skill_not_found_error"
class BetaManagedAgentsUnknownDeploymentPausedReasonError { Type = "unknown_error"; }

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

JsonElement Type = "unknown_error"
class BetaManagedAgentsVaultArchivedDeploymentPausedReasonError { Type = "vault_archived_error"; }

A vault referenced by the deployment is archived.

JsonElement Type = "vault_archived_error"
class BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError { Type = "vault_not_found_error"; }

A vault referenced by the deployment no longer exists.

JsonElement Type = "vault_not_found_error"
class BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError { Type = "workspace_archived_error"; }

The deployment's workspace was archived.

JsonElement Type = "workspace_archived_error"