Reply to an email over the API in the same thread

Updated on

To reply to a received email, use its id (from the message.received webhook). Smapiz sets In-Reply-To and References and adds “Re:” to the subject: the reply shows up in the same conversation for the recipient.

curl https://smapiz.com/v1/messages/msg_.../reply \
  -H "Authorization: Bearer smz_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "text": "Thanks, received." }'
  • The reply is sent from the mailbox that received the email.
  • The recipient is the original sender (or their Reply-To if present). You can override it with to.
  • "reply_all": true also replies to the other recipients.
  • Every field of a regular send is accepted: html, attachments, template_id, Idempotency-Key…

Find a conversation

Emails in the same exchange share the same thread_id. To list the whole conversation: GET /v1/messages?thread_id=…. The thread_id is the ID of the first message in the conversation.

From the dashboard, open a message in Messages and click Reply.

Next guideEmail templates with variables