Discard a pending draft
Discard a pending draft with the Mailly email API for AI agents: POST /mail-drafts/{id}/discard. Parameters, request body, responses and code samples.
POST
bearerAuthheader
AuthorizationBearer <token>Mailly API key(Authorization: Bearer )
id*stringLength
1 <= length <= 128application/json- body
revision*integerRange
0 < valueDraft action succeeded
application/json- response
success*boolean[key: string]?unknowncurl -X POST 'https://api.mailly.site/mail-drafts/string/discard' \ -H 'Content-Type: application/json' \ -d '{ "revision": 1}'{ "success": true, "property1": null, "property2": null}Approve and send a reviewed draft version POST
Approve and send a reviewed draft version with the Mailly email API for AI agents: POST /mail-drafts/{id}/approve. Parameters, request body, responses and code samples.
Edit a pending draft; the current version is required PATCH
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.