Upsert a contact

Create the contact if it does not exist, or update it if it does.

PUThttps://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.

Create the contact if it does not exist, or update it if it does.

Path parameters

contactBookIdstringrequired
contactIdstringrequired

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.

Body parameters

emailstring

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.

firstNamestring

At most 256 characters.

lastNamestring

At most 256 characters.

propertiesmap of string
subscribedboolean

Headers

Authorizationstringrequired

Bearer followed by your API key.

Notix-Dry-Runstring

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

403

The key's approval policy does not allow the journey enrolments or confirmation email this contact sets off

429

The key's daily journey enrolment limit or email cap is reached

503

The per-key limits cannot be checked just now; nothing was written

Every error has the same shape. See all error codes.

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
}'
Response200
{
  "contactId": "cm1x8f3k20001qz7v5b9d2e4a"
}
Open in ClaudeOpen in ChatGPT