lads_list_dmp_segments
LinkedIn Ads read low risk
Part of the LinkedIn Audience Agent.
What it does
List Matched Audience DMP segments for a sponsored account via the q=account finder. GET /rest/dmpSegments?q=account&account=urn:li:sponsoredAccount:{id}, paginated with start+count. Returns elements[] each with id, name, type (USER/COMPANY/USER_LIST_UPLOAD/COMPANY_LIST_UPLOAD), accessPolicy, sourcePlatform, destinations[] (status BUILDING/READY plus destinationSegmentId=urn:li:adSegment:{id}), created/lastModified (epoch ms), and inputCount when present. Optionally narrow with sourcePlatform and sourceSegmentId query params. Read-only; honors paging.total — do not assume a single page is complete. Use to find an existing segment id before adding/removing users or attaching to a campaign.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account | string | yes | Sponsored account; normalize to urn:li:sponsoredAccount:{id} (strip dashes/whitespace). Must be within the bearer's scope. |
start | integer | no | Pagination offset (default 0). |
count | integer | no | Page size (default 10; capped per LinkedIn paging). |
source_platform | string | no | Optional filter by the partner-platform ENUM. |
source_segment_id | string | no | Optional filter by the source-platform foreign key. |
Safeguards
Policy
Read segment metadata only for the authorizing client's scoped account; never enumerate or aggregate segments across accounts the bearer is not authorized for.
Reminder
Segment names/metadata can reveal targeting intent — return only for the scoped account and do not retain member-level data.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
PERMISSION_DENIED | Bearer lacks read access to the account or the rw_dmp_segments scope (403). | Verify account role and DMP/Audiences scope; re-auth if scope missing (needs_reauth). | no |
CUSTOMER_NOT_FOUND | Account URN not found or not associated with the authenticated user. | Confirm the account id and that the member has access; surface to user. | no |
INVALID_ARGUMENT | Malformed account URN or finder params (400). | Normalize to urn:li:sponsoredAccount:{id}; fix per surfaced message. | no |
TOKEN_REVOKED | Access token expired/revoked (401). | Refresh and retry once; else prompt re-auth (needs_reauth). | yes |
RESOURCE_EXHAUSTED | Rate limit exceeded (429). | Backoff 5/10/20s cap 60s; respect Retry-After. | yes |
PLATFORM_ERROR | LinkedIn 5xx. | Retry with backoff. | yes |
Edge cases
- No segments -> return success with count:0 and empty elements (not an error).
- Large accounts paginate — follow paging.total; do not assume one page is complete.
- Segments still BUILDING have no usable destinationSegmentId yet — flag status in the result.
- sourcePlatform/sourceSegmentId filters narrow results; omit them to list all.