Skip to Content
Pouch
Emails

Resend a message

POST
/v1/emails/{id}/resend

Auth: Bearer key scoped to the message's domain.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Response Body

The queued copy. A Location header points at its url. Takes no body. Sends a new message with the original's recipients, from, subject, body, attachments, tags, headers and layout, and resent_from set to the original. Every rule of POST /v1/emails applies, Idempotency-Key included. The copy keeps the original's test mode.

application/json
  1. response
id?string

Opaque id, prefixed msg_.

url?string

Where this message can be read at.

status?string

Lifecycle status.

Value in"queued""sent""delivered""deferred""bounced""complained""failed"
from?string

Sender, as Name when a name was given.

to?array<string>

Recipient addresses.

cc?array<string>

Carbon-copy addresses.

bcc?array<string>

Blind carbon-copy addresses.

reply_to?array<string>

Reply-to addresses.

subject?string

Subject line.

tags?array<string>

Tags as sent.

headers?

Custom headers as accepted. Empty when the send had none.

layout?|

As the send asked for it: false, true for the domain's layout as configured, or the fields it overrode for this send.

key_id?|

The key that sent it, prefixed key_. Null for mail sent without a key, from the dashboard or by the service itself.

batch_id?|

The batch it was sent in, prefixed bat_. Null for a single send.

test_mode?boolean

Whether the sending key was test-mode.

sensitive?boolean

Whether the body is withheld from every read: the send set sensitive, or the message carried a credential.

warnings?array<>

Hints from the recipient's send history, as they stood when this message was accepted. Empty when there's nothing worth flagging. Never changes whether the message was accepted.

provider_message_id?|

The provider's own id for the message, once sent.

reason?|

The provider's reason for the current status, when there is one.

attempts?integer

Delivery attempts made so far.

next_attempt_at?|

When the service next tries to send it, as an ISO 8601 timestamp. Null unless status is queued. A time in the past means it's due now.

created_at?string

ISO 8601 timestamp.

sent_at?|

ISO 8601 timestamp, or null.

delivered_at?|

ISO 8601 timestamp, or null.

abandoned_at?|

When the service stopped waiting on a sent message the provider never reported back on. status stays sent. Null otherwise.

size?

Bytes as accepted. body_bytes is the UTF-8 size of the html and text parts before the domain's layout, attachment_bytes the decoded size of the attachments, 0 with none. Each is null on a message accepted before sizes were recorded.

resent_from?|

The message this one was resent from, prefixed msg_. Null for an original send.

Example Request
curl -X POST 'https://pouch.example.com/v1/emails/string/resend'
Example Response
{  "id": "string",  "url": "string",  "status": "queued",  "from": "string",  "to": [    "string"  ],  "cc": [    "string"  ],  "bcc": [    "string"  ],  "reply_to": [    "string"  ],  "subject": "string",  "tags": [    "string"  ],  "headers": {},  "layout": true,  "key_id": "string",  "batch_id": "string",  "test_mode": true,  "sensitive": true,  "warnings": [    {      "code": "previously_bounced",      "address": "string",      "message": "string",      "detail": {}    }  ],  "provider_message_id": "string",  "reason": "string",  "attempts": 0,  "next_attempt_at": "string",  "created_at": "string",  "sent_at": "string",  "delivered_at": "string",  "abandoned_at": "string",  "size": {    "body_bytes": 0,    "attachment_bytes": 0  },  "resent_from": "string"}