provider Segmenting Contacts V2 - Beta GET
/marketing/segments/2.0 @utdk/sendgrid
/marketing/segments/2.0 Get List of Segments
**The Segmentation V2 API is currently in private beta. If you'd like to be added to the beta, please fill out this [form]({https://docs.google.com/forms/d/e/1FAIpQLSd5zwC9dRk8lAp1oTWjdGc-aSY69flW_7wnutvKBhpUluSnfQ/viewform)**
The query param `parent_list_ids` is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty `results` array.
`parent_list_ids` | `no_parent_list_id` | `result`
-----------------:|:--------------------:|:-------------
empty | false | all segments
values | false | segments filtered by list_ids
values | true | segments filtered by list_ids and segments with no parent list_ids
empty | true | segments with no parent list_ids
- parent_list_ids query
- A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment.
- string
- no_parent_list_id query
- If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'.
- boolean
Try it
Authentication
Configure credentials for Email Activity (beta)
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import sendgrid from '@utdk/sendgrid';
await sendgrid.getSegments({
"no_parent_list_id": false
})