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

# Sendgrid Twilio SendGrid Marketing Campaigns Segments API

This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were remove. The API exposes 3 endpoints secured with bearer authentication.

## For AI agents

Programmatically get list of segments, get segment by id. Covers 3 operations with bearer authentication.

## Scope

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

## Capabilities

- Get List of Segments
- Delete Segment
- Integrate Twilio SendGrid Marketing Campaigns Segments API into automated workflows
- Query and filter Twilio SendGrid Marketing Campaigns Segments API records by parameters
- Monitor Twilio SendGrid Marketing Campaigns Segments API operational status and events

## Use cases

### Marketing Operations

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

Example prompt: Call GET /v3/marketing/segments to get list of segments

### Automated Segmenting Contacts Management

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

Example prompt: Call GET /v3/marketing/segments/{segment_id} to get segment by id, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Twilio SendGrid Marketing Campaigns Segments 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 'get list of segments', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v3/marketing/segments | Get List of Segments |
| GET | /v3/marketing/segments/{segment_id} | Get Segment by ID |
| DELETE | /v3/marketing/segments/{segment_id} | Delete Segment |

## Key resources

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

## Why Jentic

- **Setup:** Wiring the Twilio SendGrid Marketing Campaigns Segments API by hand means learning its bearer API key auth, pointing at the api.sendgrid.com host, and handling retries yourself. Through Jentic you install once, import the Segments 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/{segment_id}), so a rule can pin your agent to reading one segment and nothing else. You choose the operations it may call, so deleting a segment with DELETE /v3/marketing/segments/{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 'list segments' or 'get a segment by id', and Jentic returns the matching Twilio SendGrid Segments 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 API use?

The Twilio SendGrid Marketing Campaigns Segments 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 get list of segments with the Twilio SendGrid Marketing Campaigns Segments API?

Yes. Use the GET /v3/marketing/segments 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 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 get list of segments through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get list of segments'. Jentic returns the matching Twilio SendGrid Marketing Campaigns Segments 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 API have?

The Twilio SendGrid Marketing Campaigns Segments API exposes 3 endpoints covering segmenting contacts operations.

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

Yes. Because Jentic One is self-hosted, your own rules decide which of this API's operations the agent may call, so you can allow reading segments while excluding segment deletion. Since the segment id sits in the URL path (/v3/marketing/segments/{segment_id}), you can pin the agent to one specific segment and nothing else, and you control which credentials it uses.
