Questions · Published 2026-09-27 · Updated 2026-09-30 · AgentiSend
How do I export my email data?
Export your email data with GET /account/export, which returns a zip of every store on the account (messages with their body, contacts, templates, webhooks, suppressions, domains, support requests, the audit log and the team) with a manifest that counts each file. GET /emails/export.csv exports the message log with the list filters, and GET /emails/{id}/mime returns one message's exact source.
Export your email data with GET /account/export. Its summary is "A zip of this account's data, with a row count for every file in manifest.json." For the message log alone, GET /emails/export.csv takes every filter GET /emails takes. For one message, GET /emails/{id}/mime returns its exact RFC 5322 source, and GET /emails/{id}/eml downloads it as a file.
The whole account
One request, one zip. emails.csv and emails.jsonl hold the messages still inside the retention window, with the full body in the .jsonl file, so neither can contain what has already been purged; How long does AgentiSend keep my emails? says what that window is and where its figures are published. The zip also holds delivery events, mail you received, contacts with their properties, templates, topics, segments, broadcasts, automations, webhooks (without the signing secret), support requests (an operator's internal notes stay out), the audit log, the team and key names — every store on the account. suppressions.csv is every row GET /suppressions would list, and domains.json is your sending domains. manifest.json gives a row count for every file; nothing is cut short without saying so there.
curl -sS -X GET https://api.agentisend.com/account/export \
-H "Authorization: Bearer $AGENTISEND_API_KEY"200 with an empty bodyThe message log, and one message
GET /emails/export.csv — the summary is "The message log as CSV — yours, take it with you." Its filters are the ones on GET /emails: status, q, from, to, domain, bounce_class, api_key_id, template_id, since and until. A monthly export is since and until on the month; the bounces of one domain are domain and status=bounced.
For a single message:
GET /emails/{id}/mime— the exact RFC 5322 source, headers and body as they were sent.GET /emails/{id}/eml— the same message as a download.GET /emails/{id}/attachments— what the email carried, each withfilename,content_type,size_bytesandbytes_available, which says whether the payload is still retrievable.GET /emails/{id}/attachments/{aid}— the bytes of one attachment, exactly as they were sent, served as an inert download.GET /emails/{id}/events— every event recorded for the message, oldest first.
Logs and the audit trail
GET /audit-log is "Every change anyone made on this account (keys, kill switch, domains, approvals, team, settings), with what it looked like before." Each row has action, actor_type, actor_email, before, after and created_at. GET /logs is every API request the account made, with method, route, status, duration_ms and error_code, filterable by since, until, status_class, route, error_code and api_key_id. Both page with cursor.
Leaving
DELETE /account — the summary is "Close this account: keys stop now. Everything on the account is deleted after the retention window. Unused prepaid time is refunded." The reply carries closed_at, data_removed_after, retention_days and keys_revoked. Take GET /account/export before you call it: the call revokes every key, and data_removed_after is the date the rows go.