# preview_send

Preview what a send would do

`POST /v1/mailings/{mailing_id}/send-preview`

| | |
| --- | --- |
| Risk | read |
| Authentication | API key or OAuth access token |
| Scopes | `mailings: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: A mailing draft is ready and you want the recipient count, the deliverability decision, tranche sizes, quota effect and a preview_token for request_send.
- Do not use when: you want to send (call request_send with the token this returns).
- Side effects: None.
- Reversible: Not applicable, nothing changes.
- Required scope: mailings:read.
- Idempotency: safe to repeat.
- Typical next step: call request_send with preview_token and an Idempotency-Key.

## Scopes

- `mailings:read`: Read mailings and preview what a send would do.

## Request

### Path parameters

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

### Query parameters

None.

## Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mailing_id` | string | yes |  |
| `mailing_revision` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `mailing_status` | string | yes |  |
| `recipient_count` | integer, min -9007199254740991, max 9007199254740991 | yes | Confirmed subscribers this mailing would reach right now. |
| `decision` | one of "allow", "stage", "hold", "refused", "not_sendable" | yes | allow: sends as planned. stage: sends in tranches. hold: the owner reviews it first. refused: cannot be sent as it is. not_sendable: the mailing is not a draft. |
| `reasons` | array of object | yes | Why the decision is not allow. Empty when it is allow. |
| `reasons[].code` | string | yes | Stable reason code. Branch on this. |
| `reasons[].sentence` | string | yes | The sentence the author sees in the dashboard for the same reason. |
| `tranche_sizes` | array of integer, min -9007199254740991, max 9007199254740991 | yes | Recipients per tranche when the decision is stage. |
| `quota_effect` | object | yes |  |
| `quota_effect.recipients` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `quota_effect.sent_today` | integer, min -9007199254740991, max 9007199254740991 | yes |  |
| `quota_effect.daily_cap` | integer, min -9007199254740991, max 9007199254740991 or null | yes |  |
| `quota_effect.exceeds_daily_cap` | boolean | yes |  |
| `links_checked` | boolean | yes | False when link reputation is not yet known; the send still re-checks at send time. |
| `preview_token` | string or null | yes | Pass to request_send within 15 minutes. Null when the mailing cannot be requested. |
| `expires_at` | string or null | yes |  |

## Examples

### ready to send

Request:

```bash
curl -X POST 'https://api.seemly.com/v1/mailings/cmp_4d8x2p0q7r4d8x2p0q7r4d8x/send-preview' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"
```

Response: `200`:

```json
{
  "mailing_id": "cmp_4d8x2p0q7r4d8x2p0q7r4d8x",
  "mailing_revision": 3,
  "mailing_status": "draft",
  "recipient_count": 212,
  "decision": "allow",
  "reasons": [],
  "tranche_sizes": [],
  "quota_effect": {
    "recipients": 212,
    "sent_today": 0,
    "daily_cap": 500,
    "exceeds_daily_cap": false
  },
  "links_checked": true,
  "preview_token": "pvt_example.token",
  "expires_at": "2026-12-02T09:45:00Z"
}
```

## 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), [`workspace_paused`](/developers/md/errors/workspace_paused), [`api_suspended`](/developers/md/errors/api_suspended), [`consent_required`](/developers/md/errors/consent_required) |
| 404 | [`not_found`](/developers/md/errors/not_found) |
| 409 | [`conflict`](/developers/md/errors/conflict) |
| 429 | [`rate_limited`](/developers/md/errors/rate_limited), [`quota_exceeded`](/developers/md/errors/quota_exceeded) |
| 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

- [`request_send`](/developers/md/operations/request_send)
- [`get_mailing`](/developers/md/operations/get_mailing)

## Related

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