Edit a pending draft; the current version is required
Edit a pending draft; the current version is required with the Mailly email API for AI agents: PATCH /mail-drafts/{id}. Parameters, request body, responses and code samples.
Each pending draft includes review_url: a private link where a person can read the exact email (from, to, subject, body) and send or discard it without signing in. Anyone with the link can do that, so share it only with the person who should decide. It expires after review_expires_at, and stops working once the draft is sent, discarded or edited (an edit returns a new link). Other drafts have review_url null.
bearerAuthAuthorizationBearer <token>Mailly API key(Authorization: Bearer )
id*string1 <= length <= 128application/json- body
text*string1 <= length <= 524288revision*integer0 < valuecc?|array<string>Cc addresses: comma-separated string or array. Replaces the current Cc when given.
Draft action succeeded
application/json- response
success*boolean[key: string]?unknowncurl -X PATCH 'https://api.mailly.site/mail-drafts/string' \ -H 'Content-Type: application/json' \ -d '{ "text": "string", "revision": 1}'{ "success": true, "property1": null, "property2": null}Discard a pending draft POST
Discard a pending draft with the Mailly email API for AI agents: POST /mail-drafts/{id}/discard. Parameters, request body, responses and code samples.
Get a draft GET
Get a draft with the Mailly email API for AI agents: GET /mail-drafts/{id}. Parameters, request body, responses and code samples.