Add contacts in bulk
Add up to 1,000 contacts to a contact book in one request.
POST
https://app.usenotix.dev/api/v1/contactBooks/{contactBookId}/contacts/bulkNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Add up to 1,000 contacts to a contact book in one request.
Path parameters
contactBookIdstringrequired
Body parameters
emailstringrequired
firstNamestring
At most 256 characters.
lastNamestring
At most 256 characters.
propertiesmap of string
subscribedboolean
Headers
Authorizationstringrequired
Bearer followed by your API key.
Errors
403
The key's approval policy does not allow the journey enrolments or confirmation emails these new contacts set off
429
The key's daily journey enrolment limit or email cap is reached
Every error has the same shape. See all error codes.
curl -X POST "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/bulk" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"email": "customer@example.com"
}
]'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contacts.bulkCreate("cb_123", [
{ email: "ada@example.com", firstName: "Ada" },
{ email: "tunde@example.com", firstName: "Tunde" },
]);
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
result, _ = notix.contacts.bulk_create("cb_123", [
{"email": "ada@example.com", "firstName": "Ada"},
{"email": "tunde@example.com", "firstName": "Tunde"},
])
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$result = $notix->contacts->bulkCreate('cb_123', [
['email' => 'ada@example.com', 'firstName' => 'Ada'],
['email' => 'tunde@example.com', 'firstName' => 'Tunde'],
]);
Response200
{
"message": "string",
"count": 1
}