Sign in to fill these examples with your own keys. Sign in Start free trial

Bulk sending

Send one message to up to 1,000 recipients in one request, each with their own copy.

POST /api/v1/emails/bulk takes shared content and a list of recipients. Each recipient gets a separate message with their own variables, headers, and unique args. PostShiba checks the request, accepts it whole, and sends the messages at your cluster's pace.

Use it for invitations, announcements, and other sends where many people get the same message with their own details. For one message at a time, use POST /api/v1/emails.

Send a bulk

subject, html, text, reply_to, and the values in headers are Liquid. Each message is rendered with its own variables, plus email and name.

send-bulk.sh
1curl -sS -X POST \ 2 -H 'Authorization: Bearer YOUR_API_KEY' \ 3 -H 'Content-Type: application/json' \ 4 -d '{ 5 "from": "Party <hello@mail.example.com>", 6 "subject": "{{ name }}, you are invited", 7 "html": "<p>RSVP at {{ rsvp_url }}</p>", 8 "text": "RSVP at {{ rsvp_url }}", 9 "reply_to": "rsvp+{{ guest_id }}@inbox.example.com", 10 "headers": { 11 "List-Unsubscribe": "<{{ unsubscribe_url }}>", 12 "List-Unsubscribe-Post": "List-Unsubscribe=One-Click" 13 }, 14 "unique_args": {"event_id": "evt_1"}, 15 "reference": "invites-2026-11-28", 16 "messages": [ 17 { 18 "to": "ada@example.com", 19 "name": "Ada", 20 "variables": {"guest_id": "g1", "rsvp_url": "https://example.com/r/g1", "unsubscribe_url": "https://example.com/u/g1"}, 21 "unique_args": {"invite_id": "inv_1"} 22 }, 23 { 24 "to": "grace@example.com", 25 "name": "Grace", 26 "variables": {"guest_id": "g2", "rsvp_url": "https://example.com/r/g2", "unsubscribe_url": "https://example.com/u/g2"}, 27 "unique_args": {"invite_id": "inv_2"} 28 } 29 ] 30 }' \ 31 https://app.postshiba.com/api/v1/emails/bulk

An accepted bulk returns 202 Accepted, with each recipient's Message-ID in request order.

response.json
1{ 2 "id": "bLkSnD", 3 "reference": "invites-2026-11-28", 4 "status": "accepted", 5 "cluster_id": "NmQpXr", 6 "total_messages": 2, 7 "released_count": 0, 8 "failed_count": 0, 9 "submitted_at": "2026-11-28T09:00:00Z", 10 "completed_at": null, 11 "messages": [ 12 {"to": "ada@example.com", "message_id": "6f1c2a9e-0d4b-4c55-9a43-2b7f1e8d3c10@mail.example.com"}, 13 {"to": "grace@example.com", "message_id": "0b8e3f71-5c2d-4a96-8e1f-7d4c9a2b6e53@mail.example.com"} 14 ] 15}

Each message's unique_args are merged over the shared ones and come back on every webhook for that recipient. Each message's headers are merged over the shared ones and are not Liquid.

What is checked, and when

The whole request is checked before anything is stored. If one field is wrong, you get a 422 that names it, such as messages[3].to or subject, and nothing is sent. The sender checks are the same as on POST /emails and return 403. Fix the request and send it again.

Once a bulk is accepted, every message in it is queued. Some can still fail one at a time. Those count in failed_count, and each recipient gets a dropped webhook event with their unique args:

Reason When
suppressed The address is on your suppression list.
firewall Your email firewall blocked the address.
render_failed The recipient's variables did not render, for example they are over 64 KB.
expired The message was still waiting for capacity 24 hours after the request.

Sending at your cap

A bulk is sent at your cluster's capacity. When the cluster reaches its hourly or 24-hour cap, the rest of the bulk waits and goes out when capacity opens. It does not fail. A bulk larger than the cluster's 24-hour cap is refused with 422 too_many_recipients. See What happens at your cap.

The request counts once against the REST limit of 300 requests a minute per API key. Each message counts once against the cluster cap.

Check progress

GET /api/v1/emails/bulk/{id} returns the same object without messages. status moves from accepted to processing to completed. released_count is how many messages were handed to the cluster. Once the bulk is completed, released_count and failed_count add up to total_messages. Delivery, bounces, and opens for each recipient come on webhooks.

GET /api/v1/emails/bulk lists your last 100 bulks, newest first. Add ?reference=invites-2026-11-28 to find one by your own label.

Retrying safely

Bulk sends do not take an Idempotency-Key. A bulk is queued, not sent while you wait, so the request returns quickly. If a request still times out, list your bulks with its reference before you send it again. If it is there, it was accepted.

Limits

Limit Value
Messages per request 1,000
Recipients per message 1, with no display name in to. Use name for that.
variables per message 64 KB as JSON
Each Liquid field 512 KB
Request body 36 MB
Attachments and template Not supported. Use POST /emails for those.

Message content and the recipient list are deleted 7 days after a bulk completes. The bulk and its counts stay.

Next steps