provider Segmenting Contacts V2 - Beta POST /marketing/segments/2.0
@utdk/sendgrid /marketing/segments/2.0
Create Segment
**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)** Segment `name` has to be unique. A user can not create a new segment with an existing segment name.

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.

postSegments
POST/marketing/segments/2.0
**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)** Segment `name` has to be unique. A user can not create a new segment with an existing segment name.

Input

required

Name of the segment.

The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future

required

SQL query which will filter contacts based on the conditions provided

Enter a gateway URL above to enable sending.

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

TypeScript

import sendgrid from '@utdk/sendgrid';

await sendgrid.postSegments()