Skip to Content
Pouch
Batches

Send a batch

POST
/v1/batches

Auth: Bearer key scoped to the from domain.

Exactly one of list or recipients. attributes are substituted into {{name}} placeholders in subject, html and text. Every message carries a service-signed List-Unsubscribe and List-Unsubscribe-Post — this route takes no headers field.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Request Body

application/json
  1. body
from*string

Sender as Name <address> or a bare address. The domain must be verified and allow bulk.

Length3 <= length
subject*string

Subject line. May contain {{name}} placeholders.

Length1 <= length <= 998
html?string

HTML body. May contain {{name}} placeholders. At least one of html or text is required.

text?string

Plain-text body. May contain {{name}} placeholders.

layout?|

Wrap html in the domain's layout. Default false.

tags?array<>

Free-form tags, filterable in the dashboard.

Itemsitems <= 20
list?string

List id to draw recipients from. Mutually exclusive with recipients.

recipients?array<>

Inline recipients. Mutually exclusive with list.

Items1 <= items <= 5000

Response Body

The created batch, with per-status counts.

application/json
  1. response
id?string

Opaque id, prefixed bat_.

domain_id?string

The sending domain.

list_id?|

Set when recipients were drawn from a list. Null for inline recipients.

from?string

Sender, as Name when a name was given.

subject?string

Subject line, before {{name}} substitution.

tags?array<string>

Tags as sent.

recipient_count?integer

Recipients that became a message.

skipped_count?integer

Recipients skipped: unsubscribed, not yet confirmed or suppressed.

counts?

The batch's messages, tallied by lifecycle status. Live — reread for a current picture.

created_at?string

ISO 8601 timestamp.

Example Request
curl -X POST 'https://pouch.example.com/v1/batches' \  -H 'Content-Type: application/json' \  -d '{  "from": "string",  "subject": "string"}'
Example Response
{  "id": "string",  "domain_id": "string",  "list_id": "string",  "from": "string",  "subject": "string",  "tags": [    "string"  ],  "recipient_count": 0,  "skipped_count": 0,  "counts": {},  "created_at": "string"}