Import accounts into an email workspace

Links a batch of email addresses to the workspace so they can be warmed.

Batches of 4 accounts or fewer are processed synchronously and errors (if any) are returned directly. Larger batches run in the background and the response contains a task_id to poll via GET /tasks/{task_id}.

Path Parameters
  • id
    Type: integerFormat: int32
    required

    The ID of the workspace to import accounts into.

Body·
required
application/json

Import accounts into an email workspace

  • accounts
    Type: array string[]
    required

    Email addresses to link to the workspace.

  • account_id
    Type: integerFormat: int32

    When relinking in IMAP-only mode, the ID of the existing account to attach the OAuth credentials to.

  • imap_only
    Type: boolean

    Relink an existing IMAP account to the workspace OAuth credentials. Requires a single element in accounts and an account_id.

  • spamchecker_only
    Type: boolean

    If true, imported accounts are enabled only for Spam Tests (and automated tests) — warming and monitoring are disabled and no warming seat is charged. Use this when the accounts are dedicated to running (automated) spam tests.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/v1/email_workspaces/{id}/accounts
curl http://api.mailreach.co/api/v1/email_workspaces/42/accounts \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "accounts": [
    "john@acme.com",
    "sales@acme.com"
  ],
  "spamchecker_only": true,
  "imap_only": false,
  "account_id": 1234
}'
{
  "completed": true,
  "errors": [],
  "task_id": 8421
}