POST/inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply

Reply to an email in a thread

Submits a reply to a message in an inbox thread directly from the inbox address, without storing a draft. Use html or text for the reply body; recipients are derived from the message, with reply_all controlling whether other recipients are copied. The reply is threaded under the original message.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

4 parameters · 8 body fields
inbox_idstringrequired
The UUID of the inbox containing the thread; an email address is not accepted.
thread_idstringrequired
The UUID of the thread containing the message to reply to.
email_idstringrequired
The UUID of the message to reply to, as returned by the list thread emails endpoint.
Idempotency-Keystringoptional
A unique key to prevent duplicate replies; retries with the same key within 24 hours return the first successful response. If supplied, the key must be 1 to 256 characters.

Reply content and optional recipients, attachments, and custom headers. At least one of html or text must contain more than whitespace.

ccstringoptional
CC recipient email address. For multiple addresses, send as an array of strings. Without `reply_all`, the reply copies only these addresses. With `reply_all`, these addresses are merged with the copied recipients, without duplicates. `cc` and `bcc` combined must be fewer than 50 addresses. After the `to` recipients are added, the reply cannot exceed 50 recipients. Each address is `email@example.com` or `Name <email@example.com>`. An address that is not valid returns a 422.
bccstringoptional
BCC recipient email address. For multiple addresses, send as an array of strings. BCC recipients of the original message are never copied. Each address is `email@example.com` or `Name <email@example.com>`. An address that is not valid returns a 422.
htmlstringoptional
The HTML body of the reply.
textstringoptional
The plain-text body of the reply.
subjectstringoptional
The subject of the reply. Cannot be only whitespace or contain a line break. When omitted, the thread subject is used, prefixed with `Re:` if it does not already start with it.
reply_allbooleanoptional
Reply to everyone on the original message. For a message the inbox received, the reply goes to its `Reply-To` addresses, or to its sender when it has none, and copies the other addresses of its `To` header and its `cc` recipients in `cc`. For a message the inbox sent, the reply goes to that message's `Reply-To` addresses when they are not the inbox address, otherwise to its `to` recipients, and copies its `cc` recipients. The inbox address is always excluded, and duplicates are removed.
Default:false
attachmentsarrayoptional
Files to attach, as on `POST /emails`. Each one needs `content` or `path`. Up to 10 files. The `content` of all files can total at most 25 MB. A `path` file counts toward the 10 files only, because it is fetched when the email is sent. An empty file, a blocked file type, a `path` that is not an `http` or `https` URL or that points to `localhost`, `127.0.0.1` or `0.0.0.0`, or a `content_type` that is not a valid MIME type returns a 422.
headersobjectoptional
Custom headers to add to the email. The `In-Reply-To`, `References` and `Reply-To` headers are set by Resend and cannot be set here. Sending one of them, in any letter case, returns a 422. Header names cannot be empty, and names and values cannot contain line breaks or null characters, or the request returns a 422. `null` means no custom headers.

1 status code
200Returns the sent email's ID, which you can use with the emails endpoints.
idstringrequired
The ID of the sent email. Use it with the emails endpoints.

Error handling

The inbox_id, thread_id, and email_id path parameters must be UUIDs identifying the message to reply to. The Idempotency-Key header, if supplied, must contain 1 to 256 characters. At least one of html or text must contain non-whitespace content; subject must be 1 to 2000 characters and cannot contain only whitespace or a line break.