# Write a draft for somebody to look over

Writes the words of an email or text and queues them for approval instead of sending them: write a draft here when a person should look over the wording before it goes out. A DRAFT IS NOT SENT — this route queues words, and approving them later does not put them on a rail either. Body: `recipient` (required — the number or address it is addressed to), `body` (required — the words), `channel` ("email" or "sms"), `subject` (email only; a text draft carrying one is refused), `templateId` (the template it came from, this workspace's) and `entityKind`/`entityId` (the record it is about). To send one straight away instead, `post_comms_send`; for the same words to a whole list of people, `post_blasts`; for a first pass Neo drafts about a record, `post_comms_drafts_ai`.

Access class: `workspace`.

## Endpoint

`POST /v1/message-drafts`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "body": "string",
    "channel": "string",
    "entityId": 1,
    "entityKind": "string",
    "recipient": "string",
    "subject": "string",
    "templateId": 1
  },
  "params": {},
  "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"
}
```
