Skip to content

Receive a signed text-only Mailgun delivery

POST
/inbound-email
curl --request POST \
--url https://example.com/api/inbound-email \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data timestamp=example \
--data token=example \
--data signature=example \
--data from=example \
--data recipient=example \
--data subject=example \
--data stripped-text=example \
--data body-plain=example \
--data Message-Id=example

Verifies Mailgun’s timestamp/token HMAC, resolves the workspace alias and visible From membership, and durably claims the delivery. Attachment fields are ignored.

object
timestamp
required

Unix timestamp included in Mailgun’s HMAC input.

string
token
required

Per-delivery Mailgun signing token and durable idempotency key.

string
signature
required
string
/^[0-9a-fA-F]{64}$/
from
required

Visible From address used for the accepted MVP membership check.

string
recipient
required

Workspace alias recipient; only the normalized local part is routed.

string
subject
required
string
<= 998 characters
stripped-text

Preferred visible plain-text body.

string
body-plain

Plain-text fallback when stripped-text is empty.

string
Message-Id
string
key
additional properties
any

Delivery claimed or already acknowledged

Signature, routing, authorization, or content rejection

Transient or unknown post-signature failure; Mailgun should retry