Skip to content
Support replies

Customer replies land back in your app.

Turn on receiving for your domain. When a customer answers an email your app sent, Samva parses the reply, attaches it to that email's conversation, and posts it to your webhook. Your app answers in the same thread.

( REPLY TO WEBHOOK )

A reply lands on the thread it answers.

When a customer answers an email your app sent, Samva posts a signed message.received event with the conversationId of the email it answers. Your app sends its answer with that id, and it lands in the same thread.

-> sent "Your order shipped"
<- received "Re: Your order shipped"

conversationId "conv_k9mvt4znw8rh7q2x"
# the reply joins the email it answers
POST /webhooks/samva
webhook-id: whevt_7q2xk9mvt4znw8rh

{ type: "message.received",
  data: { from: "ada@example.com",
    subject: "Re: Your order shipped",
    conversationId: "conv_k9mvt4znw8rh7q2x" } }
( REPLIES TODAY )

A reply shouldn't vanish into a noreply box.

Noreply dead ends

Customers answer your emails, and the reply is lost or bounces.

No context

Replies reach a shared inbox with no link to the user, order, or ticket they belong to.

Matching scripts

You parse headers to guess which record a reply belongs to, and it breaks on the first forwarded email.

( HOW IT WORKS )

Parsed, threaded, answered.

#01 — PARSE

Replies are parsed for you.

Replies to your domain are parsed into sender, subject, text, HTML, and attachments.

MX <yourdomain> -> samva

parsed {
  from: "ada@example.com",
  subject: "Re: Your order shipped",
  hasAttachments: false
}
#02 — THREAD

A reply joins the email it answers.

A reply to an email Samva sent joins that email's conversation. Mail from someone outside the thread, or answering an email Samva never sent, starts its own conversation.

reply to a Samva email
  -> joins that email's conversation

mail from outside the thread
  -> starts a new conversation

answer to an email Samva never sent
  -> starts a new conversation
#03 — ANSWER

Answer in the same thread.

Send your response with the conversationId or the inReplyToMessageId, and it lands in the same thread in the customer's inbox.

await samva.email.send({
  conversationId: "conv_k9mvt4znw8rh7q2x",
  to: "ada@example.com",
  subject: "Re: Your order shipped",
  html: "<p>Thursday, by noon.</p>",
});

# or pass inReplyToMessageId instead

Samva isn't a helpdesk. It hands your app the replies, and your app or your helpdesk decides what happens next.

( INBOUND, WEBHOOKS, SEND )

Wire up inbound from here.

An inbox for your agent

A mailbox your agent reads and replies from, with a key that reaches only it. Read more

Questions from developers.

How does threading work?

A reply to an email Samva sent joins that email's conversation, and the message.received event carries its conversationId. Mail from someone outside the thread, or answering an email Samva never sent, starts a new conversation.

Are attachments included?

Yes. The message.received event says whether the email had attachments in hasAttachments. Use the message id to list each attachment's filename, type, and size, and to get a time-limited download URL for the file.

How do I reply from my app?

Call messages.send with the conversationId from the event, or pass the id of the email you're answering as inReplyToMessageId. Without one of them, the send starts a new conversation.

Can I receive on more than one domain?

Yes. Turn on receiving for each domain. The message.received event names the address the email was sent to in its to field.

Inbound

Let the next reply land in your app.

Verify a domain, turn on receiving, and register your endpoint.

Related Resources