← Back to docs
Inbound API
Inbound API
Manage incoming emails received via Postscale Receive.
How Inbound Works
- Configure MX records to point to Postscale
- Emails are received and parsed
- Parsed data is delivered to your webhook endpoint
- Emails are stored and accessible via the API
See Inbound Webhooks for webhook setup and payload format.
List Inbound Emails
GET /v1/inbound-emails
Retrieve a list of received inbound emails.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results (default: 50, max: 100) |
offset | integer | Number of results to skip |
q | string | Search sender, recipient, subject, and message ID |
from | string | Filter by sender address substring |
to | string | Filter by recipient address substring |
subject | string | Filter by subject substring |
status | string | Filter by received, processing, delivered, or failed |
domain_id | string | Filter by domain UUID |
alias_id | string | Filter by alias UUID |
envelope_sender | string | Filter by SMTP envelope sender substring |
has_attachments | boolean | Filter by attachment presence |
from_date | string | Received-at lower bound, as RFC 3339 or YYYY-MM-DD |
to_date | string | Received-at upper bound, as RFC 3339 or YYYY-MM-DD |
sort | string | Sort by received_at, processed_at, from, to, subject, or status |
direction | string | asc or desc |
Example Request
curl -X GET "https://api.postscale.io/v1/inbound-emails?limit=50&q=invoice&sort=received_at&direction=desc" \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"emails": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message_id": "<unique-id@example.com>",
"from_address": "customer@example.com",
"to_address": "support@yourapp.com",
"subject": "Help with my order",
"status": "delivered",
"alias_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"has_attachments": true,
"received_at": "2026-01-18T10:30:00Z",
"processed_at": "2026-01-18T10:30:01Z"
}
],
"total": 1,
"limit": 50,
"offset": 0
}
Get Inbound Email
GET /v1/inbound-emails/:id
Retrieve the full details of an inbound email including body content.
Example Request
curl -X GET https://api.postscale.io/v1/inbound-emails/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer ps_live_your_api_key"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message_id": "<unique-id@example.com>",
"from_address": "customer@example.com",
"to_address": "support@yourapp.com",
"subject": "Help with my order",
"text": "Hi, I need help with my order #12345.",
"html": "<p>Hi, I need help with my order #12345.</p>",
"headers": {},
"attachments": [],
"status": "delivered",
"has_attachments": false,
"received_at": "2026-01-18T10:30:00Z",
"processed_at": "2026-01-18T10:30:01Z"
}
Webhook delivery
Inbound emails are automatically delivered to configured webhook endpoints. Use the dashboard to set up routing rules and webhook URLs.