Skip to main content
POST
/
contacts
/
import
Import contacts
curl --request POST \
  --url https://brew.new/api/contacts/import \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contacts": [
    {
      "email": "[email protected]",
      "firstName": "John",
      "lastName": "Doe",
      "subscribed": true,
      "customFields": {
        "company": "Acme Inc",
        "role": "Developer"
      }
    },
    {
      "email": "[email protected]",
      "firstName": "Jane",
      "lastName": "Smith"
    }
  ],
  "triggerAutomations": false
}
'
{
  "success": true,
  "data": {
    "importId": "<string>",
    "stats": {
      "total": 123,
      "valid": 123,
      "invalid": 123
    },
    "automations": {
      "triggered": 123,
      "evaluated": 123,
      "timedOut": true,
      "errors": [
        "<string>"
      ]
    },
    "errors": [
      {
        "index": 123,
        "email": "<string>",
        "error": "<string>"
      }
    ]
  },
  "message": "<string>",
  "meta": {
    "requestId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer brew_xxxxx header

Body

application/json
contacts
object[]
required
Maximum array length: 10000
triggerAutomations
boolean
default:false

Whether to trigger automations for imported contacts

Response

Import queued successfully

success
enum<boolean>
required
Available options:
true,
false
data
object
required
message
string
meta
object