Edit in GitHubLog an issue

Segments API

The Segments APIs allow you to retrieve or create segments programmatically through Adobe Developer. The APIs use the same data and methods that are used when working with segments in the UI. See Segments overview in the CJA documentation for more information.

Use the /segments endpoint to retrieve or create segments.

Retrieve multiple segments

To retrieve a list of segments that you have created or that have been shared with you, use the following URL:

GET https://cja.adobe.io/segments

Each segment in the response also includes a segment ID that can be used to retrieve information individually.

Retrieve a single segment

Once you have the desired ID, you can append the ID to the call to retrieve details on a single segment:

GET https://cja.adobe.io/segments/{id}

Find components that use a specified segment

To retrieve a list of components that contain a specified segment, include the usedIn expansion parameter in your multiple segments request.

The following response shows projects that include the "Example Channel" segment:

Copied to your clipboard
{
"content": [
{
"name": "Example Channel",
"description": "Example channel segment",
"organization": "77717@ExampleOrg",
"recentRecordedAccess": "YYYY-06-05T13:40:31Z",
"performanceScore": "2.14",
"id": "s44444444@ExampleOrg_44444444",
"usedIn": [
{
"componentId": "44444444444",
"componentType": "project",
"subType": "project",
"internal": false,
"name": "Example Customer Analysis",
"lastRecordedAccess": 7777775200236
},
{
"componentId": "55555555",
"componentType": "project",
"subType": "project",
"internal": false,
"name": "Example Customer List",
"lastRecordedAccess": 7777776824296
},
],
"usageSummary": {
"count": 0,
"mostRecentTimestamp": null,
"itemId": null
},
"owner": {
"imsUserId": "7777777777.e",
"ownerId": "777777777@7777777777.e",
"name": null,
"type": "imsUser"
},
"dataId": null
}
],
"totalElements": 2,
"totalPages": 1,
"numberOfElements": 1,
"number": 0,
"firstPage": true,
"lastPage": true,
"sort": null,
}

Create a segment

Create a new segment with the desired definition.

POST https://cja.adobe.io/segments

An example POST body:

Copied to your clipboard
{
"dataId": "{DATAID}",
"compatibility": null,
"definition": {
"container": {
"func": "container",
"pred": {
"evt": {
"func": "event",
"name": "metrics/visits"
},
"func": "event-exists",
"description": "purchase id"
},
"context": "hits"
},
"func": "segment",
"version": [
1,
0,
0
]
},
"name": "Integration Test Seg 1",
"description": "For Integration Test Only"
}

To validate a segment, see Validate segments.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.