Skip to main content
PATCH
/
api
/
email
/
drafts
/
{uid}
Update outbound email draft
curl --request PATCH \
  --url https://dev.exante.app/api/email/drafts/{uid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": [
    "<string>"
  ],
  "cc": [
    "<string>"
  ],
  "bcc": [
    "<string>"
  ],
  "subject": "<string>",
  "body_text": "<string>",
  "body_html": "<string>",
  "attachments": [
    {
      "filename": "<string>",
      "content_type": "<string>",
      "data_base64": "<string>"
    }
  ],
  "context_type": "<string>",
  "context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "planned_send_at": "2023-11-07T05:31:56Z"
}
'
{
  "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "from_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "from_email": "<string>",
  "to": [
    "<string>"
  ],
  "cc": [
    "<string>"
  ],
  "bcc": [
    "<string>"
  ],
  "subject": "<string>",
  "body_text": "<string>",
  "body_html": "<string>",
  "context_type": "<string>",
  "context_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "planned_send_at": "2023-11-07T05:31:56Z",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
Modify an existing email draft. Only include the fields you want to change—omitted fields remain unchanged. This enables incremental composition where different parts of the email can be updated in separate requests.
This endpoint is deprecated. Prefer Save Draft (Create or Update) with:
{
  "uid": "<draft-uuid>",
  "subject": "Updated subject"
}

Path Parameters

ParameterDescription
uidThe draft’s unique identifier (UUID)

Updatable Fields

All fields are optional. Include only what you’re changing:
FieldDescription
toReplace recipient list
cc / bccReplace CC/BCC lists
subjectUpdate subject line
body_textUpdate plain text body
body_htmlUpdate HTML body
attachmentsReplace attachment list
context_type / context_idUpdate linked entity
planned_send_atSet or update scheduled send time

Example: Update Subject and Body

{
  "subject": "Updated: Invoice INV-2024-001",
  "body_text": "Hi,\n\nWe've updated the invoice details..."
}

Example: Schedule for Later

{
  "planned_send_at": "2024-03-27T14:00:00Z"
}

Example: Clear Scheduled Time

{
  "planned_send_at": null
}

Response

Returns the updated draft record with all fields:
{
  "uid": "draft-uuid",
  "from_account_id": "account-uuid",
  "from_email": "sender@mycompany.com",
  "to": ["customer@example.com"],
  "subject": "Updated: Invoice INV-2024-001",
  "body_text": "Hi,\n\nWe've updated the invoice details...",
  "status": "draft",
  "updated_at": "2024-03-25T15:00:00Z"
}

Error Responses

StatusDescription
404Draft not found
400Validation error (e.g., invalid email format)
You cannot update a draft that has already been sent (status is not DRAFT).

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

uid
string<uuid>
required

Body

application/json
to
string[]
cc
string[]
bcc
string[]
subject
string
body_text
string
body_html
string
attachments
object[]
context_type
string
context_id
string<uuid>
planned_send_at
string<date-time>

Response

200 - application/json

Draft updated

uid
string<uuid>
from_account_id
string<uuid>
from_email
string
to
string[]
cc
string[]
bcc
string[]
subject
string
body_text
string
body_html
string
context_type
string
context_id
string<uuid>
planned_send_at
string<date-time>
status
string
created_at
string<date-time>
updated_at
string<date-time>