Skip to content

Replies land in your app.

Email for product teams. Receive on a domain you own. Samva parses each reply, threads it into a conversation, and posts it to your webhook. Fetch the thread by id from your app or a coding agent.

From their inbox to your app

A customer replies.
Your app gets the context.

The sender, the reply, and the conversation it belongs to. See the email beside the fields your app receives.

Incoming emailPreview

Maya

maya@example.com

To: support@reply.acme.com

Re: Your order A-1042

Could you update the delivery address?

I've attached the details.

Thanks,
Maya

delivery-address.pdf

PDF · 18 KB

A reply to order A-1042, kept with the conversation that started it.

POST /webhooks/samva

Example event · excerpt

{
  "type": "message.received",
  "data": {
    "messageId": "msg_7q2xk9mvt4znw8rh",
    "channel": "email",
    "direction": "inbound",
    "from": "maya@example.com",
    "to": "support@reply.acme.com",
    "subject": "Re: Your order A-1042",
    "conversationId": "conv_8r3ym2nkv5xpq9tw",
    "hasAttachments": true,
    "isAutoReply": false,
    "body": "Could you update the delivery address? I've attached the details. Thanks, Maya"
  }
}

Verify the webhook signature before using these fields. The body contains HTML when available, otherwise text.

  1. 01

    Receive the reply

    Enable receiving on your domain and route incoming email to your registered webhook.

  2. 02

    Verify the event

    Check the signature, then use messageId and conversationId to connect the reply to your app.

  3. 03

    Read the details

    Fetch the email for attachment metadata and content links, or the conversation for its history.

Receive, parse, and reply.

  1. 1. Receive on your domain

    Enable receiving for your verified domain and publish the inbound records Samva provides. Check existing mailbox routing before changing MX records; use a dedicated subdomain to keep your current inbox separate.

    Enable inbound email
  2. 2. Parse the event in your app

    Subscribe to message.received and verify the webhook signature before processing it. Fetch the message and its conversation to read the full reply. Use the webhook-id request header to process each event once, even when delivery is retried.

    Verify incoming webhooks
  3. 3. Reply in the same thread

    Fetch the conversation before responding. Send your response with email.inReplyToMessageId set to the Samva message id you are answering. Your app decides when and what to send.

    Send a reply through the API

Ready to build it? Follow the inbound parsing guide for the receive, verify, thread, and reply flow, then run the runnable cookbook.

#01PARSING

Replies arrive already parsed.

  • Your endpoint receives parsed fields instead of raw mail
  • You can tell a reply carried a file without opening the payload
  • An isAutoReply flag identifies detected automated responses, including out-of-office replies
ALL ABOUT PARSING
message.received · fieldswebhook
hasAttachmentstrue
isAutoReplyfalse

Inbound mail arrives already parsed, so your handler works with fields, not raw mail.

#02THREADING

The whole thread, in one conversation.

  • Replies arrive attached to a conversation, matched by references, subject, and participants
  • Threading is part of the data model, so related mail stays in one conversation
  • Fetch the full history behind any message with the conversation's id
ALL ABOUT THREADING
conv_01hx3f3 messages
contactada@example.com
lastMessageIdmsg_01hx9r4k

One conversation keeps every message, sent and received, in a thread you can fetch by id.

#03ROUTING

Know the event came from Samva.

  • A signed webhook fires when an inbound message matches a registered endpoint
  • Every event carries Standard Webhooks headers you verify against the raw body before you act on it
  • A non-2xx response gets retried by the delivery queue
ALL ABOUT ROUTING
message.received200 OK
POST/webhooks/samva
webhook-signature: v1,SGVsbG8...

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

( SEND, RECEIVE, LAND )

More from the email API.

Common questions.

How does inbound email work?

Point your domain's mail records at Samva once. From there, replies are parsed, threaded into conversations, and delivered to your app as signed webhooks.

How does a reply get threaded?

Samva threads a reply by its references, falling back to subject and participants, and starts a new conversation when nothing matches. Threading is part of the data model, so related mail stays in one conversation instead of a mailbox you reconcile yourself.

What does an inbound webhook contain?

The message id, sender, subject when present, conversation id, attachment and auto-reply flags, and the body when available. Fetch email details for attachment metadata and stored content links. Verify the webhook signature before processing the 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.

Free to start

Handle the first reply today.

Sign up and route replies into your app as signed events.

Related Resources