The intercom API reference.
The intercom API reference.
A segment is a group of your contacts defined by the rules that you set.
Type of the contact: contact (lead) or user.
{ "type": "segment", "id": "56203d253cba154d39010062", "name": "Active", "created_at": 1394621988, "updated_at": 1394622004, "person_type": "contact", "count": 3 }
curl -i -X GET \ 'https://api.intercom.io/contacts/{contact_id}/segments' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Intercom-Version: 2.8'
{ "type": "list", "data": [ { … } ] }
curl -i -X GET \ 'https://api.intercom.io/segments?include_count=true' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Intercom-Version: 2.8'
{ "type": "segment.list", "segments": [ { … }, { … } ] }
curl -i -X GET \ 'https://api.intercom.io/segments/{id}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Intercom-Version: 2.8'
{ "type": "segment", "id": "6657aa5d6abd01639cc9ea45", "name": "John segment", "created_at": 1717021277, "updated_at": 1717021277, "person_type": "user" }