Skip to content
( INBOUND EMAIL )

Inbound email, parsed and threaded.

Receive replies at an address on your own domain. Samva parses each message, threads it into a conversation, and delivers it to your app as a signed event.

( THE THREAD, END TO END )

Every reply lands next to the message it answers.

A reply carries the conversationId of the thread it belongs to. Samva groups every message you sent and every reply that comes back under one conversation, so a customer's answer never lands in a separate mailbox you have to reconcile.

conversation conv_01hx3f
-> outbound "Your order shipped"  msg_01hv8kq2
<- reply "Which day exactly?"  msg_01hx2p7d
-> outbound "Thursday, by noon."  msg_01hx9r4k
3 MESSAGESada@example.com
#01PARSING

Every reply arrives already parsed.

  • Each raw MIME message is parsed into its headers, body, and attachments before it reaches your endpoint
  • An hasAttachments flag tells you a reply carried a file, so you can branch without opening the payload
  • An isAutoReply flag separates automated bounces and out-of-office replies from a message someone typed
ALL ABOUT PARSING
message.received · fieldswebhook
hasAttachmentstrue
isAutoReplyfalse

Every inbound message arrives with its headers, body, and attachments already parsed out.

#02THREADING

One conversation, every message in order.

  • A conversationId ties an inbound reply to the thread it belongs to
  • Threading is part of the data model, not a thread_id convention you maintain yourself
  • Fetch the full history behind any message with the conversation's id
ALL ABOUT THREADING
conv_01hx3f3 messages
contactada@example.com
lastMessageIdmsg_01hx9r4k

A conversationId keeps every message, sent and received, in one thread you can fetch by id.

#03ROUTING

Received as a signed event you can trust.

  • message.received fires when an inbound message matches a registered endpoint
  • Every event carries an X-Webhook-Signature you verify against the raw body before you act on it
  • A non-2xx response gets retried by the delivery queue, so an inbound event is never dropped
ALL ABOUT ROUTING
message.received200 OK
POST/webhooks/samva
X-Webhook-Signature: sha256=9f2ab1c4...

Verify the signature against the raw body before you act on it. A non-2xx response gets retried by the delivery queue.

( KEEP READING )

The rest of the email channel.

Common questions.

How does inbound email work?

MX records on your sending domain route incoming mail to Samva. Each raw MIME message is parsed into its headers, body, and attachments, threaded into a conversation, and delivered to your app as a message.received webhook.

How does a reply get threaded?

An inbound message carries a conversationId that ties it to the thread it belongs to. Threading is part of the data model, so a reply lands next to the message it answers instead of a separate mailbox you have to reconcile.

What does an inbound webhook contain?

The message.received event carries the channel, direction, sender, recipient, subject, conversation id, and flags for whether the email had attachments or looked like an auto-reply. It is HMAC-signed like every Samva event.

Where does inbound email arrive?

At an address on a domain you have verified with Samva. Once the domain's records are published and verified, mail sent to it routes to Samva for parsing and delivery to your endpoint.

Get started

Handle the first reply today.

Sign up and route inbound email into your app as structured events.