> ## Documentation Index
> Fetch the complete documentation index at: https://ahasend.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> AhaSend stores all message data in the EU. See /facts.
> The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication.
> Use send.ahasend.com for SMTP. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp.
> For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes.

# Inbound Email Routing API Overview

> Receive inbound email as JSON webhooks with AhaSend message routes. Match addresses or wildcards, parse replies and attachments, and POST them to your app.

The AhaSend Routes API lets you create, list, update and delete inbound email routes; this page links the endpoints and the received-message payload. Follow the [routing guide](https://ahasend.com/docs/integrations/routing.md) for MX setup, matching rules and dashboard configuration.

Available on Free, Pro and Max. See [plans and features](https://ahasend.com/docs/facts.md#plans-and-features).

## API Operations

| Task | Endpoint reference |
| - | - |
| Create a route | [Create Route](https://ahasend.com/docs/api-reference/routes/create-route.md) |
| List routes | [List Routes](https://ahasend.com/docs/api-reference/routes/get-routes.md) |
| Read one route | [Get Route](https://ahasend.com/docs/api-reference/routes/get-route.md) |
| Change settings or re-enable a route | [Update Route](https://ahasend.com/docs/api-reference/routes/update-route.md) |
| Remove a route | [Delete Route](https://ahasend.com/docs/api-reference/routes/delete-route.md) |

## Payload Structure

All routing events use a consistent JSON structure:

```json theme={null}
{
  "type": "message.routing",
  "route_id": "11111111-1111-4111-8111-111111111111",
  "timestamp": "<RFC3339 delivery timestamp>",
  "data": {
    "from": "sender@example.com",
    "to": "support@yourdomain.com",
    "subject": "Email subject",
    "html_body": "<p>Email content</p>",
    "plain_body": "Email content"
  }
}
```

This is a shortened payload. See [the full routing schema](https://ahasend.com/docs/api-reference/routes/route-message.md) for attachments, headers and reply fields.

## Delivery and Verification

The [signature reference](https://ahasend.com/docs/api-reference/webhooks/security.md) covers route secrets and raw-body verification. The [retry policy](https://ahasend.com/docs/api-reference/webhooks/retry-policy.md) covers timeouts, duplicate deliveries and automatic disabling.

## Related Guides

* [API authentication](https://ahasend.com/docs/api-reference/authentication.md), [Permission scopes](https://ahasend.com/docs/api-reference/scopes.md), [Inbound routing setup](https://ahasend.com/docs/integrations/routing.md).
* [Route payload](https://ahasend.com/docs/api-reference/routes/route-message.md), [Route CLI](https://ahasend.com/docs/cli/commands/routes.md), [Local route testing](https://ahasend.com/docs/cli/route-testing.md).
* [Signature verification](https://ahasend.com/docs/api-reference/webhooks/security.md), [Retry policy](https://ahasend.com/docs/api-reference/webhooks/retry-policy.md), [API errors](https://ahasend.com/docs/api-reference/errors.md).
* [API rate limits](https://ahasend.com/docs/api-reference/rate-limits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.