Email webhook

How email for an agent's inbox reaches Veyra through AgentMail, how each delivery is verified with Svix signatures, and how replies thread.

Veyra Docs TeamUpdated 1 min readVersion 3 · History

An agent can have its own email address. Mail to that address arrives through the AgentMail provider, which delivers it to Veyra at:

HTTP
POST https://intelligence-api.veyra.so/api/chat-webhooks/agentmail/{publicId}

Verification

AgentMail signs each delivery with Svix. Veyra checks the svix-id, svix-timestamp and svix-signature headers against the inbox's signing secret, on the raw body, before it reads anything. A delivery without a valid signature is refused.

Responses

Status Meaning
204 Accepted.
403 The body was not delivered as raw bytes, or the signature check failed.
Other 4xx The inbox does not exist, is paused or was disconnected.

The provider retries failed deliveries; the svix-id keeps a retry from creating a second message.

What happens to an email

  • A new email starts a task for the inbox's agent.
  • A reply to a thread the agent is in continues that task.
  • Attachments are stored with the task after the usual file checks.

The agent's outgoing mail always belongs to a task. A reply is bound to the message it answers and cannot change its recipients or subject. A send that is queued has not yet been delivered; the delivery state shows when the provider accepted it.

Set it up

Connect email from Connectors as a chat channel. The setup registers the webhook with AgentMail for you.

See Email in the API reference.

EmailInboundWebhooks