# Cancel a draft

Closes a queued draft with a reason so nobody acts on it. Body `{"reason": "…"}`, optional. Cancelling an APPROVED draft is allowed — nothing has gone anywhere — and it clears the approval stamp with it, so the row never claims both. Cancelling an already cancelled one answers not-found rather than stamping it twice. To fix the words instead of binning them, `patch_message-drafts_id`.

Access class: `workspace`.

## Endpoint

`POST /v1/message-drafts/{id}/cancel`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "reason": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "aiFlaggedFigures": [
      "string"
    ],
    "aiGenerated": true,
    "aiIntent": "string",
    "aiModel": "string",
    "aiPromptHash": "string",
    "approvedAt": "string",
    "approvedByUserId": 1,
    "body": "string",
    "cancellationReason": "string",
    "cancelledAt": "string",
    "channel": "string",
    "createdAt": "string",
    "createdByKind": "string",
    "createdByUserId": 1,
    "detail": {},
    "entityId": 1,
    "entityKind": "string",
    "id": 1,
    "recipient": "string",
    "recordDefinitionKey": "string",
    "recordRowId": "",
    "ruleId": 1,
    "status": "string",
    "subject": "string",
    "templateId": 1,
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
