{
"type": "message.routing",
"route_id": "abe11757-2886-4b55-96f1-0e0afc95795a",
"timestamp": "2024-05-06T13:15:46.404433272Z",
"data": {
"id": "019a0c3f-1d2e-7f3a-8b4c-5d6e7f8a9b0c",
"from": "customer@gmail.com",
"reply_to": "customer@gmail.com",
"to": "support@yourdomain.com",
"subject": "Help with my account",
"message_id": "<unique-message-id@gmail.com>",
"size": 2048,
"spam_score": 0.1,
"bounce": false,
"cc": "",
"date": "Mon, 06 May 2024 13:15:46 +0000",
"in_reply_to": "",
"references": "",
"auto_submitted": "",
"html_body": "<p>I need help with my account settings.</p>",
"plain_body": "I need help with my account settings.",
"reply_from_plain_body": "I need help with my account settings.",
"attachments": [
{
"filename": "logo.png",
"content_type": "image/png",
"content_id": "logo-123",
"disposition": "inline",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB..."
}
],
"headers": {
"X-Mailer": "Gmail",
"X-Priority": "3"
}
}
}Message Routing
message.routing Inbound Email Webhook Event
Reference for the AhaSend message.routing event: the JSON payload with sender, subject, HTML and text bodies, attachments and headers for inbound email.
WEBHOOK
message.routing
{
"type": "message.routing",
"route_id": "abe11757-2886-4b55-96f1-0e0afc95795a",
"timestamp": "2024-05-06T13:15:46.404433272Z",
"data": {
"id": "019a0c3f-1d2e-7f3a-8b4c-5d6e7f8a9b0c",
"from": "customer@gmail.com",
"reply_to": "customer@gmail.com",
"to": "support@yourdomain.com",
"subject": "Help with my account",
"message_id": "<unique-message-id@gmail.com>",
"size": 2048,
"spam_score": 0.1,
"bounce": false,
"cc": "",
"date": "Mon, 06 May 2024 13:15:46 +0000",
"in_reply_to": "",
"references": "",
"auto_submitted": "",
"html_body": "<p>I need help with my account settings.</p>",
"plain_body": "I need help with my account settings.",
"reply_from_plain_body": "I need help with my account settings.",
"attachments": [
{
"filename": "logo.png",
"content_type": "image/png",
"content_id": "logo-123",
"disposition": "inline",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB..."
}
],
"headers": {
"X-Mailer": "Gmail",
"X-Priority": "3"
}
}
}AhaSend sends this event when an inbound email is received and processed through a configured route.
Purpose: This webhook delivers complete inbound email data to your application for processing inbound emails (like support tickets, replies, etc.).
Difference from message events:
- Route events: Process inbound emails sent TO your domains
- Message events: Track outbound emails sent FROM your domains
- Configure routes in your AhaSend dashboard
- Choose whether to include attachments and headers
- Set recipient filters and processing options
attachments includes conventional attachments,
inline MIME parts (such as images referenced by cid: URLs in html_body), and
filename-bearing MIME parts that omit the Content-Disposition header.
Use cases:
- Support ticket systems
- Email-to-ticket conversion
- Automated email processing
- Reply handling
Related Guides
- API authentication, Permission scopes, Inbound routing setup.
- Route CLI, Local route testing, Signature verification.
- Retry policy, API errors, API rate limits.
Body
application/json
The route ID (the same ID as returned by the Create Route API)
Response
Webhook received successfully

