All tools
S
by SendGrid
Create a segment
Creates a segment of the contacts that match an SQL-style query, optionally within one list, that updates as contacts change.
Updated Sep 27, 2026
create-segment.md
Create a segment
Creates a segment of the contacts that match an SQL-style query, optionally within one list, that updates as contacts change.
Note: Counts refresh every 1 to 24 hours, and a segment built on engagement data takes about 30 minutes to start filling.
Set up
Use the first option your agent supports.
API (official)
- Base URL: https://api.sendgrid.com
- Endpoint:
POST /v3/marketing/segments/2.0 - Auth: send the header
Authorization: Bearer $SENDGRID_API_KEY - Get a key: https://app.sendgrid.com/settings/api_keys
- Docs: https://www.twilio.com/docs/sendgrid/api-reference
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official | POST /v3/marketing/segments/2.0 | API key in $SENDGRID_API_KEY | Docs |
Workflows using Create a segment
No workflows yet
No published workflow uses Create a segment yet.