Mailboxes

Create a mailbox export

Queue a fail-closed ZIP snapshot of one mailbox. If a completed export for this mailbox is younger than 15 minutes, that export is returned with status 200 instead of creating a new one. Archived mailboxes reuse their exact current billing snapshot without restoring the mailbox. Subscribe to the mailbox.export.completed and mailbox.export.failed webhook events instead of polling the returned export. At most 24 exports per mailbox per rolling 24 hours; beyond that the endpoint returns 429 with Retry-After. Exports are for backups, not for polling for new mail: use GET /messages, GET /mailboxes/{id}/inbox/messages, or webhooks to keep inbound mail in sync.

post/mailboxes/{id}/exports

Request

  • Base URL: https://shipmail.to/api/v1
  • URL: https://shipmail.to/api/v1/mailboxes/{id}/exports
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://shipmail.to/api/auth/oauth2/authorize, token URL https://shipmail.to/api/auth/oauth2/token)

Headers

X-Shipmail-Organizationstring

OAuth access tokens only. The organization ID this request acts on. Required when the OAuth connection was approved for several organizations (400 validation_error without it); optional with one. An organization the connection was not approved for returns 403 authorization_error. Ignored for API keys, which belong to one organization.

Response

Existing active export, or a completed export younger than 15 minutes, returned.

object'mailbox_export' required
idstring required
mailbox_idstring required
status'pending' | 'processing' | 'completed' | 'failed' | 'expired' required
format'zip' required
format_versioninteger required
file_sizeinteger nullable required
message_countinteger nullable required
folder_countinteger nullable required
error_code'source_unavailable' | 'snapshot_changed' | 'export_failed' | 'null' nullable required
download_urlstring uri nullable required
download_url_expires_atstring date-time nullable required
expires_atstring date-time nullable required
created_atstring date-time required
started_atstring date-time nullable required
completed_atstring date-time nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.