Skip to main content

Overview

When emails arrive at your configured addresses, Inbound sends a webhook to your endpoint with the complete email data.

Webhook Payload Structure

We have fully a complete typed webhook payload for you to use in your endpoints.

Webhook Security

Always verify webhook requests before processing them to prevent unauthorized access to your endpoints.

Verification Headers

Every webhook request includes security headers that you should verify:

Verifying Webhooks with the SDK

The SDK provides a simple helper function to verify webhook requests:

Complete Example with Verification

Here’s a complete example that combines webhook verification with payload processing:
The verifyWebhookFromHeaders function automatically fetches your endpoint configuration from the API and compares the verification token. For more details, see the Security guide.

Attachment Downloads

Attachments include a downloadUrl field that provides direct access to download the file using your API key for authentication.

Downloading Attachments

Each attachment in the webhook payload includes a downloadUrl that you can use to download the file:
The download URL follows the format: https://inbound.new/api/e2/attachments/{emailId}/{filename}Authentication via API key in the Authorization header is required to download attachments.