- Overview
- Authentication
- Libraries
- Methods
- Contacts
- Import file
- Bulk Import
- Contact import current status
- Contact import history
- Subscriptions
- Attributes
- Lists
- Subscribers
- Subscription forms
- Mails
- Drafts
- Send
- Sent
- Scheduled
- Auto-responder mails
- Templates
- HTML
- Block
- Auto-responders
- Profile
- Address
- Senders
- Reports
- Bounces
- Clicks
- Links
- Opens
- Opens aggregated
- Have not opened
- Most active customers
- Unsubscriptions
- Invoices
- Notifications
Importing contacts multiple contacts
This function allows you to import multiple contacts with their attributes and subscribe them to specific lists using a single API call. You can add a maximum of 5000 contacts per bulk insert. Import by file is recommended for larger amounts.
POST /contacts/import/bulk/
Required fields:
- items:
<array>
Optional fields:
- mode:
<int 0|1|2>
Example:
{
"items": [
{
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"lists": [],
"attributes": {
"company": "Example Inc."
}
}, {
"email": "jane.doe@example.com",
"first_name": "Jane",
"lists": [
"NW3T9uQs4FJwckm",
"ZWvs8NjJNew92yVt3s"
],
"attributes": {
"city": "Stockholm"
}
}
],
"mode": 2
}
Response 202:
{ "items": [ "Invalid list id(s): NW3T9uQs4FJwckm." ] }
In case of no errors the response is empty.
Default values
- mode:
0
The attribute mode
defines the action performed if contact with the same email address already exists. Possible values
are:
0
: overwrite(default) - Overwrites the object totally (like a PUT)1
: leave - Does nothing to the object (like a POST but without the error)2
: update - Updates the object with the input parameters (just like a PATCH)