Mailboxes

Restore an uploaded mailbox import source

Rebind matching staged replacement files to a cancelled or failed uploaded-file import, then resume the same job from its durable cursor. Each replacement must match the original unfinished file by organization, mailbox, provider, format, exact size, sanitized name, and the versioned source fingerprint encoded in the object key. That fingerprint is a SHA-256 of file size plus bounded first and last samples, not a full-file hash. After the last required replacement is bound, the same import queues automatically.

post/mailboxes/{id}/imports/{import_id}/restore

Request

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

import_idstring required

Import 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

file_idsstring[] required

Staged replacement file IDs from createMailboxImportUpload. Restore can bind a subset and queue the same job after the last required replacement is bound. Send an empty list to resume when every required source is already present.

Response

The restored and queued import.

object'import' required
idstring required
mailbox_idstring required
kind'imap' | 'file' required
provider'gmail' | 'outlook' | 'yahoo' | 'aol' | 'icloud' | 'fastmail' | 'zoho' | 'titan' | 'namecheap' | 'migadu' | 'gmx' | 'mail_com' | 'mailbox_org' | 'mxroute' | 'infomaniak' | 'ovh' | 'gandi' | 'imap' | 'takeout' | 'proton' | 'tuta' | 'file' required
source_addressstring nullable required
status'queued' | 'running' | 'paused_throttle' | 'paused_quota' | 'completed' | 'failed' | 'cancelled' | 'undo_queued' | 'undoing' | 'undone' | 'undo_failed' required

paused_throttle means the source provider's daily download limit was reached; the import resumes automatically at resume_at. paused_quota means the destination mailbox is out of storage.

status_detailstring nullable required
errorstring nullable required
resume_atstring date-time nullable required
created_atstring date-time required
started_atstring date-time nullable required
completed_atstring date-time nullable required

Example response

{
  "id": "imp_abc123"
}

Changes

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