Get Segments in Marketing Cloud
Retrieve a list of segments using the Data 360 Segments endpoint in Connect API.
Prerequisite
Before you send a request to Connect API, obtain a bearer token. For more information, see Connect to REST-based APIs.
Send the Request
To retrieve a list of segments, send a GET request to the /services/data/{apiVersion}/ssot/segments endpoint. For additional information and code examples, see getSegments.
1GET /services/data/{apiVersion}/ssot/segments HTTP/1.1
2Host: YOUR_SUBDOMAIN.my.salesforce.com
3Content-Type: application/json
4Authorization: Bearer YOUR_BEARER_TOKENIf the request is successful, the response body contains a list of segments in your org.
1{
2 "batchSize": 20,
3 "offset": 0,
4 "orderByExpression": "[Name asc]",
5 "segments": [
6 {
7 "apiName": "Running_Shoe_Promo_Audience",
8 "displayName": "Running Shoe Promo Audience",
9 "marketSegmentDefinitionId": "3HX1Q000000HxyZWAS",
10 "marketSegmentId": "1sg1Q000000HxyZQAS",
11 "publishInterval": "NO_REFRESH",
12 "publishStatus": "SUCCESS",
13 "segmentMembershipTable": "Individual_Unified_SMH_1234567890123__dlm",
14 "segmentOnId": "0gj1Q000000PQ3xYZG",
15 "segmentStatus": "ACTIVE",
16 "segmentType": "UI"
17 },
18 ...
19 ]
20}