Segments

Everything about your Segments

Operations

MethodEndpointDescription
GET/contacts/{contact_id}/segmentsList attached segments for contact
GET/segmentsList all segments
GET/segments/{segment_id}Retrieve a segment

Example

List attached segments for contact, with the TypeScript SDK:

ts
import { Intercom } from "@octridev/intercom";

const client = new Intercom({
  // Optional: replaces the default server and any server an operation declares.
  baseUrl: "https://api.intercom.io",
  auth: { bearerAuth: process.env.API_TOKEN! },
});

const result = await client.contacts.listSegments({
  contactId: "contact-1",
});
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.