Get all segments for a company with pagination

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, use GET /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:

  1. First request: GET /companies/{id}/segments?per_page=20
  2. Response returns a cursor value (e.g., 12345) and up to 20 segments
  3. Next page: GET /companies/{id}/segments?per_page=20&cursor=12345
  4. Continue until cursor is null (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 ID
  • name: Segment name
  • entry_date: Unix timestamp when the company entered the segment
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The company identifier. Can be either the numeric Customerly company ID (e.g., '12345') or your custom_company_id prefixed with 'cid:' (e.g., 'cid:company_12345')

Query Params
integer
1 to 100

Number of segments per page (default: 20, max: 100)

integer

Pagination cursor from the previous response. Use the 'cursor' value returned in the previous page's response to fetch the next page. Omit this parameter for the first page.

Responses

401

Authentication required

404

Company not found

422

Invalid request parameters

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json