drafts

Edit a draft

Changes only the fields you supply; a list you supply (recipients, attachments, labels) replaces the whole list. text and html are separate bodies: when you change one, update the other or clear it with html: null. source and idempotency_key can't be edited.

Supply attachments with only filename, type and content, even when reusing files read from the draft.

patch/v1/drafts/{draft_id}

Request

  • Base URL: https://cherami.to
  • URL: https://cherami.to/v1/drafts/{draft_id}
  • Auth: HTTP bearer

Path parameters

draft_idstring required

Cherami resource ID returned by the API.

Request body

subjectstring

No control characters; at most 998 UTF-8 bytes.

textstring

Plain-text body.

htmlstring nullable

HTML alternative, sent as supplied.

in_reply_tostring nullable

ID of a ready received message or an accepted sent message in this inbox that has a Message-ID header.

labelsLabel[]

Label names, case-sensitive; order and duplicates don't matter.

Response

Success.

idstring required

Cherami resource ID.

inbox_idstring required

Cherami resource ID.

state'draft' | 'submitted' required
subjectstring required
created_atstring date-time required

UTC timestamp with milliseconds.

updated_atstring date-time required

UTC timestamp with milliseconds.

sent_message_idstring nullable required

Cherami resource ID.

Changes

No recorded changes to this operation across all 1 revision of this API.