provider segmenting contactsSegmenting Contacts GET /marketing/segments
@utdk/sendgrid /marketing/segments
Get List of Segments
**This endpoint allows you to retrieve a list of segments.** 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 of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed
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)
getMarketingSegments
GET/marketing/segments
**This endpoint allows you to retrieve a list of segments.** 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

A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed

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'.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.getMarketingSegments({
  "no_parent_list_id": false
})