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.11'
{ "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.11'
{ "type": "segment.list", "segments": [ { … }, { … } ] }
curl -i -X GET \ 'https://api.intercom.io/segments/{id}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Intercom-Version: 2.11'
{ "type": "segment", "id": "667d61808a68186f43bafe5f", "name": "John segment", "created_at": 1719492992, "updated_at": 1719492992, "person_type": "user" }