Get Segments
GET {{baseUrl}}/api/segments/
Get all segments in an account.
Filter to request a subset of all segments. Segments can be filtered by name
, created
, and updated
fields.
Returns a maximum of 10 results per page.
Rate limits:
Burst: 75/s
Steady: 700/m
Scopes:
segments:read
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
fields[segment] | string | For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets | |
fields[tag] | string | For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets | |
filter | string | For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>name : any , equals <br>id : any , equals <br>created : greater-than <br>updated : greater-than | |
include | string | For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#relationships | |
page[cursor] | string | For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
revision | string | (Required) API endpoint revision (format: YYYY-MM-DD[.suffix]) | |
Accept | string |
RESPONSES
status: OK
{"data":[{"type":"segment","id":"\u003cstring\u003e","attributes":{"name":"\u003cstring\u003e","created":"\u003cdateTime\u003e","updated":"\u003cdateTime\u003e"},"links":{"self":"\u003curi\u003e"},"relationships":{"profiles":{"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}},"tags":{"data":[{"type":"tag","id":"\u003cstring\u003e"},{"type":"tag","id":"\u003cstring\u003e"}],"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}}}},{"type":"segment","id":"\u003cstring\u003e","attributes":{"name":"\u003cstring\u003e","created":"\u003cdateTime\u003e","updated":"\u003cdateTime\u003e"},"links":{"self":"\u003curi\u003e"},"relationships":{"profiles":{"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}},"tags":{"data":[{"type":"tag","id":"\u003cstring\u003e"},{"type":"tag","id":"\u003cstring\u003e"}],"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}}}}],"links":{"self":"\u003curi\u003e","first":"\u003curi\u003e","last":"\u003curi\u003e","prev":"\u003curi\u003e","next":"\u003curi\u003e"},"included":[{"type":"tag","id":"\u003cstring\u003e","attributes":{"name":"\u003cstring\u003e"},"links":{"self":"\u003curi\u003e"}},{"type":"tag","id":"\u003cstring\u003e","attributes":{"name":"\u003cstring\u003e"},"links":{"self":"\u003curi\u003e"}}]}