Drafts
Create drafts in the user's mailbox, edit them, and send them through the outbox.
Drafts live in the account's mailbox at the provider, so the user also sees them in Gmail or Outlook. Use a draft when a person should review or finish the message; to send directly, use the outbox.
Drafts take the same compose fields as a send, including template and render.
Create, edit and send
# Create
curl -X POST "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/drafts" \
-H "Authorization: Bearer $WORKWAE_API_KEY" \
-H "content-type: application/json" \
-d '{ "to": [{ "address": "ada@example.com" }], "subject": "Draft", "text": "..." }'
# Replace its content
curl -X PUT "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/drafts/$MESSAGE_ID" \
-H "Authorization: Bearer $WORKWAE_API_KEY" \
-H "content-type: application/json" \
-d '{ "to": [{ "address": "ada@example.com" }], "subject": "Final", "text": "..." }'
# Send it
curl -X POST "https://api.workwae.com/v1/accounts/$ACCOUNT_ID/drafts/$MESSAGE_ID/send" \
-H "Authorization: Bearer $WORKWAE_API_KEY" \
-H "content-type: application/json" \
-d '{}'Behavior
PUTreplaces the whole draft: send every field you want to keep.- Sending a draft queues an outbox entry like any send, with the same events, undo window and
sendAt. - Cancelling that outbox entry leaves the draft in place.
- A Gmail or Microsoft 365 draft is sent by the provider as stored, so it is never tracked. Asking for tracking returns
tracking_unsupported.
All routes are in the Mail reference.