Update a contact book
Change a contact book's details.
https://app.usenotix.dev/api/v1/contactBooks/{contactBookId}Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Change a contact book's details. Turning double opt-in on needs a sender, doubleOptInFrom in the request or one already on the book, on one of your verified domains; otherwise 422.
Path parameters
Body parameters
Turning it on needs a sender: doubleOptInFrom in this request, or one already on the book.
The confirmation email's from address, on one of your verified domains. It cannot be cleared while double opt-in is on.
Can be null.
Headers
Bearer followed by your API key.
Errors
Forbidden - API key doesn't have access to this contact book
Contact book not found
Double opt-in would be on with no sender, or doubleOptInFrom is not on one of your verified domains. Nothing was changed.
Every error has the same shape. See all error codes.
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": "News <hello@yourdomain.com>",
"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]);
{
"id": "clx1234567890",
"name": "Newsletter Subscribers",
"teamId": 1,
"properties": {
"customField1": "value1"
},
"variables": [
"registrationCode",
"company"
],
"emoji": "📙",
"createdAt": "string",
"updatedAt": "string"
}