Inbound Email
The inbound email webhook receives email replies from customers and associates them with existing tickets. When a customer replies to a ticket notification email, the email provider (SendGrid Inbound Parse, Mailgun Routes, etc.) forwards the message to this endpoint.
Endpoint
Section titled “Endpoint”POST /api/rpc/tickets/email/inbound
This is a public endpoint with no authentication. Configure your email provider to forward inbound emails to this URL.
Payload
Section titled “Payload”| Field | Required | Type | Description |
|---|---|---|---|
organizationId | Yes | UUID | Your organization’s ID |
from | Yes | string | Sender’s email address |
to | Yes | string | Recipient email address |
subject | No | string | Email subject line (defaults to empty) |
text | No | string | Plain text body (defaults to empty) |
html | No | string | HTML body |
messageId | No | string | RFC 2822 Message-ID header |
inReplyTo | No | string | RFC 2822 In-Reply-To header |
references | No | string | RFC 2822 References header (space-separated message IDs) |
attachments | No | array | File attachments |
Attachments
Section titled “Attachments”Each attachment object contains:
| Field | Type | Description |
|---|---|---|
filename | string | Original file name |
contentType | string | MIME type |
size | number | File size in bytes |
url | string | URL to download the attachment |
Response
Section titled “Response”{ "success": true, "ticketId": "uuid-or-null", "messageId": "uuid-or-null"}| Field | Type | Description |
|---|---|---|
success | boolean | Whether the email was processed |
ticketId | string or null | The ticket the message was added to |
messageId | string or null | The created message’s ID |
How matching works
Section titled “How matching works”The platform uses the inReplyTo and references headers to match an incoming email to an existing ticket. If no match is found, the behavior depends on your organization’s configuration — the email may create a new ticket or be discarded.
Related pages
Section titled “Related pages”- Email delivery status — track email delivery events
- Webhooks overview — how webhooks work