POST
/contacts/{contact_id}/segments/{segment_id}Add a contact to a segment
Adds a contact to a segment. Supply the contact’s ID or email address and the segment ID to select the membership to create.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
contact_idstringrequired
The contact’s ID or email address.
segment_idstringrequired
The ID of the segment to add the contact to.
200Returns the response object type, contact ID, and segment ID.
objectstringoptional
The object type.
contact_idstringoptional
The ID of the contact.
segment_idstringoptional
The ID of the segment.
Error handling
The contact_id path parameter must identify the contact by ID or email address. The segment_id path parameter must identify the segment to add the contact to.