> ## 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.

# List deployments

> List all deployments under the current account with cursor pagination.

`GET /api/v1/cloud/deployments`

Retrieves all deployments under the current account with cursor pagination. Results are sorted by creation time in descending order (newest first). Archived deployments are excluded by default.

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |

## Query parameters

| Parameter          | Type    | Required | Description                                                                                                        |
| ------------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `limit`            | integer | No       | Maximum number of records to return. Default 20, range 1-100. Values above 100 return `400 invalid_request_error`. |
| `page`             | string  | No       | Cursor value returned by `next_page`. Do not combine with `before_id` or `after_id`.                               |
| `after_id`         | string  | No       | Cursor pagination: return records after this ID                                                                    |
| `before_id`        | string  | No       | Cursor pagination: return records before this ID                                                                   |
| `status`           | string  | No       | Filter by status: `active`, `paused`                                                                               |
| `include_archived` | boolean | No       | Include archived deployments. Default `false`.                                                                     |
| `agent_id`         | string  | No       | Filter by Agent ID                                                                                                 |
| `created_at[gte]`  | string  | No       | Return deployments created at or after this RFC3339 timestamp                                                      |
| `created_at[lte]`  | string  | No       | Return deployments created at or before this RFC3339 timestamp                                                     |

## Example request

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/deployments?limit=2" \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "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",
      "paused_reason": null,
      "resources": [],
      "schedule": {
        "expression": "0 9 * * *",
        "timezone": "Asia/Shanghai",
        "type": "cron",
        "upcoming_runs_at": [
          "2026-06-15T01:00:00Z",
          "2026-06-16T01:00:00Z",
          "2026-06-17T01:00:00Z",
          "2026-06-18T01:00:00Z",
          "2026-06-19T01:00:00Z"
        ]
      },
      "status": "active",
      "type": "deployment",
      "updated_at": "2026-06-14T08:53:32Z",
      "vault_ids": []
    }
  ],
  "first_id": "dep_019ec556114c78f8b60ee34fcb98bf59",
  "has_more": true,
  "last_id": "dep_019ec51604b87aaea12568c9ab7b7025",
  "next_page": "dep_019ec51604b87aaea12568c9ab7b7025"
}
```

## Response fields

| Field       | Type           | Description                                                                                |
| ----------- | -------------- | ------------------------------------------------------------------------------------------ |
| `data`      | array          | List of Deployment objects                                                                 |
| `first_id`  | string         | ID of the first record on the current page                                                 |
| `last_id`   | string         | ID of the last record on the current page                                                  |
| `has_more`  | boolean        | Whether more records are available                                                         |
| `next_page` | string or null | Cursor value for the next page (same as `last_id` when `has_more` is true, null otherwise) |

Use `next_page` as the `page` parameter on the next request to page forward.

## Errors

| HTTP | Type                   | Trigger                |
| ---- | ---------------------- | ---------------------- |
| 401  | `authentication_error` | PAT invalid or expired |

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

## Related

<CardGroup cols={2}>
  <Card title="Create a deployment" icon="plus" href="/cloud-agents/api/deployments/create">
    Create a new cron-scheduled or manually-triggered deployment.
  </Card>

  <Card title="Get a deployment" icon="layer-group" href="/cloud-agents/api/deployments/get">
    Retrieve details for a single deployment.
  </Card>

  <Card title="List all runs" icon="clock" href="/cloud-agents/api/deployments/list-all-runs">
    Query run history across all deployments.
  </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>
