canonical: https://jentic.com/apis/sendgrid.com/twilio-sendgrid-marketing-campaigns-segments-20-ap

# Sendgrid Twilio SendGrid Marketing Campaigns Segments 2.0 API

The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to c. The API exposes 6 endpoints secured with bearer authentication.

## For AI agents

Programmatically create segment, get list of segments. Covers 6 operations with bearer authentication.

## Scope

Does not handle payments, communications, or crm - use for marketing only.

## Capabilities

- Create Segment
- Get List of Segments
- Update Segment
- Delete segment
- Manually refresh a segment

## Use cases

### Marketing Operations

Use the Twilio SendGrid Marketing Campaigns Segments 2.0 API to perform marketing operations programmatically. The API provides 6 endpoints covering core functionality including create segment, get list of segments, get segment by id.

Example prompt: Call POST /v3/marketing/segments/2.0 to create segment

### Automated Segmenting Contacts V2 Management

Automate segmenting contacts v2 operations by combining multiple Twilio SendGrid Marketing Campaigns Segments 2.0 API endpoints. Agents can get list of segments and then get segment by id in a single workflow.

Example prompt: Call GET /v3/marketing/segments/2.0 to get list of segments, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Twilio SendGrid Marketing Campaigns Segments 2.0 API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle bearer tokens manually.

Example prompt: Search Jentic for 'create segment', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v3/marketing/segments/2.0 | Create Segment |
| GET | /v3/marketing/segments/2.0 | Get List of Segments |
| GET | /v3/marketing/segments/2.0/{segment_id} | Get Segment by ID |
| PATCH | /v3/marketing/segments/2.0/{segment_id} | Update Segment |
| DELETE | /v3/marketing/segments/2.0/{segment_id} | Delete segment |
| POST | /v3/marketing/segments/2.0/refresh/{segment_id} | Manually refresh a segment |

## Key resources

- **Segmenting Contacts V2** — Twilio SendGrid Marketing Campaigns Segments API V2

## Why Jentic

- **Setup:** Wiring the Twilio SendGrid Marketing Campaigns Segments 2.0 API by hand means learning its bearer API key auth, pointing at the api.sendgrid.com host, and handling paging and retries yourself. Through Jentic you install once, import the Segments 2.0 API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** This API puts the segment id in the URL path (/v3/marketing/segments/2.0/{segment_id}), so a rule can pin your agent to one segment: it can read and refresh that segment and nothing else. You choose the operations it may call, so deleting a segment with DELETE /v3/marketing/segments/2.0/{segment_id} is not included unless you add it.
- **Credential handling:** Your Twilio SendGrid API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a segment' or 'refresh a segment', and Jentic returns the matching Twilio SendGrid Segments 2.0 API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mailchimp** — Alternative marketing API
- **Hubspot** — Alternative marketing API

## FAQ

### What authentication does the Twilio SendGrid Marketing Campaigns Segments 2.0 API use?

The Twilio SendGrid Marketing Campaigns Segments 2.0 API uses a Bearer token in the Authorization header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create segment with the Twilio SendGrid Marketing Campaigns Segments 2.0 API?

Yes. Use the POST /v3/marketing/segments/2.0 endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Twilio SendGrid Marketing Campaigns Segments 2.0 API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create segment through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create segment'. Jentic returns the matching Twilio SendGrid Marketing Campaigns Segments 2.0 API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Twilio SendGrid Marketing Campaigns Segments 2.0 API have?

The Twilio SendGrid Marketing Campaigns Segments 2.0 API exposes 6 endpoints covering segmenting contacts v2 operations.

### Can I limit what my agent is allowed to do with the SendGrid Segments 2.0 API?

Yes. Jentic One is self-hosted by you, so your own rules decide which operations and credentials the agent may use. Because the segment id sits in the URL path (/v3/marketing/segments/2.0/{segment_id}), you can pin the agent to a single segment and allow only reading it with GET and refreshing it with POST /v3/marketing/segments/2.0/refresh/{segment_id}. Destructive calls like DELETE /v3/marketing/segments/2.0/{segment_id} or creating new segments stay off unless you explicitly grant them.
