v24

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-014382230.2 KB

Batch import contacts

Creates or updates multiple contacts in a single batch operation. This is significantly more efficient than individual upsert operations. Optionally subscribes all contacts to specified lists.

post/api/contacts.import

Request body

workspace_idstring required

The ID of the workspace

subscribe_to_listsstring[]

Optional array of list IDs to subscribe all contacts to

Example request

{
  "workspace_id": "ws_1234567890",
  "contacts": [
    {
      "email": "user1@example.com",
      "first_name": "John",
      "last_name": "Doe"
    },
    {
      "email": "user2@example.com",
      "first_name": "Jane",
      "last_name": "Smith"
    }
  ],
  "subscribe_to_lists": [
    "newsletter",
    "product_updates"
  ]
}

Response

Batch import completed (may include partial failures)

errorstring nullable

Global error message if the entire operation failed

Example response

{
  "operations": [
    {
      "email": "user@example.com",
      "action": "create"
    }
  ]
}