Contacts.
Add, update, upsert and remove contacts, one at a time or up to 1,000 at once. Every request needs an API key in the Authorization header; the reference overview covers keys, errors and rate limits.
List contacts
GET/v1/contactBooks/{contactBookId}/contactsFull access key
List the contacts in a contact book, paged by the query parameters.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
| Field | Type | About |
|---|---|---|
emails | string | |
ids | string | |
page | integer | 1-based page number, at most 10000. Default |
limit | integer | Contacts per page, at most 200. Defaults to 50. Default |
curl -X GET "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts" \
-H "Authorization: Bearer $NOTIX_API_KEY"
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
contacts, _ = notix.contacts.list("cb_123", page=1, limit=50)
Responses
200Retrieve multiple contacts
| Field | Type | About |
|---|---|---|
idrequired | string | |
firstName | string | Can be null. |
lastName | string | Can be null. |
emailrequired | string | |
subscribed | boolean | Default |
propertiesrequired | map of string | |
contactBookIdrequired | string | |
createdAtrequired | string | |
updatedAtrequired | string |
Add a contact
POST/v1/contactBooks/{contactBookId}/contactsFull access key
Add one contact to a contact book.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
| Field | Type | About |
|---|---|---|
emailrequired | string | The contact's email address. Stored trimmed and lower-cased. |
firstName | string | |
lastName | string | |
properties | map of string | |
subscribed | boolean |
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'],
]);
Responses
200The contact was added.
| Field | Type | About |
|---|---|---|
contactId | string |
Get a contact
GET/v1/contactBooks/{contactBookId}/contacts/{contactId}Full access key
Retrieve one contact.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string | |
contactIdrequired | string |
curl -X GET "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/<contactId>" \
-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.contacts.get("cb_123", "cnt_456");
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
contact, _ = notix.contacts.get("cb_123", "cnt_456")
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$contact = $notix->contacts->get('cb_123', 'cnt_456');
Responses
200Retrieve the contact
| Field | Type | About |
|---|---|---|
idrequired | string | |
firstName | string | Can be null. |
lastName | string | Can be null. |
emailrequired | string | |
subscribed | boolean | Default |
propertiesrequired | map of string | |
contactBookIdrequired | string | |
createdAtrequired | string | |
updatedAtrequired | string |
Update a contact
PATCH/v1/contactBooks/{contactBookId}/contacts/{contactId}Full access key
Change the fields you send on an existing contact.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string | |
contactIdrequired | string |
| Field | Type | About |
|---|---|---|
firstName | string | |
lastName | string | |
properties | map of string | |
subscribed | boolean |
curl -X PATCH "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/<contactId>" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Acme",
"lastName": "Acme",
"properties": {},
"subscribed": true
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contacts.update("cb_123", "cnt_456", { lastName: "Lovelace" });
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
contact, _ = notix.contacts.update("cb_123", "cnt_456", {"lastName": "Lovelace"})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$contact = $notix->contacts->update('cb_123', 'cnt_456', ['lastName' => 'Lovelace']);
Responses
200The contact was updated.
| Field | Type | About |
|---|---|---|
contactId | string |
Upsert a contact
PUT/v1/contactBooks/{contactBookId}/contacts/{contactId}Full access key
Create the contact if it does not exist, or update it if it does.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string | |
contactIdrequired | string | The contact this request is about. With an email in the body it must be the id of the contact that email already belongs to, or the email must be new to the book. Without an email in the body the contact must already exist. |
| Field | Type | About |
|---|---|---|
email | string | The contact's email address, stored trimmed and lower-cased. Optional: leave it out to update the contact the path id names, by id alone. |
firstName | string | |
lastName | string | |
properties | map of string | |
subscribed | boolean |
curl -X PUT "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/<contactId>" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"firstName": "Acme",
"lastName": "Acme",
"properties": {},
"subscribed": true
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contacts.upsert("cb_123", "cnt_456", {
email: "ada@example.com",
firstName: "Ada",
});
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
contact, _ = notix.contacts.upsert("cb_123", "cnt_456", {"email": "ada@example.com", "firstName": "Ada"})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$contact = $notix->contacts->upsert('cb_123', 'cnt_456', ['email' => 'ada@example.com', 'firstName' => 'Ada']);
Responses
200Contact upserted successfully
| Field | Type | About |
|---|---|---|
contactIdrequired | string |
Delete a contact
DELETE/v1/contactBooks/{contactBookId}/contacts/{contactId}Full access key
Remove one contact from a contact book.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string | |
contactIdrequired | string |
curl -X DELETE "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/<contactId>" \
-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.contacts.delete("cb_123", "cnt_456");
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
result, _ = notix.contacts.delete(book_id="cb_123", contact_id="cnt_456")
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$result = $notix->contacts->delete('cb_123', 'cnt_456');
Responses
200Contact deleted successfully
| Field | Type | About |
|---|---|---|
successrequired | boolean |
Add contacts in bulk
POST/v1/contactBooks/{contactBookId}/contacts/bulkFull access key
Add up to 1,000 contacts to a contact book in one request.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
| Field | Type | About |
|---|---|---|
emailrequired | string | |
firstName | string | |
lastName | string | |
properties | map of string | |
subscribed | boolean |
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'],
]);
Responses
200Bulk add contacts to a contact book
| Field | Type | About |
|---|---|---|
messagerequired | string | |
countrequired | number |
Delete contacts in bulk
DELETE/v1/contactBooks/{contactBookId}/contacts/bulkFull access key
Remove up to 1,000 contacts from a contact book in one request.
| Field | Type | About |
|---|---|---|
contactBookIdrequired | string |
| Field | Type | About |
|---|---|---|
contactIdsrequired | string[] |
curl -X DELETE "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts/bulk" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contactIds": [
"string"
]
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.contacts.bulkDelete("cb_123", { contactIds: ["cnt_1", "cnt_2"] });
from notix import Notix
notix = Notix() # reads NOTIX_API_KEY
result, _ = notix.contacts.bulk_delete("cb_123", {"contactIds": ["cnt_1", "cnt_2"]})
use Notix\Notix;
$notix = new Notix(getenv('NOTIX_API_KEY'));
$result = $notix->contacts->bulkDelete('cb_123', ['contactIds' => ['cnt_1', 'cnt_2']]);
Responses
200Bulk delete contacts from a contact book
| Field | Type | About |
|---|---|---|
successrequired | boolean | |
countrequired | number |