Contact books.
Create and manage the lists contacts live in. Every request needs an API key in the Authorization header; the reference overview covers keys, errors and rate limits.
List contact books
GET/v1/contactBooksFull access key
List the contact books the API key can reach.
curl -X GET "https://app.usenotix.dev/api/v1/contactBooks" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contactBooks.list();
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
books, _ = notix.contact_books.list()
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$books = $notix->contactBooks->list();
Responses
200Retrieve contact books accessible by the API key
| Field | Type | About |
|---|---|---|
idrequired | string | The ID of the contact book |
namerequired | string | The name of the contact book |
teamIdrequired | number | The ID of the team |
propertiesrequired | map of string | Custom properties for the contact book |
variablesrequired | string[] | Allowed personalization variables for contacts in this book |
emojirequired | string | The emoji associated with the contact book |
doubleOptInEnabled | boolean | Whether double opt-in is enabled for new contacts |
doubleOptInFrom | string | From address used for double opt-in emails (must use a verified domain) Can be null. |
doubleOptInSubject | string | Subject line used for double opt-in confirmation email Can be null. |
doubleOptInContent | string | Email editor JSON content used for double opt-in confirmation Can be null. |
createdAtrequired | string | The creation timestamp |
updatedAtrequired | string | The last update timestamp |
_count | object | |
_count.contactsrequired | number | The number of contacts in the contact book |
Create a contact book
POST/v1/contactBooksFull access key
Create a new contact book.
| Field | Type | About |
|---|---|---|
namerequired | string | |
emoji | string | |
properties | map of string | |
doubleOptInEnabled | boolean | |
doubleOptInFrom | string | Can be null. |
doubleOptInSubject | string | |
doubleOptInContent | string | |
variables | string[] |
curl -X POST "https://app.usenotix.dev/api/v1/contactBooks" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme"
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contactBooks.create({
name: "Newsletter",
variables: ["company", "plan"],
});
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
book, _ = notix.contact_books.create({"name": "Newsletter", "variables": ["company", "plan"]})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$book = $notix->contactBooks->create(['name' => 'Newsletter', 'variables' => ['company', 'plan']]);
Responses
200Create a new contact book
| Field | Type | About |
|---|---|---|
idrequired | string | The ID of the contact book |
namerequired | string | The name of the contact book |
teamIdrequired | number | The ID of the team |
propertiesrequired | map of string | Custom properties for the contact book |
variablesrequired | string[] | Allowed personalization variables for contacts in this book |
emojirequired | string | The emoji associated with the contact book |
doubleOptInEnabled | boolean | Whether double opt-in is enabled for new contacts |
doubleOptInFrom | string | From address used for double opt-in emails (must use a verified domain) Can be null. |
doubleOptInSubject | string | Subject line used for double opt-in confirmation email Can be null. |
doubleOptInContent | string | Email editor JSON content used for double opt-in confirmation Can be null. |
createdAtrequired | string | The creation timestamp |
updatedAtrequired | string | The last update timestamp |
_count | object | |
_count.contactsrequired | number | The number of contacts in the contact book |
Get a contact book
GET/v1/contactBooks/{contactBookId}Full access key
Retrieve one contact book.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
curl -X GET "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contactBooks.get("cb_123");
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
book, _ = notix.contact_books.get("cb_123")
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$book = $notix->contactBooks->get('cb_123');
Responses
200Retrieve the contact book
| Field | Type | About |
|---|---|---|
idrequired | string | The ID of the contact book |
namerequired | string | The name of the contact book |
teamIdrequired | number | The ID of the team |
propertiesrequired | map of string | Custom properties for the contact book |
variablesrequired | string[] | Allowed personalization variables for contacts in this book |
emojirequired | string | The emoji associated with the contact book |
doubleOptInEnabled | boolean | Whether double opt-in is enabled for new contacts |
doubleOptInFrom | string | From address used for double opt-in emails (must use a verified domain) Can be null. |
doubleOptInSubject | string | Subject line used for double opt-in confirmation email Can be null. |
doubleOptInContent | string | Email editor JSON content used for double opt-in confirmation Can be null. |
createdAtrequired | string | The creation timestamp |
updatedAtrequired | string | The last update timestamp |
_count | object | |
_count.contactsrequired | number | The number of contacts in the contact book |
403Forbidden - API key doesn't have access to this contact book
| Field | Type | About |
|---|---|---|
errorrequired | string |
404Contact book not found
| Field | Type | About |
|---|---|---|
errorrequired | string |
Update a contact book
PATCH/v1/contactBooks/{contactBookId}Full access key
Change a contact book's details.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
| Field | Type | About |
|---|---|---|
name | string | |
emoji | string | |
properties | map of string | |
doubleOptInEnabled | boolean | |
doubleOptInFrom | string | Can be null. |
doubleOptInSubject | string | |
doubleOptInContent | string | |
variables | string[] |
curl -X PATCH "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme",
"emoji": "string",
"properties": {},
"doubleOptInEnabled": true,
"doubleOptInFrom": "string",
"doubleOptInSubject": "Your receipt for order 4471",
"doubleOptInContent": "string",
"variables": [
"string"
]
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contactBooks.update("cb_123", { doubleOptInEnabled: true });
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
book, _ = notix.contact_books.update("cb_123", {"doubleOptInEnabled": True})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$book = $notix->contactBooks->update('cb_123', ['doubleOptInEnabled' => true]);
Responses
200Update the contact book
| Field | Type | About |
|---|---|---|
idrequired | string | The ID of the contact book |
namerequired | string | The name of the contact book |
teamIdrequired | number | The ID of the team |
propertiesrequired | map of string | Custom properties for the contact book |
variablesrequired | string[] | Allowed personalization variables for contacts in this book |
emojirequired | string | The emoji associated with the contact book |
doubleOptInEnabled | boolean | Whether double opt-in is enabled for new contacts |
doubleOptInFrom | string | From address used for double opt-in emails (must use a verified domain) Can be null. |
doubleOptInSubject | string | Subject line used for double opt-in confirmation email Can be null. |
doubleOptInContent | string | Email editor JSON content used for double opt-in confirmation Can be null. |
createdAtrequired | string | The creation timestamp |
updatedAtrequired | string | The last update timestamp |
_count | object | |
_count.contactsrequired | number | The number of contacts in the contact book |
403Forbidden - API key doesn't have access to this contact book
| Field | Type | About |
|---|---|---|
errorrequired | string |
404Contact book not found
| Field | Type | About |
|---|---|---|
errorrequired | string |
Delete a contact book
DELETE/v1/contactBooks/{contactBookId}Full access key
Delete a contact book and every contact in it. Refused with 400 while a scheduled or running campaign or an active journey uses the book.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
curl -X DELETE "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contactBooks.delete("cb_123");
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
result, _ = notix.contact_books.delete("cb_123")
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$result = $notix->contactBooks->delete('cb_123');
Responses
200Contact book deleted successfully
| Field | Type | About |
|---|---|---|
idrequired | string | |
successrequired | boolean | |
messagerequired | string |
403Forbidden - API key doesn't have access
| Field | Type | About |
|---|---|---|
errorrequired | string |
404Contact book not found
| Field | Type | About |
|---|---|---|
errorrequired | string |