Add a contact
Add one contact to a contact book.
https://app.usenotix.dev/api/v1/contactBooks/{contactBookId}/contactsNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Add one contact to a contact book.
Path parameters
Body parameters
The contact's email address. Stored trimmed and lower-cased.
At most 256 characters.
At most 256 characters.
Headers
Bearer followed by your API key.
Set to true to preview the request instead of running it. The answer is 200 with dryRun: true: who it would reach, what they would see, what it would cost, whether policy allows it and the limits it counts against. Nothing is sent, charged, reserved or written. A write route that cannot preview answers 400.
Errors
The key's approval policy does not allow the journey enrolments or confirmation email this contact sets off
The key's daily journey enrolment limit or email cap is reached
The per-key limits cannot be checked just now; nothing was written
Every error has the same shape. See all error codes.
curl -X POST "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "ada@example.com"
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contacts.create("cb_123", {
email: "ada@example.com",
firstName: "Ada",
properties: { company: "Acme" },
});
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
contact, _ = notix.contacts.create("cb_123", {
"email": "ada@example.com",
"firstName": "Ada",
"properties": {"company": "Acme"},
})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$contact = $notix->contacts->create('cb_123', [
'email' => 'ada@example.com',
'firstName' => 'Ada',
'properties' => ['company' => 'Acme'],
]);
{
"contactId": "cm1x8f3k20001qz7v5b9d2e4a"
}