This endpoint allows you to reply to emails received through Inbound, maintaining proper email threading with In-Reply-To and References headers.
Authentication
This endpoint requires authentication via:- API key auth: Bearer token in Authorization header
Path Parameters
The unique identifier of the email you want to reply to. This must be an email that was received through your Inbound account.
Request Body
This endpoint supports both snake_case (legacy) and camelCase (Resend-compatible) formats for certain fields like
reply_to
/replyTo
and include_original
/includeOriginal
.The sender email address. Must be in the format
"Name <email@domain.com>"
or just "email@domain.com"
. The domain must be verified in your account.Optional sender name for display. If provided, this will be used as the display name for the sender address.
The recipient email address(es). If not provided, the reply will be sent to the original sender. Can be a single email string or an array of email strings.
The email subject. If not provided, “Re: ” will be prepended to the original email’s subject.
Carbon copy recipient(s). Can be a single email string or an array of email strings.
Blind carbon copy recipient(s). Can be a single email string or an array of email strings.
Reply-to address(es). Can be a single email string or an array of email strings. Also accepts
replyTo
(camelCase) for Resend compatibility.The plain text version of the email body. Either
text
or html
must be provided.The HTML version of the email body. Either
text
or html
must be provided.Custom email headers as key-value pairs. These will be added to the email in addition to the standard headers.
Array of file attachments to include with the email.
Whether to include the original message as a quoted reply. When true, the original message will be appended to your reply with appropriate formatting. Also accepts
includeOriginal
(camelCase) for Resend compatibility.Array of tags for email categorization and tracking (Resend-compatible).
Whether to use simplified reply mode for faster processing. When
true
(default), uses a lightweight reply mode that’s faster and has less overhead. Set to false
to force full mode when you need advanced features or custom threading.Simple mode is automatically disabled when attachments are present.
Headers
Bearer token for API authentication.
Add an idempotency key to prevent duplicate replies.
- Should be unique per API request
- Idempotency keys expire after 24 hours
- Have a maximum length of 256 characters
Response
Unique identifier for the sent reply email in Inbound’s system
The Inbound message ID used for email threading (appears in Message-ID header)
AWS SES Message ID for tracking the email through AWS infrastructure. Only present when the email is successfully sent through AWS SES.
Email Threading
This endpoint automatically handles email threading by:- Setting the In-Reply-To header with the Message-ID of the original email
- Building the References header to maintain the full conversation thread
- Formatting the subject with “Re: ” prefix if not already present
- Quoting the original message (when
include_original
is true) with proper attribution
Email clients like Gmail, Outlook, and Apple Mail will recognize these threading headers and group the emails into a conversation.
Examples
Basic Reply
Reply to an email with minimal configuration:Advanced Reply with Custom Recipients
Reply with custom recipients, subject, HTML content, and tags:Reply Without Quoting Original
Send a reply without including the original message:Reply with Attachments
Include attachments in your reply:Error Responses
Error message describing what went wrong
Common Errors
Status Code | Error Message | Description |
---|---|---|
400 | ”Valid email ID is required” | The email ID parameter is missing or invalid |
400 | ”From address is required” | The from field is missing from the request |
400 | ”Either html or text content must be provided” | No email body content was provided |
400 | ”Cannot determine recipient email address” | No to field provided and cannot extract from original email |
400 | ”Invalid email format: “ | One of the email addresses is malformed |
400 | ”Invalid JSON in request body” | Request body contains malformed JSON |
401 | ”Unauthorized” | Invalid or missing API key |
403 | ”You don’t have permission to send from domain: “ | The sender domain is not verified in your account |
404 | ”Email not found” | The email ID does not exist or belongs to another user |
429 | ”Email sending limit reached. Please upgrade your plan to send more emails.” | You have exceeded your plan’s email sending limit |
500 | ”Email service not configured. Please contact support.” | AWS SES configuration issue |
500 | ”Failed to send reply. Please try again later.” | AWS SES or other service error occurred |
500 | ”Internal server error” | An unexpected error occurred |
Idempotency
This endpoint supports idempotency to prevent duplicate sends. Include anIdempotency-Key
header with a unique value:
Basic Idempotency Usage
Webhook Handler with Idempotency
Perfect for preventing duplicate auto-replies when webhooks are retried:Idempotency Key Best Practices
1
Make keys unique and descriptive
Include action type, email ID, and context:
reply-{emailId}-{userId}-v1
2
Use for webhook handlers
Prevent duplicate auto-replies when webhooks are retried due to failures
3
Include version suffixes
Add
-v1
, -v2
when you need to update email content for the same operation4
Consider time windows
For time-sensitive operations, include timestamp to allow periodic updates
Idempotency Behavior: If you make multiple requests with the same idempotency key, only the first request will send an email. Subsequent requests return the same response without sending a duplicate. Keys expire after 24 hours.
Best Practices
1
Verify sender domain
Always ensure the
from
domain is verified in your account before attempting to send replies.2
Include both text and HTML
For best compatibility, include both
text
and html
versions of your email content.3
Use idempotency keys
When sending replies programmatically, use idempotency keys to prevent accidental duplicate sends.
4
Handle quoted content carefully
Consider whether including the original message is appropriate for your use case. Automated responses might not need it.
5
Test threading
Test your replies with various email clients to ensure threading works as expected.
Rate Limits
Reply sending is subject to the same rate limits as the Send Email endpoint. Your plan determines how many emails you can send per month.Check your current usage and limits in your account dashboard.