# get_mailing_stats

Get delivery and engagement for one mailing

`GET /v1/mailings/{mailing_id}/stats`

| | |
| --- | --- |
| Risk | read |
| Authentication | API key or OAuth access token |
| Scopes | `stats:read` |
| Idempotency | natural: repeating the call gives the same result |
| Dry run | not applicable |
| Success status | 200 |
| Response type | application/json |

## What it does

- Use when: You report how a sent mailing performed: delivered, bounced, opened, clicked.
- Do not use when: the mailing is a draft or you need totals across mailings (call get_stats_overview).
- Side effects: None.
- Reversible: Not applicable, nothing changes.
- Required scope: stats:read.
- Idempotency: safe to repeat.
- Typical next step: call list_mailing_links for click detail.

## Scopes

- `stats:read`: Read sending and growth statistics.

## Request

### Path parameters

| Field | Type | Description |
| --- | --- | --- |
| `mailing_id` | string |  |

### Query parameters

None.

Every read also accepts `fields=a,b,c` to return only those top-level fields.

## Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mailing_id` | string | yes |  |
| `status` | string | yes |  |
| `total_recipients` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `batches` | object | yes |  |
| `batches.total` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `batches.reserved` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `batches.sent` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `batches.unknown` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `batches.failed` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `recipients` | object | yes |  |
| `recipients.pending` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `recipients.sent` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `recipients.unknown` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `recipients.failed` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `recipients.skipped` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `delivery` | object | yes |  |
| `delivery.delivered` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `delivery.bounced` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `delivery.complained` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `delivery.soft_bounced` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `delivery.rejected` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `opened` | integer, min -9007199254740991, max 9007199254740991 | yes | First-party open pixel, distinct readers |
| `clicked` | integer, min -9007199254740991, max 9007199254740991 | yes | Distinct readers who clicked a tracked link |

## Examples

### sent

Request:

```bash
curl 'https://api.seemly.com/v1/mailings/cmp_0123456789abcdefghjkmnpq/stats' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

Response: `200`:

```json
{
  "mailing_id": "cmp_0123456789abcdefghjkmnpq",
  "status": "sent",
  "total_recipients": 100,
  "batches": {
    "total": 1,
    "reserved": 0,
    "sent": 1,
    "unknown": 0,
    "failed": 0
  },
  "recipients": {
    "pending": 0,
    "sent": 100,
    "unknown": 0,
    "failed": 0,
    "skipped": 0
  },
  "delivery": {
    "delivered": 98,
    "bounced": 1,
    "complained": 0,
    "soft_bounced": 1,
    "rejected": 0
  },
  "opened": 60,
  "clicked": 12
}
```

## Errors

| Status | Codes |
| --- | --- |
| 400 | [`validation_failed`](/developers/md/errors/validation_failed) |
| 401 | [`unauthenticated`](/developers/md/errors/unauthenticated), [`credential_revoked`](/developers/md/errors/credential_revoked), [`credential_expired`](/developers/md/errors/credential_expired) |
| 403 | [`insufficient_scope`](/developers/md/errors/insufficient_scope), [`plan_does_not_include`](/developers/md/errors/plan_does_not_include), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 404 | [`not_found`](/developers/md/errors/not_found) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited) |
| 503 | [`service_unavailable`](/developers/md/errors/service_unavailable) |

Every error is an `application/problem+json` body with a `code`, a `fix` sentence and `next_actions`. See [reading a problem response](/developers/md/guides/agents#reading-a-problem-response).

## Typical next steps

- [`list_mailing_links`](/developers/md/operations/list_mailing_links)

## Related

- [OpenAPI document](https://api.seemly.com/v1/openapi.json)
- [Agent guide](/developers/md/guides/agents)
