# Deployment

> Immutable record of one rollout.

Immutable record of one rollout. Its image, settings snapshot and secret versions never change; only status fields move.

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `id` * | string |  |
| `project_id` * | string |  |
| `environment_id` * | string |  |
| `service_id` * | string |  |
| `service_name` | string |  |
| `environment_name` | string |  |
| `status` * | [DeploymentStatus](/docs/api/objects/deployment-status/) |  |
| `status_text` | string |  |
| `trigger` * | object |  |
| `source` | object |  |
| `build_id` | string or null |  |
| `image` | object or null |  |
| `config` | [ServiceConfig](/docs/api/objects/service-config/) |  |
| `rollback_of` | string or null | The earlier deployment whose image this deployment re-promotes. |
| `operation_id` | string or null |  |
| `url` | string (uri) or null |  |
| `failure` | object or null | Short failure summary; the full explanation is at `/explanation`. |
| `created_at` * | string (date-time) |  |
| `started_at` | string (date-time) or null |  |
| `active_at` | string (date-time) or null |  |
| `finished_at` | string (date-time) or null |  |
| `duration_ms` | integer or null |  |

\* always present

## Example

```json
{
  "id": "dep_01jbx2m9k7q4r8t5v6w3y0z1dp",
  "project_id": "prj_01jbx2m9k7q4r8t5v6w3y0z1pr",
  "environment_id": "env_01jbx2m9k7q4r8t5v6w3y0z1en",
  "service_id": "svc_01jbx2m9k7q4r8t5v6w3y0z1sv",
  "service_name": "web",
  "environment_name": "production",
  "status": "active",
  "status_text": "Live since 14:05",
  "trigger": {
    "kind": "git_push",
    "actor": {
      "type": "github",
      "id": "stewartwebb",
      "display": "stewartwebb pushed to main"
    }
  },
  "source": {
    "kind": "git",
    "commit": {
      "sha": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678",
      "branch": "main",
      "message": "Fix rota export",
      "author": "Stewart Webb"
    }
  },
  "build_id": "bld_01jbx2m9k7q4r8t5v6w3y0z1bd",
  "image": {
    "digest": "sha256:4b1f0e9d8c7b6a5948372615f4e3d2c1b0a9f8e7d6c5b4a3928170f6e5d4c3b2",
    "signed": true
  },
  "rollback_of": null,
  "operation_id": "op_01jbx2m9k7q4r8t5v6w3y0z1op",
  "url": "https://www.primecarers.co.uk",
  "failure": null,
  "created_at": "2026-10-23T14:02:00Z",
  "started_at": "2026-10-23T14:02:01Z",
  "active_at": "2026-10-23T14:05:12Z",
  "finished_at": "2026-10-23T14:05:12Z",
  "duration_ms": 191000
}
```

## Used by

- [Get a deployment](/docs/api/deployments/#get-a-deployment)
- [Cancel a deployment that has not gone live](/docs/api/deployments/#cancel-a-deployment-that-has-not-gone-live)
