Skip to Content

Read mail history import progress

Returns import status, counts, and bounded failure reasons. Request: GET /v1/mailboxes/{id}/imports/{importId}. Scope: mailboxes:read.

GET
/v1/mailboxes/{id}/imports/{importId}

Returns import status, counts, and bounded failure reasons.

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.getImport({
  "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