# List Deployments

`GET /api/workflows/{id}/deployments`

## Description
List the workflow's deployment versions, newest first. Requires read access; scoped keys need a read grant.

## Parameters

- **id** (path) (required) — `string`: The unique identifier of the workflow.

## Responses

### 200 — Deployment versions.

```json
{
  "type": "object",
  "properties": {
    "versions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Deployment version ID."
          },
          "version": {
            "type": "integer",
            "description": "Version number, increasing with each deploy."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional label for the version."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional notes for the version."
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether this version is the one that runs."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "User ID that created the version."
          },
          "deployedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the deployer."
          },
          "sourceControlObjectId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceCommitSha": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceBranch": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
```

### 401 — Invalid or missing API key. Ensure the X-API-Key header is set with a valid key.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 403 — The key's owner lacks read access to the workflow in its workspace.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```

### 404 — The requested resource was not found. Verify the ID is correct and belongs to your workspace.

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable error message."
    }
  }
}
```
