Skip to Content

Start or resume a mail history import

Starts all archives uploaded to the job, or resumes a failed job at its committed byte cursor across those archives.

POST
/v1/mailboxes/{id}/imports/{importId}/start

Starts all archives uploaded to the job, or resumes a failed job at its committed byte cursor across those archives. History emits no inbound events or agent triggers.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
importId*string

Response Body

MailHistoryImportJob

application/json
  1. response
id*string
mailboxId*MailboxId
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
status*string
Value in"queued""running""done""failed"
imported*integer
Range0 <= value <= 9007199254740991
skippedDuplicate*integer
Range0 <= value <= 9007199254740991
skippedSpamTrash*integer
Range0 <= value <= 9007199254740991
failed*integer
Range0 <= value <= 9007199254740991
failures*array<>
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.mailboxes.startImport({
  "id": "example",
  "importId": "example"
});
Example Response
{
  "id": "string",
  "mailboxId": "string",
  "status": "queued",
  "imported": 0,
  "skippedDuplicate": 0,
  "skippedSpamTrash": 0,
  "failed": 0,
  "failures": [
    {
      "offset": 0,
      "message": "string"
    }
  ]
}

Related documentation