Skip to content

Mail API: drafts and sending

Mail API reference for VIPOutreach: Mail drafts, sending, follow-ups on single emails and Mail AI.

Write, change and send Mail drafts, check what happened to an email after it left, and attach follow-ups to a single email. Mail AI, part of the Pro plan, writes drafts and replies, in a saved writing style if you pick one.

Each operation below shows its REST route under https://app.vipoutreach.com/api/v1, the command for the terminal and the MCP tool where they exist. The command's flags are listed with it; IDs in the route come first, in order. Fields that hold an object go in a JSON file passed with --input. These routes have no command of their own, so the terminal reaches them with vipoutreach api and an MCP client with vipoutreach_api_request.

Mail AI

Generate AI writing from personally approved context

POST /api/v1/mail/mailboxes/{mailbox_id}/ai/generations

Uses the shared AI ledger and provider outside replay transactions. Explicit AI write approval can consume credits. Only preview output is generated; this never sends or silently writes a draft. Draft context requires its current revision. Pending workers recheck the original key, bound user, mailbox grants and revision. Retain the same Idempotency-Key for retries; expired results are not regenerated.

ID
generateMailAiWriting
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/ai/generations
MCP
vipoutreach_api_request
Access
api:mail:ai:write
Field In Type What it is
mailbox_id * path string
Idempotency-Key * header string Up to 255 characters.
action * body string One of: draft_compose, draft_reply, rewrite_body, suggest_subject, alternate_phrasing, adapt_snippet.
persona_id body string Up to 26 characters. Can be null.
draft_id body string Up to 26 characters. Can be null.
revision body string Up to 64 characters.
thread_id body string Up to 26 characters. Can be null.
selected_message_id body string Up to 26 characters. Can be null.
snippet_id body string Up to 26 characters. Can be null.
voice_id body string Up to 26 characters. Can be null.
voice_mode body string One of: auto, persona_default, neutral, explicit.
selection_start body integer At least 0. Can be null.
selection_end body integer At least 0. Can be null.
selection_text body string Up to 4000 characters. Can be null.
instruction body string Up to 5000 characters. Can be null.
locale body string Up to 16 characters. Can be null.

* required

Read an agent-owned AI generation and cached result

GET /api/v1/mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}

Requires AI read approval and current mailbox access. Only the originating key and bound user can read the generation. Output expires independently of the durable status and usage ledger; null output is not a new generation.

ID
getMailAiGeneration
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}
MCP
vipoutreach_api_request
Access
api:mail:ai:read
Field In Type What it is
mailbox_id * path string
generation_id * path string

* required

Apply an exact cached AI preview to its saved draft

POST /api/v1/mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}/apply

Requires both AI write and draft-write personal approval. The target must be the generation's own draft and match the supplied current revision plus its captured generation baseline. Applying never sends. Subject and alternate outputs are selected by server-validated index. Replay preserves the original result without repeating the change.

ID
applyMailAiGeneration
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}/apply
MCP
vipoutreach_api_request
Access
api:mail:ai:write
Field In Type What it is
mailbox_id * path string
generation_id * path string
Idempotency-Key * header string Up to 255 characters.
draft_id * body string Up to 26 characters.
revision * body string Up to 64 characters.
apply_mode * body string One of: replace_body, insert_at_cursor, replace_selection, select_subject, select_alternate.
selected_index body integer At least 0. Can be null.
apply_time_selection_start body integer At least 0. Can be null.
apply_time_selection_end body integer At least 0. Can be null.
body_html body string Up to 32000 characters. Can be null.

* required

Request cancellation of an agent-owned AI generation

POST /api/v1/mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}/cancel

Requires AI write approval. Pending work becomes canceled; running work records a cancellation request. Billable work already performed remains billable. Terminal outcomes are not changed. Retries use the same command key.

ID
cancelMailAiGeneration
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/ai/generations/{generation_id}/cancel
MCP
vipoutreach_api_request
Access
api:mail:ai:write
Field In Type What it is
mailbox_id * path string
generation_id * path string
Idempotency-Key * header string Up to 255 characters.
body * body object

* required

Mail drafts

List delegated drafts and revision tokens

GET /api/v1/mail/mailboxes/{mailbox_id}/drafts

Current personal approval, membership and mailbox grants are required. Bodies are available through the individual draft endpoint.

ID
listMailDrafts
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/drafts
MCP
vipoutreach_api_request
Access
api:mail:drafts:read
Field In Type What it is
mailbox_id * path string
per_page query integer Default: 25. From 1 to 100.
cursor query string Up to 4096 characters.

* required

Create a draft without sending

POST /api/v1/mail/mailboxes/{mailbox_id}/drafts

Requires personally approved draft-write authority and an Idempotency-Key. Replays recheck current authority. Reply and forward references remain mailbox scoped. No provider requests occur inside draft mutation transactions.

ID
createMailDraft
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/drafts
MCP
vipoutreach_api_request
Access
api:mail:drafts:write
Field In Type What it is
mailbox_id * path string
Idempotency-Key * header string Up to 255 characters.
persona_id * body string Current same-mailbox public persona ID with a send-as grant.
subject * body string Up to 500 characters. Can be null.
to * body array of object
cc * body array of object
bcc * body array of object
body_mode * body string One of: plain, rich.
body_text * body string Up to 1000000 characters. Can be null.
body_html * body string Must be null for plain drafts. Rich HTML is sanitized by the existing draft service. Up to 1000000 characters. Can be null.
quote_suppressed body boolean
referenced_message_id body string Creation only. Same-mailbox public message ID; requires reference_action. Can be null.
reference_action body string Creation only. Reply-all uses reply with explicitly selected recipients. One of: reply, forward. Can be null.

* required

Read the authored draft snapshot

GET /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}

Returns a revision token and public identities, not browser-only preview URLs or provider credentials.

ID
getMailDraft
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/drafts/{message_id}
MCP
vipoutreach_api_request
Access
api:mail:drafts:read
Field In Type What it is
mailbox_id * path string
message_id * path string

* required

Update a revision-bound draft snapshot

PATCH /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}

Send the complete authored snapshot and its revision. Changed revisions return conflict with draft_revision_changed. Threading and RFC identity cannot be changed. Replays recheck personal approval and current mailbox access.

ID
updateMailDraft
CLI
vipoutreach api patch /mail/mailboxes/{mailbox_id}/drafts/{message_id}
MCP
vipoutreach_api_request
Access
api:mail:drafts:write
Field In Type What it is
mailbox_id * path string
message_id * path string
Idempotency-Key * header string Up to 255 characters.
body * body any

* required

Discard a revision-bound draft

DELETE /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}

Requires current draft-write approval. Frozen or submitted drafts cannot be discarded. Replays retain current authorization checks.

ID
discardMailDraft
CLI
vipoutreach api delete /mail/mailboxes/{mailbox_id}/drafts/{message_id}
MCP
vipoutreach_api_request
Access
api:mail:drafts:write
Field In Type What it is
mailbox_id * path string
message_id * path string
Idempotency-Key * header string Up to 255 characters.
revision * body string Up to 64 characters.

* required

Add a revision-bound draft attachment

POST /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}/attachments

Upload canonical base64 in JSON. Decoded bytes count against the configured draft total (25 MiB by default); empty files are not accepted. MIME type is detected from bytes. Inline images require rich compose and a supported image type. Returns the new draft snapshot, attachment ref and revision. The idempotency hash includes filename, bytes, disposition and revision. Files from an outer transaction rollback are reclaimed by staged-file cleanup.

ID
addMailDraftAttachment
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/drafts/{message_id}/attachments
MCP
vipoutreach_api_request
Access
api:mail:drafts:write
Field In Type What it is
mailbox_id * path string
message_id * path string
Idempotency-Key * header string Up to 255 characters.
revision * body string Up to 64 characters.
filename * body string A filename without directory separators or control characters. Up to 255 characters.
content_base64 * body string
disposition body string One of: attachment, inline. Default: "attachment".

* required

Remove a revision-bound draft attachment

DELETE /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}/attachments/{ref}

The ref must belong to this draft. Inline images still referenced in HTML cannot be removed; update the authored HTML first. Frozen drafts reject removal. Returns the new draft revision; retries retain current authorization checks.

ID
removeMailDraftAttachment
CLI
vipoutreach api delete /mail/mailboxes/{mailbox_id}/drafts/{message_id}/attachments/{ref}
MCP
vipoutreach_api_request
Access
api:mail:drafts:write
Field In Type What it is
mailbox_id * path string
message_id * path string
ref * path string
Idempotency-Key * header string Up to 255 characters.
revision * body string Up to 64 characters.

* required

List currently granted sender identities

GET /api/v1/mail/mailboxes/{mailbox_id}/personas

Requires explicit mail_drafts read capability and personal drafts approval. Returns only same-mailbox persona grants; does not authorize sending.

ID
listMailDraftPersonas
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/personas
MCP
vipoutreach_api_request
Access
api:mail:drafts:read
Field In Type What it is
mailbox_id * path string

* required

Sending and delivery

Prepare an immutable send for explicit confirmation

POST /api/v1/mail/mailboxes/{mailbox_id}/drafts/{message_id}/send-intents

Requires separately selected mail_outbound write capability and personal outbound delegation. Binds the current draft revision, sender identity and signature, recipients, attachments, UTC schedule and warning state. Returns an encrypted-at-rest authored snapshot for review and a key/actor-bound intent expiring in ten minutes. This operation performs no provider submission.

ID
prepareMailSend
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/drafts/{message_id}/send-intents
MCP
vipoutreach_api_request
Access
api:mail:outbound:write
Field In Type What it is
mailbox_id * path string
message_id * path string
Idempotency-Key * header string Up to 255 characters.
revision * body string Up to 64 characters.
send_at body string Future UTC timestamp formatted YYYY-MM-DDTHH:mm:ssZ; omit for immediate sending. Can be null.

* required

Read a prepared send and its current outcome

GET /api/v1/mail/mailboxes/{mailbox_id}/send-intents/{intent_id}

Available only to the preparing key and bound user with current outbound read approval and mailbox access. An intent or unresolved result is not proof of delivery. A failed preparation needs a new reviewed intent; processing is never permission to resubmit automatically.

ID
getMailSendIntent
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/send-intents/{intent_id}
MCP
vipoutreach_api_request
Access
api:mail:outbound:read
Field In Type What it is
mailbox_id * path string
intent_id * path string

* required

Cancel a submitted scheduled send

POST /api/v1/mail/mailboxes/{mailbox_id}/send-intents/{intent_id}/cancel

Requires explicit confirmation and current outbound write authority. Uses the shared provider cancellation boundary outside the replay transaction. Already canceled outcomes are safe to repeat; an acceptance or dispatch race is not reported as canceled without provider proof.

ID
cancelPreparedMailSend
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/send-intents/{intent_id}/cancel
MCP
vipoutreach_api_request
Access
api:mail:outbound:write
Field In Type What it is
mailbox_id * path string
intent_id * path string
Idempotency-Key * header string Up to 255 characters.
confirm * body boolean

* required

Confirm and submit the immutable prepared send

POST /api/v1/mail/mailboxes/{mailbox_id}/send-intents/{intent_id}/submit

Explicit automation authority must already have been granted by the bound user's session. Requires confirm=true and acknowledgement of the prepared warning fingerprint when warnings exist. Content overrides are rejected. The durable command is claimed before provider IO outside any generic replay transaction. Identical retries return current state without another submission; a different confirmation or request key conflicts. Current authority is rechecked before freeze and after body assembly. An uncertain provider response returns 202 with submission_unresolved=true, never a safe-to-resend indication.

ID
confirmAndSubmitMailSend
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/send-intents/{intent_id}/submit
MCP
vipoutreach_api_request
Access
api:mail:outbound:write
Field In Type What it is
mailbox_id * path string
intent_id * path string
Idempotency-Key * header string Up to 255 characters.
confirm * body boolean
warning_fingerprint body string Up to 64 characters. Can be null.

* required

Follow-ups on single emails

Read full content and current sending authority

GET /api/v1/mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}

Requires explicit followups read approval and current content access to the approved mailbox. Full step bodies and visible targets are content-granted data. No provider IDs or run metadata are returned. Source discovery additionally requires the selected sender grant.

ID
getMailFollowUp
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}
MCP
vipoutreach_api_request
Access
api:mail:followups:read

Replace follow-up steps before evaluation has begun

PATCH /api/v1/mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}

Requires explicit followups write approval and a stable retry key. Create, step replacement, resume, reschedule and takeover also require outbound write approval and a current sender grant. Commands bind exact revisions and arming commands require JSON true confirmation. Existing API authority is rechecked except during explicit takeover. Pause, cancel and target removal never transfer sending authority. Workers recheck the bound real key; withdrawal, expiry, removal or rotation blocks unsent work. Takeover does not resume and is unavailable during delivery or after a submitted follow-up. No provider call occurs in these local transactions.

ID
updateMailFollowUp
CLI
vipoutreach api patch /mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}
MCP
vipoutreach_api_request
Access
api:mail:followups:write
Field In Type What it is
Idempotency-Key * header string Up to 255 characters.
revision * body string
confirm * body boolean One of: true.
steps * body array

* required

Pause resume cancel reschedule remove a target or explicitly take over sending

POST /api/v1/mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}/actions

Requires explicit followups write approval and a stable retry key. Create, step replacement, resume, reschedule and takeover also require outbound write approval and a current sender grant. Commands bind exact revisions and arming commands require JSON true confirmation. Existing API authority is rechecked except during explicit takeover. Pause, cancel and target removal never transfer sending authority. Workers recheck the bound real key; withdrawal, expiry, removal or rotation blocks unsent work. Takeover does not resume and is unavailable during delivery or after a submitted follow-up. No provider call occurs in these local transactions.

ID
actOnMailFollowUp
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}/actions
MCP
vipoutreach_api_request
Access
api:mail:followups:write
Field In Type What it is
Idempotency-Key * header string Up to 255 characters.
body * body any

* required

Read follow-up delivery history without provider internals

GET /api/v1/mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}/runs

Requires explicit followups read approval and current content access to the approved mailbox. Full step bodies and visible targets are content-granted data. No provider IDs or run metadata are returned. Source discovery additionally requires the selected sender grant.

ID
listMailFollowUpRuns
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/follow-ups/{sequence_id}/runs
MCP
vipoutreach_api_request
Access
api:mail:followups:read
Field In Type What it is
per_page query integer Default: 25. From 1 to 100.
cursor query string Up to 4096 characters.

* required

Read the revision needed to create future follow-ups

GET /api/v1/mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-up-source

Requires explicit followups read approval and current content access to the approved mailbox. Full step bodies and visible targets are content-granted data. No provider IDs or run metadata are returned. Source discovery additionally requires the selected sender grant.

ID
getMailFollowUpSource
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-up-source
MCP
vipoutreach_api_request
Access
api:mail:followups:read
Field In Type What it is
persona_id * query string Up to 26 characters.

* required

List follow-ups attached to this message

GET /api/v1/mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-ups

Requires explicit followups read approval and current content access to the approved mailbox. Full step bodies and visible targets are content-granted data. No provider IDs or run metadata are returned. Source discovery additionally requires the selected sender grant.

ID
listMailFollowUps
CLI
vipoutreach api get /mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-ups
MCP
vipoutreach_api_request
Access
api:mail:followups:read
Field In Type What it is
per_page query integer Default: 25. From 1 to 100.
cursor query string Up to 4096 characters.

* required

Approve and create future follow-up emails

POST /api/v1/mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-ups

Requires explicit followups write approval and a stable retry key. Create, step replacement, resume, reschedule and takeover also require outbound write approval and a current sender grant. Commands bind exact revisions and arming commands require JSON true confirmation. Existing API authority is rechecked except during explicit takeover. Pause, cancel and target removal never transfer sending authority. Workers recheck the bound real key; withdrawal, expiry, removal or rotation blocks unsent work. Takeover does not resume and is unavailable during delivery or after a submitted follow-up. No provider call occurs in these local transactions.

ID
createMailFollowUp
CLI
vipoutreach api post /mail/mailboxes/{mailbox_id}/messages/{message_id}/follow-ups
MCP
vipoutreach_api_request
Access
api:mail:followups:write
Field In Type What it is
Idempotency-Key * header string Up to 255 characters.
persona_id * body string Up to 26 characters.
source_revision * body string
confirm * body boolean One of: true.
unsafe_outcome_override body boolean
steps * body array

* required