Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Received emails

Reply to a received email

POST/v1/emails/receiving/{id}/reply

Reply to a received email: recipients, subject, sender and threading headers default to the email's, so the answer lands in the sender's conversation.

Requires a full-access key. Live keys: the From domain must be verified for sending.

Our Message-ID of the reply names its thread, so the customer's answer joins the conversation even from a mail client that keeps only In-Reply-To.

Every other rule of POST /emails applies: suppressions, quotas, tracking, test keys.

Loop protection: replies to automated email need allow_automated, and one conversation takes at most 20 replies an hour.

Path parameters

idstring (UUID)required
Received email id

Headers

Idempotency-Keystring
optional, 1-256 bytes (see Idempotency)

Body parameters

textstring
Plain-text body. Either text or html (or a template) is required.
htmlstring
HTML body.
fromstring
Default: the address that received the email (e.g. support@acme.com), which must be on a verified sending domain. Required when the email came to a managed *.in.zapsmtp.xyz address (those only receive): 422 missing_required_field.
tostring | string[]
Default: the email's Reply-To, else its From. Limits: 422 missing_required_field when the email has neither.
reply_allboolean
Also copy everyone on the email's To and Cc, except the receiving address, the sender you reply from and anyone already addressed. Default false.
allow_automatedboolean
Answer an automated email anyway (see automated on the received email). Without it a reply to a bounce, out-of-office, auto-reply or notification is refused with 422 automated_message: two auto-responders answering each other is a mail loop. Bulk mail can be answered without it. Default false.
auto_replyboolean
This answer is itself automatic (an acknowledgement, a ticket receipt): adds Auto-Submitted: auto-replied and X-Auto-Response-Suppress: All (RFC 3834), so other auto-responders do not answer it. Default false.
ccstring | string[]
Added to the Cc (reply_all adds the email's recipients after these).
bccstring | string[]
Bcc recipients.
reply_tostring | string[]
Default: the receiving address when you reply from another one, so the customer's answer comes back to the same inbox.
subjectstring
Default: Re: + the email's subject (kept as is when it already starts with Re:).
headersobject
Custom headers. In-Reply-To and References are set for you (RFC 5322 threading); a value you give wins.
attachments, tags, metadata, stream, tracking, template, scheduled_at
As in POST /emails.

Errors

validation_errorHTTP 400
invalid JSON / unknown field
invalid_idempotency_keyHTTP 400
Idempotency-Key must be 1 to 256 bytes
domain_not_verifiedHTTP 403
sender domain is not verified for this account
restricted_api_keyHTTP 403
not_foundHTTP 404
email not found
idempotency_key_reusedHTTP 409
idempotency_request_in_progressHTTP 409
missing_required_fieldHTTP 422
from (managed receiving address), to (no sender on the email), or the body
automated_messageHTTP 422
the email is a bounce, out-of-office, auto-reply or notification; pass allow_automated: true
rate_limit_exceededHTTP 429
thread_reply_limitHTTP 429
too many replies in this conversation in the last hour (a mail loop?); at most 20 per hour; Retry-After: 3600
inbound_not_configuredHTTP 503
POST/v1/emails/receiving/{id}/reply
curl -X POST 'https://zapsmtp.xyz/v1/emails/receiving/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/reply' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "Thanks, it ships today."
}'
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "id": "019a1f41-8b2c-7e3d-9f40-5a6b7c8d9e0f",
  "thread_id": "3f1c9a52-6b0e-5d4f-8a71-2c9e0b4d6f13"
}