Update a contact
Change the fields you send on an existing contact.
PATCH
https://app.usenotix.dev/api/v1/contactBooks/{contactBookId}/contacts/{contactId}Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Change the fields you send on an existing contact.
Path parameters
contactBookIdstringrequired
contactIdstringrequired
Body parameters
firstNamestring
At most 256 characters.
lastNamestring
At most 256 characters.
propertiesmap of string
subscribedboolean
Set false to unsubscribe the contact. Setting true for a contact who unsubscribed, complained, bounced or has not confirmed double opt-in is refused with 422: only the contact can re-subscribe, through their own link.
Headers
Authorizationstringrequired
Bearer followed by your API key.
Errors
422
Refused: only the contact can re-subscribe, through their own link. Nothing in the request was applied.
Every error has the same shape. See all error codes.
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']);
Response200
{
"contactId": "cm1x8f3k20001qz7v5b9d2e4a"
}