Retrieve a segment's usageMenu

Retrieve a segment's usage

GET/v1/segments/{id}/usage

Requires an API key with the segments:read scope. About keys and scopes

Works with integration, agent and partner keys.

Returns what uses the segment: campaigns whose audience is this segment, whose rules or exclusions name it, or whose content shows a block only to it (in any A/B version), journeys whose rules or steps name it, and other segments whose rules name it, up to 50 of each (hasMore when a kind holds more). Deleting the segment is refused (409 IN_USE) while any of them is a campaign not yet sent or cancelled (draft, scheduled, testing for an A/B test, or sending), an active or paused journey, or another segment.

Path parameters

idstringrequired

The segment's id.

uuid

Header parameters

Kirora-Workspacestringoptional

Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

pattern ^[A-Za-z0-9._:-]{1,128}$

Returns

Returns 200 OK with a SegmentUsage in data. Otherwise returns an error; Errors lists every code and which to retry.

campaignsobject[]required
3 child attributes
idstringrequired

uuid

namestringrequired
statusstringrequired

one of draft, scheduled, sending, testing, sent, cancelled

journeysobject[]required
3 child attributes
idstringrequired

uuid

namestringrequired
statusstringrequired

one of draft, active, paused, ended

segmentsobject[]required
2 child attributes
idstringrequired

uuid

namestringrequired
hasMorebooleanrequired

More use it than are listed: each list stops at 50.