Segment API
Create and manage dynamic contact segments to send targeted messages and automate tasks.
Authentication: All requests require an x-api-key header.
Response: Successful requests return [200 OK] with the appropriate schema.
Endpoints
1. List/Search Segments
GET /v1/segments
Retrieve a list of available segments with optional filtering and search.
Query Parameters:
workspaceId(string, optional) β Filter by workspace IDlimit(string, optional) β Maximum number of resultspage(string, optional) β Page number for paginationsearchText(string, optional) β Free text search
Response: [200 OK] β Array of Segment
2. Create a Segment
POST /v1/segments
Create a new dynamic segment.
Request Body: Segment (application/json)
Response: [200 OK] β Segment
3. Get Segment by ID
GET /v1/segments/{segmentId}
Retrieve details of a specific segment by ID.
Path Parameters:
segmentId(string, required) β Unique segment ID
Response: [200 OK] β Segment
4. Delete Segment by ID
DELETE /v1/segments/{segmentId}
Delete a specific segment by ID.
Path Parameters:
segmentId(string, required) β Unique segment ID
Response: [200 OK] β DeleteResponse
Schemas
Segment Schema
SegmentsResponse Schema
DeleteResponse Schema
Last updated