get
https://api.customerly.io/v2/companies//segments
Returns a paginated list of segments that a company belongs to.
Company Identification
You can retrieve segments using two types of identifiers:
1. Customerly Company ID (numeric):
- Use the internal company ID directly (e.g.,
12345) - Example:
GET /companies/12345/segments
2. Custom Company ID (prefixed with cid:):
- Use your custom identifier with the
cid:prefix - Example: If your custom_company_id is
company_12345, useGET /companies/cid:company_12345/segments
Pagination
This endpoint uses cursor-based pagination:
per_page: Number of segments to return per page (default: 20, max: 100)cursor: The cursor value from the previous response to fetch the next page
Example pagination flow:
- First request:
GET /companies/{id}/segments?per_page=20 - Response returns a
cursorvalue (e.g.,12345) and up to 20 segments - Next page:
GET /companies/{id}/segments?per_page=20&cursor=12345 - Continue until
cursorisnull(no more segments available)
Response
Segments are ordered by segment entry ID in descending order (most recent first).
Each segment includes:
company_segment_id: Internal segment IDname: Segment nameentry_date: Unix timestamp when the company entered the segment
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Authentication required
404Company not found
422Invalid request parameters