Change a draft's words or subject

PATCH
/v1/drafts/{id}

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.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The draft id.

Request Body

application/json
  1. body
text?string

The new words.

Length1 <= length <= 20000
subject?string

The new subject.

Length1 <= length <= 200
attachments?array<|||>

Files to add to the draft (same forms as on a send). The files already on it count toward the limits.

Itemsitems <= 50
files?array<|>

Email only: files the user dropped into ChatGPT, each { download_url, file_id, mime_type?, file_name? }. Fetched and checked like attachments.

Items1 <= items <= 20
removeAttachments?array<>

Ids of files to take off the draft (each file's id in the draft's attachments).

Itemsitems <= 50

Response Body

The draft after the change

application/json
  1. response
draft*
Example Request
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."  }'
Example Response
{  "draft": {    "id": "0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32",    "conversationId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21",    "mailbox": "[email protected]",    "to": "[email protected]",    "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  }}