---
title: List Deployment Runs
url: https://platform.claude.com/docs/en/api/php/beta/deployment_runs/list
---

# List Deployment Runs

`$client->beta->deploymentRuns->list(?\Datetime createdAtGt, ?\Datetime createdAtGte, ?\Datetime createdAtLt, ?\Datetime createdAtLte, ?string deploymentID, ?bool hasError, ?int limit, ?string page, ?BetaManagedAgentsTriggerType triggerType, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<BetaManagedAgentsDeploymentRun>`

**GET** `/v1/deployment_runs`

List Deployment Runs

## Parameters

- `createdAtGt?: optional \Datetime` (query parameter)

  Return runs created strictly after this time (exclusive).

- `createdAtGte?: optional \Datetime` (query parameter)

  Return runs created at or after this time (inclusive).

- `createdAtLt?: optional \Datetime` (query parameter)

  Return runs created strictly before this time (exclusive).

- `createdAtLte?: optional \Datetime` (query parameter)

  Return runs created at or before this time (inclusive).

- `deploymentID?: optional string` (query parameter)

  Filter to a specific deployment. Omit to list across all deployments in the workspace. Filtering by a non-existent `deployment_id` returns 200 with empty data.

- `hasError?: optional bool` (query parameter)

  Filter: true for runs with non-null `error`, false for runs with non-null `session_id`. Omit for all.

- `limit?: optional int` (query parameter)

  Maximum results per page. Default 20, maximum 1000.

- `page?: optional string` (query parameter)

  Opaque pagination cursor. Pass `next_page` from the previous response. Invalid or expired cursors return 400.

- `triggerType?: optional BetaManagedAgentsTriggerType` (query parameter)

  Filter runs by what triggered them. Omit to return all runs.

- `betas?: optional list<AnthropicBeta>` (header parameter)

  This endpoint is in beta: requests must send `managed-agents-2026-04-01` in this header.

- `workspaceID?: optional string` (header parameter)

  Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

  Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

## Returns

- `class BetaManagedAgentsDeploymentRun`

  - `"deployment_run" type`

  - `string id`

    Unique identifier for this run (`drun_...`).

  - `BetaManagedAgentsAgentReference agent`

    Snapshot of the agent at fire time. Always fully resolved — deployments pin agent + version.

  - `\Datetime createdAt`

    Time this run record was persisted.

  - `string deploymentID`

    ID of the deployment that produced this run.

  - `?Error error`

    Populated on creation failure. Null on success. Exactly one of `session_id` or `error` is non-null.

  - `?string sessionID`

    Populated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.

  - `BetaManagedAgentsTriggerContext triggerContext`

    What triggered this run and trigger-specific metadata.

## Example

```php
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Beta\DeploymentRuns\BetaManagedAgentsTriggerType;

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->beta->deploymentRuns->list(
  createdAtGt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
  createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
  createdAtLt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
  createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
  deploymentID: 'deployment_id',
  hasError: true,
  limit: 0,
  page: 'page',
  triggerType: BetaManagedAgentsTriggerType::SCHEDULE,
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($page);
```

### Response (200)

```json
{
  "data": [
    {
      "id": "id",
      "agent": {
        "id": "agent_011CZkYqphY8vELVzwCUpqiQ",
        "type": "agent",
        "version": 1
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "deployment_id": "deployment_id",
      "error": {
        "message": "message",
        "type": "environment_archived_error"
      },
      "session_id": "session_id",
      "trigger_context": {
        "scheduled_at": "2019-12-27T18:11:19.117Z",
        "type": "schedule"
      },
      "type": "deployment_run"
    }
  ],
  "next_page": "next_page"
}
```
