Segments
Overview
Segments endpoints manage segment resources for the authenticated tenant.
Endpoint Summary
| Method | Route | Purpose |
|---|---|---|
GET | /v2.3/data/segments | List segments |
POST | /v2.3/data/segments | Create segment |
PUT | /v2.3/data/segments/{segmentId} | Update segment |
DELETE | /v2.3/data/segments/{segmentId} | Delete segment |
GET /v2.3/data/segments
Return paginated segment resources.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Accept | Yes | application/json |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number. |
per_page | number | No | Items per page. |
Example Request
curl -X GET "{{BASE_URL}}/v2.3/data/segments?page=1&per_page=20" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"
Success Response (200)
{
"success": true,
"result": {
"currentPage": 1,
"perPage": 20,
"lastPage": 1,
"total": 2,
"items": [
{
"id": "7f2d6e6d-a4ad-4b58-abfe-bd8b918ebec2",
"name": "EMEA"
},
{
"id": "cf709e6b-b49d-4693-a809-34fbe555c503",
"name": "DACH"
}
],
"filters": []
}
}
POST /v2.3/data/segments
Create a segment.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Content-Type | Yes | application/json |
Accept | Yes | application/json |
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Segment name. |
Example Request
curl -X POST "{{BASE_URL}}/v2.3/data/segments" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "EMEA"
}'
Success Response (200)
{
"success": true,
"result": {
"id": "7f2d6e6d-a4ad-4b58-abfe-bd8b918ebec2",
"name": "EMEA"
}
}
PUT /v2.3/data/segments/{segmentId}
Update a segment.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Content-Type | Yes | application/json |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
segmentId | string | Yes | Segment UUID. |
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Segment name. |
Example Request
curl -X PUT "{{BASE_URL}}/v2.3/data/segments/{{SEGMENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Central Europe"
}'
Success Response (200)
{
"success": true,
"result": {
"id": "7f2d6e6d-a4ad-4b58-abfe-bd8b918ebec2",
"name": "Central Europe"
}
}
DELETE /v2.3/data/segments/{segmentId}
Delete a segment.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer {{ACCESS_TOKEN}} |
Accept | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
segmentId | string | Yes | Segment UUID. |
Example Request
curl -X DELETE "{{BASE_URL}}/v2.3/data/segments/{{SEGMENT_ID}}" \
-H "Authorization: Bearer {{ACCESS_TOKEN}}" \
-H "Accept: application/json"
Success Response (204)
{
"success": true,
"result": []
}