# Change a draft's words or subject

Source: https://docs.vlayers.ai/reference/messages/update-draft

`PATCH /v1/drafts/{id}` · scope `messages:send`

Replaces the words or the subject, adds files, or takes files off, of a draft that has not been sent. Who it goes to cannot change: write a new draft for someone else. A sent or thrown-away draft is refused with 409.

Requires an API key with the `messages:send` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The draft id. Example: `"0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32"` |
| `text` | body | string | no | The new words. |
| `subject` | body | string | no | The new subject. |
| `attachments` | body | object[] | no | Files to add to the draft (same forms as on a send). The files already on it count toward the limits. |
| `files` | body | object \| string[] | no | Email only: files the user dropped into ChatGPT, each `{ download_url, file_id, mime_type?, file_name? }`. Fetched and checked like `attachments`. |
| `removeAttachments` | body | string[] | no | Ids of files to take off the draft (each file's `id` in the draft's `attachments`). |

## Request

cURL:

```bash
curl -X PATCH "https://api.vlayers.ai/v1/drafts/$DRAFT_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Friday at 4pm works better for us."
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { draft } = await voicelayer.messages.updateDraft('<draft-id>', {
  text: 'Friday at 4pm works better for us.'
});
console.log(draft.body);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.messages.update_draft(
    "<draft-id>",
    text="Friday at 4pm works better for us.",
)
print(result.draft.body)
```

## Response `200`

```json
{
  "draft": {
    "id": "0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32",
    "conversationId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",
    "mailbox": "support@acme.vlayersmail.com",
    "to": "ada@example.org",
    "subject": "Friday",
    "body": "Friday at 4pm works better for us.",
    "attachments": [],
    "heldFor": "api",
    "origin": "composed",
    "state": "pending",
    "createdAt": "2026-10-20T15:04:05.000Z",
    "expiresAt": "2026-10-27T15:04:05.000Z",
    "decidedBy": null,
    "decidedAt": null,
    "edited": false,
    "reason": null
  }
}
```
