# API: Deployments

Environments and what each serves: deploy, check, cancel and remove releases.

Part of the API reference: requests carry a personal access token as `Authorization: Bearer <token>`, and bodies and answers are JSON.

- [API reference](https://typefuse.dev/guides/api-reference)
- [Try it in the API console](https://api.typefuse.dev/docs)

## Environments

### GET /v1/organisations/{org}/environments

**List environments.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `environments` | `array` |  |
| `requirePassingTests` | `boolean` | The organisation's "Require a passing Test set" rule. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/environments" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

## Deployments

### GET /v1/organisations/{org}/deployments

**List the organisation's deployments.**

What is live where, across the organisation's decisions.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `deployments` | `array` |  |
| `environments` | `array` |  |
| `requirePassingTests` | `boolean` | The organisation's "Require a passing Test set" rule. |
| `productionRoute` | `string`, one of `proxy`, `passthrough`, `relay` | How a new production environment's callers reach TypeSafe when its creator does not choose: `passthrough` (BYOK) for self-serve organisations, `proxy` (Managed) on Enterprise. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/deployments" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### GET /v1/organisations/{org}/decisions/{slug}/deployments

**List a Decision's deployments.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `current` | `array` | The active deployment per environment, if any. |
| `pending` | `array` | Requests waiting for approval or a scheduled time: deploys, removals (action "remove") and line retirements (`retires`). |
| `history` | `array` | Every deployment, newest first. |
| `environments` | `array` |  |
| `calls` | `array of { "environment": string, "versionNumber": integer, "semanticVersion": string, "last24h": integer, "last7d": integer }` | Calls answered per environment and release in the last 7 days (shadow runs left out), so the callers still using an older major line are visible before it is retired. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/deployments

**Deploy a version.**

Pins a version to an environment and publishes the record the runtime reads.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `environment` | `string` | Required |  |
| `versionNumber` | `integer` | Required |  |
| `variants` | `array of { "versionNumber": integer, "role": string, "weight": number }` | Optional | Canaries and shadows to run beside the primary; variant weights must sum to under 1. |
| `note` | `string or null` | Optional |  |
| `scheduledFor` | `string or null` | Optional | ISO time at least a minute ahead; the deployment waits until then. |
| `retireLines` | `boolean` | Optional | Default false: the newest release of every other major line serving here stays live for callers that accept it. True retires them with this deploy. |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `action` | `string`, one of `deploy`, `remove` | What the row asks for. "deploy" puts versionId into service; "remove" takes the decision out of the environment. A pending "remove" is a removal request ("Removal requested"); once carried out its status is "removed", versionId is the primary it took out of service and variants lists the compatibility lines it kept available (empty when they were retired). A line retirement is a "deploy" row with `retires` set. |
| `environment` | `string` |  |
| `versionId` | `string` |  |
| `versionNumber` | `integer` |  |
| `semanticVersion` | `string` |  |
| `variants` | `array of { "versionNumber": integer, "semanticVersion": string, "role": string, "weight": number }` |  |
| `note` | `string or null` |  |
| `status` | `string`, one of `pending`, `scheduled`, `active`, `superseded`, `removed`, `rejected`, `cancelled` |  |
| `kind` | `string`, one of `manual`, `api`, `scheduled`, `release` |  |
| `deployedBy` | `integer or null` | The person who asked, or null when a deploy token did. |
| `token` | `object or null` | The deploy token that asked, if one did. |
| `token.id` | `string` |  |
| `token.name` | `string` |  |
| `requestedVia` | `object or null` | The agent or app the person asked through ("Claude Code, acting for Dana"); null in the app. |
| `requestedVia.kind` | `string`, one of `token`, `connection` | "token": a personal access token (an agent or a script); "connection": an app connected in the browser. |
| `requestedVia.name` | `string` | The token's or the app's name, such as "Claude Code". |
| `onBehalfOf` | `integer or null` | The person the request counts as coming from: deployedBy, or the maker of the deploy token. |
| `scheduledFor` | `string or null` | When it goes (or went) live, if it was scheduled. |
| `deployedAt` | `string` |  |
| `endedAt` | `string or null` |  |
| `approvedBy` | `integer or null` |  |
| `approvedAt` | `string or null` |  |
| `approvalNote` | `string or null` |  |
| `removal` | `object or null` | The options a removal was asked with; null on deploy rows. |
| `removal.cancelRequests` | `boolean` | Also cancel the environment's other pending and scheduled requests for this decision. |
| `removal.retireLines` | `boolean` | Retire the lines that were serving: they do not come back as compatibility lanes when a later deployment of another major goes live. |
| `retireLines` | `boolean` | On a deploy: it was asked to retire the older major lines, so none was carried over and only this release (with its canary or shadow) serves once it is live. |
| `retires` | `object or null` | Set on a line retirement: the older major line it takes out of service. Waiting, it is a request to retire that line; live, it is what served before, less that line (versionId and variants are what serves). |
| `retires.versionNumber` | `integer` |  |
| `retires.semanticVersion` | `string` |  |
| `release` | `object or null` | The release this row is a member of, if any. |
| `release.number` | `integer` |  |
| `release.deploymentId` | `string` |  |
| `canApprove` | `boolean` | Whether the caller may approve or reject this request. |
| `canCancel` | `boolean` | Whether the caller may cancel it before it goes live. |
| `approval` | `object or null` | On a request waiting for approval: why the caller can or cannot approve it, and who can. |
| `approval.reason` | `string` | One plain sentence: why the caller can or cannot approve. |
| `approval.requiresSecondApprover` | `boolean` | The environment needs a second person: the requester (and their agents and tokens) never approve. |
| `approval.approvers` | `array of integer` | Everyone who could approve it now, by user id. |
| `approval.nobodyCanApprove` | `boolean` | Nobody can approve it: an owner or admin turns the second person off, or names an approver. |
| `outcome` | `string` | On the response to a deploy request only: what happened and why, and where to act next. |
| `warnings` | `array of string` | On the response to a deploy request only: what looks unwise but is allowed, such as a release going to production without an Evaluation. |
| `duplicate` | `boolean` | On the response to a deploy request only: true when the same release was already waiting for approval here, so no second request was made and this is that request. |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"environment":"production","versionNumber":1}'
```

### GET /v1/organisations/{org}/decisions/{slug}/deployments/check

**Check a deployment.**

What a deploy of this release here would do, without doing it: approval, a request already waiting, warnings.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Query**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `environment` | `string` | Required |  |
| `versionNumber` | `integer` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `environment` | `string` |  |
| `semanticVersion` | `string` |  |
| `requiresApproval` | `boolean` | The caller's deploy here waits for a person to approve it (the environment's approval mode, and who is asking). |
| `requiresSecondApprover` | `boolean` | A deploy here waits for a second person: the caller cannot approve their own request. |
| `warnings` | `array of string` | What looks unwise but is allowed; the same warnings the deploy would carry. |
| `waiting` | `object or null` | A request for this release already waiting for approval here; deploying again returns it. |
| `waiting.id` | `string` |  |
| `waiting.action` | `string`, one of `deploy`, `remove` | What the row asks for. "deploy" puts versionId into service; "remove" takes the decision out of the environment. A pending "remove" is a removal request ("Removal requested"); once carried out its status is "removed", versionId is the primary it took out of service and variants lists the compatibility lines it kept available (empty when they were retired). A line retirement is a "deploy" row with `retires` set. |
| `waiting.environment` | `string` |  |
| `waiting.versionId` | `string` |  |
| `waiting.versionNumber` | `integer` |  |
| `waiting.semanticVersion` | `string` |  |
| `waiting.variants` | `array of { "versionNumber": integer, "semanticVersion": string, "role": string, "weight": number }` |  |
| `waiting.note` | `string or null` |  |
| `waiting.status` | `string`, one of `pending`, `scheduled`, `active`, `superseded`, `removed`, `rejected`, `cancelled` |  |
| `waiting.kind` | `string`, one of `manual`, `api`, `scheduled`, `release` |  |
| `waiting.deployedBy` | `integer or null` | The person who asked, or null when a deploy token did. |
| `waiting.token` | `object or null` | The deploy token that asked, if one did. |
| `waiting.requestedVia` | `object or null` | The agent or app the person asked through ("Claude Code, acting for Dana"); null in the app. |
| `waiting.onBehalfOf` | `integer or null` | The person the request counts as coming from: deployedBy, or the maker of the deploy token. |
| `waiting.scheduledFor` | `string or null` | When it goes (or went) live, if it was scheduled. |
| `waiting.deployedAt` | `string` |  |
| `waiting.endedAt` | `string or null` |  |
| `waiting.approvedBy` | `integer or null` |  |
| `waiting.approvedAt` | `string or null` |  |
| `waiting.approvalNote` | `string or null` |  |
| `waiting.removal` | `object or null` | The options a removal was asked with; null on deploy rows. |
| `waiting.retireLines` | `boolean` | On a deploy: it was asked to retire the older major lines, so none was carried over and only this release (with its canary or shadow) serves once it is live. |
| `waiting.retires` | `object or null` | Set on a line retirement: the older major line it takes out of service. Waiting, it is a request to retire that line; live, it is what served before, less that line (versionId and variants are what serves). |
| `waiting.release` | `object or null` | The release this row is a member of, if any. |
| `waiting.canApprove` | `boolean` | Whether the caller may approve or reject this request. |
| `waiting.canCancel` | `boolean` | Whether the caller may cancel it before it goes live. |
| `waiting.approval` | `object or null` | On a request waiting for approval: why the caller can or cannot approve it, and who can. |
| `waiting.outcome` | `string` | On the response to a deploy request only: what happened and why, and where to act next. |
| `waiting.warnings` | `array of string` | On the response to a deploy request only: what looks unwise but is allowed, such as a release going to production without an Evaluation. |
| `waiting.duplicate` | `boolean` | On the response to a deploy request only: true when the same release was already waiting for approval here, so no second request was made and this is that request. |
| `evidence` | `object` | The release's latest completed Evaluation (its plan's, draft or release). |
| `evidence.state` | `string`, one of `none`, `passed`, `mixed`, `failing` |  |
| `evidence.agreed` | `integer` |  |
| `evidence.cases` | `integer` |  |
| `passingTestsRequired` | `boolean` | The environment requires a passing Test set (every case agreed in the latest Evaluation). A release without one is refused by the check itself, with the deploy's 409 PASSING_TESTS_REQUIRED. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments/check?environment=production&versionNumber=1" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/deployments/republish

**Republish a Decision's runtime records.**

Rewrites the decision's runtime records from the database; idempotent. Owners and admins.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `published` | `array of string` | Environments whose runtime record was rewritten. |
| `cleared` | `array of string` | Environments with nothing live, whose runtime record was deleted. |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments/republish" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/deployments/{deploymentId}/cancel

**Cancel a deployment request.**

Withdraws a pending or scheduled deployment before it goes live.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `deploymentId` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `action` | `string`, one of `deploy`, `remove` | What the row asks for. "deploy" puts versionId into service; "remove" takes the decision out of the environment. A pending "remove" is a removal request ("Removal requested"); once carried out its status is "removed", versionId is the primary it took out of service and variants lists the compatibility lines it kept available (empty when they were retired). A line retirement is a "deploy" row with `retires` set. |
| `environment` | `string` |  |
| `versionId` | `string` |  |
| `versionNumber` | `integer` |  |
| `semanticVersion` | `string` |  |
| `variants` | `array of { "versionNumber": integer, "semanticVersion": string, "role": string, "weight": number }` |  |
| `note` | `string or null` |  |
| `status` | `string`, one of `pending`, `scheduled`, `active`, `superseded`, `removed`, `rejected`, `cancelled` |  |
| `kind` | `string`, one of `manual`, `api`, `scheduled`, `release` |  |
| `deployedBy` | `integer or null` | The person who asked, or null when a deploy token did. |
| `token` | `object or null` | The deploy token that asked, if one did. |
| `token.id` | `string` |  |
| `token.name` | `string` |  |
| `requestedVia` | `object or null` | The agent or app the person asked through ("Claude Code, acting for Dana"); null in the app. |
| `requestedVia.kind` | `string`, one of `token`, `connection` | "token": a personal access token (an agent or a script); "connection": an app connected in the browser. |
| `requestedVia.name` | `string` | The token's or the app's name, such as "Claude Code". |
| `onBehalfOf` | `integer or null` | The person the request counts as coming from: deployedBy, or the maker of the deploy token. |
| `scheduledFor` | `string or null` | When it goes (or went) live, if it was scheduled. |
| `deployedAt` | `string` |  |
| `endedAt` | `string or null` |  |
| `approvedBy` | `integer or null` |  |
| `approvedAt` | `string or null` |  |
| `approvalNote` | `string or null` |  |
| `removal` | `object or null` | The options a removal was asked with; null on deploy rows. |
| `removal.cancelRequests` | `boolean` | Also cancel the environment's other pending and scheduled requests for this decision. |
| `removal.retireLines` | `boolean` | Retire the lines that were serving: they do not come back as compatibility lanes when a later deployment of another major goes live. |
| `retireLines` | `boolean` | On a deploy: it was asked to retire the older major lines, so none was carried over and only this release (with its canary or shadow) serves once it is live. |
| `retires` | `object or null` | Set on a line retirement: the older major line it takes out of service. Waiting, it is a request to retire that line; live, it is what served before, less that line (versionId and variants are what serves). |
| `retires.versionNumber` | `integer` |  |
| `retires.semanticVersion` | `string` |  |
| `release` | `object or null` | The release this row is a member of, if any. |
| `release.number` | `integer` |  |
| `release.deploymentId` | `string` |  |
| `canApprove` | `boolean` | Whether the caller may approve or reject this request. |
| `canCancel` | `boolean` | Whether the caller may cancel it before it goes live. |
| `approval` | `object or null` | On a request waiting for approval: why the caller can or cannot approve it, and who can. |
| `approval.reason` | `string` | One plain sentence: why the caller can or cannot approve. |
| `approval.requiresSecondApprover` | `boolean` | The environment needs a second person: the requester (and their agents and tokens) never approve. |
| `approval.approvers` | `array of integer` | Everyone who could approve it now, by user id. |
| `approval.nobodyCanApprove` | `boolean` | Nobody can approve it: an owner or admin turns the second person off, or names an approver. |
| `outcome` | `string` | On the response to a deploy request only: what happened and why, and where to act next. |
| `warnings` | `array of string` | On the response to a deploy request only: what looks unwise but is allowed, such as a release going to production without an Evaluation. |
| `duplicate` | `boolean` | On the response to a deploy request only: true when the same release was already waiting for approval here, so no second request was made and this is that request. |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments/<deploymentId>/cancel" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### DELETE /v1/organisations/{org}/decisions/{slug}/deployments/{environment}

**Take a Decision out of an environment.**

Takes the decision out of an environment with the default options (cancel waiting requests, keep compatibility lines). 204 when done; 202 with the removal request where the environment requires approval and the caller cannot approve.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `environment` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `status` | `string`, one of `removed`, `pending` | "removed" when it took effect (200); "pending" when it waits for approval (202). |
| `deployment` | `object` | The removal row (action "remove"). |
| `deployment.id` | `string` |  |
| `deployment.action` | `string`, one of `deploy`, `remove` | What the row asks for. "deploy" puts versionId into service; "remove" takes the decision out of the environment. A pending "remove" is a removal request ("Removal requested"); once carried out its status is "removed", versionId is the primary it took out of service and variants lists the compatibility lines it kept available (empty when they were retired). A line retirement is a "deploy" row with `retires` set. |
| `deployment.environment` | `string` |  |
| `deployment.versionId` | `string` |  |
| `deployment.versionNumber` | `integer` |  |
| `deployment.semanticVersion` | `string` |  |
| `deployment.variants` | `array of { "versionNumber": integer, "semanticVersion": string, "role": string, "weight": number }` |  |
| `deployment.note` | `string or null` |  |
| `deployment.status` | `string`, one of `pending`, `scheduled`, `active`, `superseded`, `removed`, `rejected`, `cancelled` |  |
| `deployment.kind` | `string`, one of `manual`, `api`, `scheduled`, `release` |  |
| `deployment.deployedBy` | `integer or null` | The person who asked, or null when a deploy token did. |
| `deployment.token` | `object or null` | The deploy token that asked, if one did. |
| `deployment.requestedVia` | `object or null` | The agent or app the person asked through ("Claude Code, acting for Dana"); null in the app. |
| `deployment.onBehalfOf` | `integer or null` | The person the request counts as coming from: deployedBy, or the maker of the deploy token. |
| `deployment.scheduledFor` | `string or null` | When it goes (or went) live, if it was scheduled. |
| `deployment.deployedAt` | `string` |  |
| `deployment.endedAt` | `string or null` |  |
| `deployment.approvedBy` | `integer or null` |  |
| `deployment.approvedAt` | `string or null` |  |
| `deployment.approvalNote` | `string or null` |  |
| `deployment.removal` | `object or null` | The options a removal was asked with; null on deploy rows. |
| `deployment.retireLines` | `boolean` | On a deploy: it was asked to retire the older major lines, so none was carried over and only this release (with its canary or shadow) serves once it is live. |
| `deployment.retires` | `object or null` | Set on a line retirement: the older major line it takes out of service. Waiting, it is a request to retire that line; live, it is what served before, less that line (versionId and variants are what serves). |
| `deployment.release` | `object or null` | The release this row is a member of, if any. |
| `deployment.canApprove` | `boolean` | Whether the caller may approve or reject this request. |
| `deployment.canCancel` | `boolean` | Whether the caller may cancel it before it goes live. |
| `deployment.approval` | `object or null` | On a request waiting for approval: why the caller can or cannot approve it, and who can. |
| `deployment.outcome` | `string` | On the response to a deploy request only: what happened and why, and where to act next. |
| `deployment.warnings` | `array of string` | On the response to a deploy request only: what looks unwise but is allowed, such as a release going to production without an Evaluation. |
| `deployment.duplicate` | `boolean` | On the response to a deploy request only: true when the same release was already waiting for approval here, so no second request was made and this is that request. |
| `cancelled` | `array` | The waiting requests the removal cancelled. |

```sh
curl -X DELETE "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments/production" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/deployments/{environment}/remove

**Take a Decision out of an environment, with options.**

Takes the decision out of an environment with the options chosen. 200 when done; 202 when it waits for approval. 503 RUNTIME_SYNC_FAILED when saved but the runtime was not updated (republish to repair).

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `environment` | `string` | Required |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `cancelRequests` | `boolean` | Optional | Default true. |
| `retireLines` | `boolean` | Optional | Default false: older major lines stay available to callers that accept them. |
| `note` | `string or null` | Optional |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `status` | `string`, one of `removed`, `pending` | "removed" when it took effect (200); "pending" when it waits for approval (202). |
| `deployment` | `object` | The removal row (action "remove"). |
| `deployment.id` | `string` |  |
| `deployment.action` | `string`, one of `deploy`, `remove` | What the row asks for. "deploy" puts versionId into service; "remove" takes the decision out of the environment. A pending "remove" is a removal request ("Removal requested"); once carried out its status is "removed", versionId is the primary it took out of service and variants lists the compatibility lines it kept available (empty when they were retired). A line retirement is a "deploy" row with `retires` set. |
| `deployment.environment` | `string` |  |
| `deployment.versionId` | `string` |  |
| `deployment.versionNumber` | `integer` |  |
| `deployment.semanticVersion` | `string` |  |
| `deployment.variants` | `array of { "versionNumber": integer, "semanticVersion": string, "role": string, "weight": number }` |  |
| `deployment.note` | `string or null` |  |
| `deployment.status` | `string`, one of `pending`, `scheduled`, `active`, `superseded`, `removed`, `rejected`, `cancelled` |  |
| `deployment.kind` | `string`, one of `manual`, `api`, `scheduled`, `release` |  |
| `deployment.deployedBy` | `integer or null` | The person who asked, or null when a deploy token did. |
| `deployment.token` | `object or null` | The deploy token that asked, if one did. |
| `deployment.requestedVia` | `object or null` | The agent or app the person asked through ("Claude Code, acting for Dana"); null in the app. |
| `deployment.onBehalfOf` | `integer or null` | The person the request counts as coming from: deployedBy, or the maker of the deploy token. |
| `deployment.scheduledFor` | `string or null` | When it goes (or went) live, if it was scheduled. |
| `deployment.deployedAt` | `string` |  |
| `deployment.endedAt` | `string or null` |  |
| `deployment.approvedBy` | `integer or null` |  |
| `deployment.approvedAt` | `string or null` |  |
| `deployment.approvalNote` | `string or null` |  |
| `deployment.removal` | `object or null` | The options a removal was asked with; null on deploy rows. |
| `deployment.retireLines` | `boolean` | On a deploy: it was asked to retire the older major lines, so none was carried over and only this release (with its canary or shadow) serves once it is live. |
| `deployment.retires` | `object or null` | Set on a line retirement: the older major line it takes out of service. Waiting, it is a request to retire that line; live, it is what served before, less that line (versionId and variants are what serves). |
| `deployment.release` | `object or null` | The release this row is a member of, if any. |
| `deployment.canApprove` | `boolean` | Whether the caller may approve or reject this request. |
| `deployment.canCancel` | `boolean` | Whether the caller may cancel it before it goes live. |
| `deployment.approval` | `object or null` | On a request waiting for approval: why the caller can or cannot approve it, and who can. |
| `deployment.outcome` | `string` | On the response to a deploy request only: what happened and why, and where to act next. |
| `deployment.warnings` | `array of string` | On the response to a deploy request only: what looks unwise but is allowed, such as a release going to production without an Evaluation. |
| `deployment.duplicate` | `boolean` | On the response to a deploy request only: true when the same release was already waiting for approval here, so no second request was made and this is that request. |
| `cancelled` | `array` | The waiting requests the removal cancelled. |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/deployments/production/remove" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```
