> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pause a deployment

> Pause a deployment to stop scheduled runs.

`POST /api/v1/cloud/deployments/{id}/pause`

Pauses a deployment. Scheduled runs will not fire while paused. The deployment's status becomes `"paused"` and `paused_reason` is set to `{"type": "manual"}`.

## Path parameters

| Parameter | Type   | Description                          |
| --------- | ------ | ------------------------------------ |
| `id`      | string | Deployment ID with the `dep_` prefix |

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |
| `Content-Type`  | Yes      | `application/json`  |

## Request body

No request body is required.

## Example request

```bash theme={null}
curl -X POST "https://api.qoder.com/api/v1/cloud/deployments/dep_019ec556114c78f8b60ee34fcb98bf59/pause" \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Content-Type: application/json"
```

## Example response

**HTTP 200 OK**

Returns the full Deployment object with updated status.

```json theme={null}
{
  "agent": {
    "id": "agent_019eb4d4a06d747c865d5800b9c57ae2",
    "type": "agent",
    "version": 1
  },
  "archived_at": null,
  "created_at": "2026-06-14T08:53:32Z",
  "description": "Deployment created for API documentation verification",
  "environment_id": "env_019e64e01a137caf953ac2ac7b42ec5c",
  "environment_variables": "",
  "id": "dep_019ec556114c78f8b60ee34fcb98bf59",
  "initial_events": [
    {
      "content": [
        {
          "type": "text",
          "text": "Generate today's status report"
        }
      ],
      "type": "user.message"
    }
  ],
  "metadata": {},
  "name": "api-doc-verification-deployment-v2",
  "paused_reason": {
    "type": "manual"
  },
  "resources": [],
  "schedule": {
    "expression": "30 9 * * 1-5",
    "last_run_at": "2026-06-14T08:54:06Z",
    "timezone": "Asia/Shanghai",
    "type": "cron",
    "upcoming_runs_at": [
      "2026-06-15T01:30:00Z",
      "2026-06-16T01:30:00Z",
      "2026-06-17T01:30:00Z",
      "2026-06-18T01:30:00Z",
      "2026-06-19T01:30:00Z"
    ]
  },
  "status": "paused",
  "type": "deployment",
  "updated_at": "2026-06-14T08:54:22Z",
  "vault_ids": []
}
```

## Errors

| HTTP | Type                   | Trigger                      |
| ---- | ---------------------- | ---------------------------- |
| 401  | `authentication_error` | PAT invalid or expired       |
| 404  | `not_found_error`      | Deployment does not exist    |
| 409  | `conflict_error`       | Deployment is already paused |

See [Errors](/cloud-agents/api/conventions/errors) for the full error envelope.

## Related

<CardGroup cols={2}>
  <Card title="Unpause a deployment" icon="play" href="/cloud-agents/api/deployments/unpause">
    Resume scheduling from a paused state.
  </Card>

  <Card title="Archive a deployment" icon="archive" href="/cloud-agents/api/deployments/archive">
    Permanently terminate the deployment.
  </Card>

  <Card title="Get a deployment" icon="layer-group" href="/cloud-agents/api/deployments/get">
    Inspect the deployment's current status and configuration.
  </Card>

  <Card title="Errors reference" icon="circle-exclamation" href="/cloud-agents/api/conventions/errors">
    All API error codes and the error envelope convention.
  </Card>
</CardGroup>
