Create Deployment
BetaManagedAgentsDeployment beta().deployments().create(DeploymentCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())POST/v1/deployments
Create Deployment
Parameters
Returns
Create Deployment
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.deployments.BetaManagedAgentsDeployment;
import com.anthropic.models.beta.deployments.DeploymentCreateParams;
import com.anthropic.models.beta.sessions.events.BetaManagedAgentsTextBlock;
import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserMessageEventParams;
import java.util.List;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
DeploymentCreateParams params = DeploymentCreateParams.builder()
.agent("string")
.environmentId("x")
.addUserMessageInitialEvent(List.of(BetaManagedAgentsUserMessageEventParams.Content.ofText(BetaManagedAgentsTextBlock.builder()
.text("Where is my order #1234?")
.type(BetaManagedAgentsTextBlock.Type.TEXT)
.build())))
.name("x")
.build();
BetaManagedAgentsDeployment betaManagedAgentsDeployment = client.beta().deployments().create(params);
}
}{
"id": "depl_011CZkZcDH3vPqd7xnEfwTai",
"agent": {
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"type": "agent",
"version": 1
},
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "Compiles yesterday's orders into a report every weekday morning.",
"environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"initial_events": [
{
"content": [
{
"text": "Compile yesterday's orders into report.md.",
"type": "text"
}
],
"type": "user.message"
}
],
"metadata": {},
"name": "Daily order report",
"paused_reason": {
"type": "manual"
},
"resources": [
{
"type": "github_repository",
"url": "url",
"checkout": {
"name": "main",
"type": "branch"
},
"mount_path": "mount_path"
}
],
"schedule": {
"expression": "0 9 * * 1-5",
"timezone": "America/Los_Angeles",
"type": "cron",
"last_run_at": "2026-03-16T16:00:09Z",
"upcoming_runs_at": [
"2026-03-17T16:00:00Z",
"2026-03-18T16:00:00Z"
]
},
"status": "active",
"type": "deployment",
"updated_at": "2026-03-15T10:00:00Z",
"vault_ids": [
"vlt_011CZkZDLs7fYzm1hXNPeRjv"
],
"budget": {
"max_list_cost": {
"amount": "2500",
"currency": "USD"
},
"type": "limit"
}
}Returns Examples
{
"id": "depl_011CZkZcDH3vPqd7xnEfwTai",
"agent": {
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"type": "agent",
"version": 1
},
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "Compiles yesterday's orders into a report every weekday morning.",
"environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW",
"initial_events": [
{
"content": [
{
"text": "Compile yesterday's orders into report.md.",
"type": "text"
}
],
"type": "user.message"
}
],
"metadata": {},
"name": "Daily order report",
"paused_reason": {
"type": "manual"
},
"resources": [
{
"type": "github_repository",
"url": "url",
"checkout": {
"name": "main",
"type": "branch"
},
"mount_path": "mount_path"
}
],
"schedule": {
"expression": "0 9 * * 1-5",
"timezone": "America/Los_Angeles",
"type": "cron",
"last_run_at": "2026-03-16T16:00:09Z",
"upcoming_runs_at": [
"2026-03-17T16:00:00Z",
"2026-03-18T16:00:00Z"
]
},
"status": "active",
"type": "deployment",
"updated_at": "2026-03-15T10:00:00Z",
"vault_ids": [
"vlt_011CZkZDLs7fYzm1hXNPeRjv"
],
"budget": {
"max_list_cost": {
"amount": "2500",
"currency": "USD"
},
"type": "limit"
}
}