Skip to content
中文

Pause Deployment

POST/agent/v1/deployments/{deployment_id}/pause● Supported

Request parameters

  • deployment_idstringrequired

    path: Deployment id (depl_...), returned by deployments.create or deployments.list.

Returns

200

Deployment resources support creation, retrieval, filtering, updates, archival, pause and unpause. Versions are pinned; schedules return up to five future occurrences. Only user.message initial events and file resources are accepted; vault_ids is accepted up to 50 deduplicated ids, each owned by the organization and not archived, and a missing or archived vault returns 400 vault_ids[<index>] <id> was not found. Manual triggers and cron schedules create sessions that carry the deployment's vault_ids; creation failures record an error run and automatically pause the deployment, and a vault archived after the deployment was saved is recorded as vault_archived_error. Own extensions accept agent_with_overrides and target=computer for general agents only. Overrides support model, permission_mode and cwd; tools, mcp_servers, system and skills return 400.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Request

curl
curl -X POST https://api.deepraxis.com/agent/v1/deployments/depl_123/pause \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
    f"{opts['base_url']}/v1/deployments/depl_123/pause",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/deployments/depl_123/pause`, {
  method: "POST",
  headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());

Response 200

{
  "id": "depl_3574dc0461e14f0bb1e53ae1b4e9aaba",
  "type": "deployment",
  "agent": {
    "type": "agent",
    "id": "agent_b9637f7f-1527-4730-8590-412aa440503d",
    "version": 1
  },
  "target": {
    "type": "environment"
  },
  "environment_id": "env_cdf99e6cc7da470e990dd831ce4cf284",
  "name": "文档测试",
  "description": null,
  "initial_events": [
    {
      "type": "user.message",
      "content": [
        {
          "type": "text",
          "text": "Hi"
        }
      ]
    }
  ],
  "resources": [],
  "vault_ids": [],
  "budget": null,
  "schedule": null,
  "metadata": {},
  "status": "paused",
  "paused_reason": {
    "type": "manual"
  },
  "created_at": "2026-10-22T15:24:49.304Z",
  "updated_at": "2026-10-22T15:24:50.003Z",
  "archived_at": null
}

Response

HTTP 200

Successful response

application/json

Name Type Description
id string Unique identifier for this deployment.
agent object Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
agent.id string Agent id (agent_...). Pass it as agent when creating a session and as agent_id in agent calls. / The agent ID.
agent.type string Always agent. An agent definition. / An agent reference with model, permission_mode and cwd overrides for new sessions.
agent.version number The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified. / The agent version this deployment uses now; while the deployment follows the agent this is the active version, otherwise the version it is pinned to.
agent.pinned_version integer | null The version this deployment is pinned to; null when it follows the agent's active version.
agent.active_version integer | null The agent's currently effective version, the one a run would use now; null when the agent cannot be read.
agent.permission_mode string | null Permission mode for each new session; omitted or null inherits the agent policies.
agent.cwd string Working directory for each new session; omitted uses the session default.
agent.model string | object Replacement model id or model_config. Validated and stored without executing a session.
archived_at null | string A timestamp in RFC 3339 format
created_at string A timestamp in RFC 3339 format
description null | string Description of what the deployment does.
environment_id string | null Existing, unarchived environment id; environment_id and target are alternatives, so send at least one. target=environment requires it, target=computer (own face, general agents) may omit it; null is also accepted there.
initial_events array<object> Events sent to each session immediately after creation.
initial_events[].content array<object> Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].type string Always user.message. A message from the user to the agent, with content blocks. / Always user.define_outcome. The user defined the outcome the agent should reach. / Always system.message. A message produced by the platform rather than the user or the agent.
initial_events[].description string What the agent should produce. This is the task specification.
initial_events[].rubric object Rubric for grading the quality of an outcome.
initial_events[].max_iterations null | number Eval→revision cycles before giving up. Default 3, max 20.
metadata object Arbitrary key-value metadata. Maximum 16 pairs.
name string Human-readable name.
paused_reason null | object Why a deployment is paused. Non-null exactly when status is paused.
paused_reason.type string Always manual. An explicit request triggered this run or paused this deployment. / Always error. A stream error.
paused_reason.error object The error that triggered an auto-pause. Matches the failed run's error.type.
resources array<object> Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].type string Always github_repository. A GitHub repository resource; not supported on this platform. / Always file. A file resource: an uploaded file mounted into the session's machine. / Always memory_store. A memory store resource; not supported on this platform.
resources[].url string Github URL of the repository
resources[].checkout null | object Branch or commit to check out. Defaults to the repository's default branch.
resources[].mount_path null | string Mount path in the container. Defaults to /workspace/<repo-name>. / Mount path in the container. Defaults to /mnt/session/uploads/<file_id>.
resources[].file_id string ID of a previously uploaded file.
resources[].memory_store_id string The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].access null | string Access mode for an attached memory store.
resources[].instructions null | 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.
schedule null | object 5-field POSIX cron schedule with computed runtime timestamps.
schedule.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).
schedule.timezone string IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.type string Always cron. A five-field POSIX schedule matched in its IANA timezone.
schedule.last_run_at null | string A timestamp in RFC 3339 format
schedule.upcoming_runs_at array<string> 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.
status string Lifecycle status of a deployment.
type string Always deployment. A frozen set of session parameters and an optional schedule.
updated_at string A timestamp in RFC 3339 format
vault_ids array<string> Vault IDs supplying stored credentials for sessions created from this deployment.
budget null | object A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches max_list_cost.
budget.max_list_cost object A monetary amount in a specific currency.
budget.type string Budget kind; always limit. Any other value, including max_list_cost, returns 400 budget.type must be "limit".
target object Execution target. environment (default) requires an existing, unarchived environment_id. computer is available only for general agents and permits environment_id to be omitted.
target.type string environment uses an environment recipe; computer uses the agent computer.

Before running the example

Create a deployment and replace depl_123 with its ID. Get drun_123 from Run deployment. Pause before testing unpause. After testing, wait for created sessions to become idle and delete them, then archive the deployment, environment and agent.