---
title: "Accept a signed SendGrid Inbound Parse delivery"
method: POST
path: "/webhooks/inbound-email"
tags: ["Webhooks"]
---

# Accept a signed SendGrid Inbound Parse delivery

`POST /webhooks/inbound-email`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/webhooks/inbound-email`
- Auth: none required

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.

## Headers

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

## Response `200`

Inbound attachments accepted for durable document intake

- InboundEmailIngestApiResponse
  - `success` true, required
  - `data` InboundEmailIngestResult, required
    - `accepted` true, required
    - `companyId` string, uuid, required
    - `created` integer, required
    - `duplicates` integer, required

## Other responses

- `400`: The signed multipart body, envelope, message headers, recipient, or attachment metadata is invalid
- `401`: The provider signature headers are missing, invalid, or stale
- `404`: The gated route or exact allowlisted company alias is not available
- `413`: The raw body, a field, an attachment, or the multipart field, file, or part count exceeds its configured limit
- `415`: The body is not raw multipart/form-data or uses a non-identity content encoding
- `422`: An attachment was rejected after malware scanning
- `503`: Inbound intake is temporarily at its bounded concurrency capacity

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
