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

# Sendgrid Twilio SendGrid Marketing Campaigns Statistics API

The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics f. The API exposes 8 endpoints secured with bearer authentication.

## For AI agents

Programmatically get all automation stats, get automation stats by id. Covers 8 operations with bearer authentication.

## Scope

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

## Capabilities

- Get All Automation Stats
- Export Single Send Stats
- Integrate Twilio SendGrid Marketing Campaigns Statistics API into automated workflows
- Query and filter Twilio SendGrid Marketing Campaigns Statistics API records by parameters
- Monitor Twilio SendGrid Marketing Campaigns Statistics API operational status and events

## Use cases

### Analytics Operations

Use the Twilio SendGrid Marketing Campaigns Statistics API to perform analytics operations programmatically. The API provides 8 endpoints covering core functionality including get all automation stats, get automation stats by id, get automation click tracking stats by id.

Example prompt: Call GET /v3/marketing/stats/automations to get all automation stats

### Automated Stats Management

Automate stats operations by combining multiple Twilio SendGrid Marketing Campaigns Statistics API endpoints. Agents can get automation stats by id and then get automation click tracking stats by id in a single workflow.

Example prompt: Call GET /v3/marketing/stats/automations/{id} to get automation stats by id, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Twilio SendGrid Marketing Campaigns Statistics 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 all automation stats', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v3/marketing/stats/automations | Get All Automation Stats |
| GET | /v3/marketing/stats/automations/{id} | Get Automation Stats by ID |
| GET | /v3/marketing/stats/automations/{id}/links | Get Automation Click Tracking Stats by ID |
| GET | /v3/marketing/stats/automations/export | Export Single Send Stats |
| GET | /v3/marketing/stats/singlesends | Get All Single Sends Stats |
| GET | /v3/marketing/stats/singlesends/{id} | Get Single Send Stats by ID |
| GET | /v3/marketing/stats/singlesends/{id}/links | Get Single Send Click Tracking Stats by ID |
| GET | /v3/marketing/stats/singlesends/export | Export Single Send Stats |

## Key resources

- **Stats** — Twilio SendGrid Marketing Campaigns Stats API

## Why Jentic

- **Setup:** Wiring the Twilio SendGrid Marketing Campaigns Statistics 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 Statistics API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** This API puts the automation and single send ids in the URL path (/v3/marketing/stats/automations/{id}, /v3/marketing/stats/singlesends/{id}), so a rule can pin your agent to reading stats for one automation or single send and nothing else. All operations here are read-only, and you choose which of them the agent may call.
- **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 'get automation stats' or 'export single send stats', and Jentic returns the matching Twilio SendGrid Statistics API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Mixpanel** — Alternative analytics API
- **Amplitude** — Alternative analytics API
- **Segment** — Complementary analytics API
- **Pendo** — Complementary analytics API

## FAQ

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

The Twilio SendGrid Marketing Campaigns Statistics 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 all automation stats with the Twilio SendGrid Marketing Campaigns Statistics API?

Yes. Use the GET /v3/marketing/stats/automations 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 Statistics 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 all automation stats through Jentic?

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

The Twilio SendGrid Marketing Campaigns Statistics API exposes 8 endpoints covering stats operations.

### Can I limit what my agent is allowed to do with the Twilio SendGrid Marketing Campaigns Statistics API?

Yes. Because you run Jentic One yourself, your own rules decide which of this API's operations the agent may call and which credentials it may use. Every operation here is read-only, so you can allow just the stats reads you want, such as GET /v3/marketing/stats/automations or GET /v3/marketing/stats/singlesends. The automation and single send ids sit in the URL path (/v3/marketing/stats/automations/{id}, /v3/marketing/stats/singlesends/{id}), so a rule can pin the agent to reading stats for one automation or single send and nothing else.
