Mailboxes

Prepare a multipart import upload

Prepare a provider-bound multipart upload for a mailbox export file up to 100 GB. Accepted files are .mbox, .mbox.gz, .zip, and .eml, plus .vcf for Google Takeout. Split the file using part_size_bytes, PUT each raw part to its matching parts[].upload_url, record each response ETag, and call completeMailboxImportUpload. Then pass file_id to createMailboxImport with the same files provider. Upload sessions expire after six days. Completed staged files that are never used are deleted after 24 hours.

post/mailboxes/{id}/imports/files

Request

  • Base URL: https://shipmail.to/api/v1
  • URL: https://shipmail.to/api/v1/mailboxes/{id}/imports/files
  • 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)

Path parameters

idstring required

Mailbox ID.

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.

Request body

provider'takeout' | 'proton' | 'tuta' | 'file' required

File source provider. The staged upload can only be used by an import with this provider.

file_namestring required

Name of the export file (.mbox, .mbox.gz, .zip, or .eml; .vcf is also accepted for provider takeout).

size_bytesinteger required

File size in bytes. Up to 100 GB per file.

Response

Upload staged.

object'import_upload' required
file_idstring required
part_size_bytesinteger required

Slice size for every part except the final part.

expires_in_secondsinteger required

Example response

{
  "file_id": "impf_abc123",
  "part_size_bytes": 33554432,
  "expires_in_seconds": 518400
}

Changes

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