Webhooks

Accept a signed SendGrid Inbound Parse delivery

Changed on

Provider-only document intake, mounted only when ONBOARDING_V3_INBOUND_EMAIL_ENABLED is true. This route has no bearer session. The provider signs the timestamp bytes followed by the exact raw multipart bytes; Median verifies that signature before parsing, resolving the single company alias recipient, scanning attachments, and writing documents. Provider retries are idempotent by immutable delivery identity.

post/webhooks/inbound-email

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    none required

Headers

X-Twilio-Email-Event-Webhook-Timestamp, string required

Ten-digit Unix timestamp included in the signed payload and checked for staleness.

X-Twilio-Email-Event-Webhook-Signature, string required

Base64-encoded ECDSA P-256 signature over the timestamp followed by the exact raw body.

Request body multipart/form-data

object required

Standard SendGrid Inbound Parse text fields plus dynamically named attachment file parts are accepted. envelope and headers are required, headers must contain exactly one Message-ID, and at least one binary file part such as attachment1 is required. Every text field is limited to 262144 bytes; body, attachment-size, attachment-count, field, and part ceilings are configured server-side.

envelope, string required

JSON string with a non-empty from string and a to string array containing exactly one Median inbound alias.

headers, string required

Raw message headers containing exactly one Message-ID header.

from, string

Provider-supplied display sender; routing authority comes from envelope.

to, string
subject, string
text, string
html, string
attachments, string

Provider-supplied attachment count; file parts remain authoritative.

attachment-info, string

Provider-supplied attachment metadata JSON.

attachment1, string binary

Representative attachment file part; additional valid file-part names are accepted.

Response

Inbound attachments accepted for durable document intake

InboundEmailIngestApiResponse required
success, true required
data, InboundEmailIngestResult required

Changes