Docs
API · inbound

Simulate an inbound email

Inject a fake inbound message that runs the real ingest pipeline — persisted to a thread and delivered to your webhooks — but is flagged test mode and excluded from metrics, quotas, and billing.

POST/v1/inbound/simulate

Use this to build and test receiving end to end before any MX record resolves. The message is synthesized, threaded, and pushed to your webhooks exactly like a real inbound email — the only difference is the row is marked test_mode so it never affects your numbers. The to address must belong to an inbox on a receiving-enabled domain.

01 Body

tostringRequired
The receive address the message is addressed to, for example support@acme.com. Must match an existing inbox.
fromobjectRequired
The sender as { email, name? }, for example { "email": "jordan@example.com", "name": "Jordan Lee" }.
subjectstringRequired
The subject line of the synthesized message.
htmlstringOptional
An HTML body. Provide html, text, or both.
textstringOptional
A plain-text body. Provide html, text, or both.
headersobjectOptional
Extra raw headers to stamp on the synthesized message, as a string map.

02 Request

curl https://api.drin.run/v1/inbound/simulate \
  -H "Authorization: Bearer $DRIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "support@acme.com",
    "from": { "email": "jordan@example.com", "name": "Jordan Lee" },
    "subject": "Where'"'"'s my order?",
    "text": "Hi — order #4821 still hasn'"'"'t shipped."
  }'

03 Response

200 OK — the ids of the synthesized message and its thread, plus the ids of any webhook deliveries the simulation fired. Fetch the conversation with retrieve thread.

JSON
{
  "messageId": "msg_01HZ9D8S3M",
  "threadId": "thr_01HZ9D8S3M",
  "webhookDeliveries": ["whd_01HZ9D9X5P"]
}
Never countedSimulated inbound is invisible to metrics, send quotas, and billing. It exists purely to let you wire up and verify your receiving and webhook handling.