Add contacts to a segment

Put contacts into a segment by hand, whatever its rules say, as an automation's Add to segment step does.

On this page
POSThttps://app.usenotix.dev/api/v1/contactBooks/{contactBookId}/segments/{segmentId}/members

Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.

Put contacts into a segment by hand, whatever its rules say, as an automation's Add to segment step does. Every contact must be in the segment's contact book. Needs a full access key.

Path parameters

contactBookIdstringrequired
segmentIdstringrequired

Body parameters

contactIdsstring[]required

Ids of contacts in the segment's contact book, 1 to 1000.

Headers

Authorizationstringrequired

Bearer followed by your API key.

Errors

400

A contact is not in the segment's contact book.

404

No segment with this id in the contact book for the calling team.

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

curl -X POST "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/segments/<segmentId>/members" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contactIds": [
    "cnt_123"
  ]
}'
Response200
{
  "segmentId": "cm1x8f3k20001qz7v5b9d2e4a",
  "added": 1
}
Open in ClaudeOpen in ChatGPT