← Back to docs

Inbound API

Inbound API

Manage incoming emails received via Postscale Receive.

How Inbound Works

  1. Configure MX records to point to Postscale
  2. Emails are received and parsed
  3. Parsed data is delivered to your webhook endpoint
  4. 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

ParameterTypeDescription
limitintegerNumber of results (default: 50, max: 100)
offsetintegerNumber of results to skip
qstringSearch sender, recipient, subject, and message ID
fromstringFilter by sender address substring
tostringFilter by recipient address substring
subjectstringFilter by subject substring
statusstringFilter by received, processing, delivered, or failed
domain_idstringFilter by domain UUID
alias_idstringFilter by alias UUID
envelope_senderstringFilter by SMTP envelope sender substring
has_attachmentsbooleanFilter by attachment presence
from_datestringReceived-at lower bound, as RFC 3339 or YYYY-MM-DD
to_datestringReceived-at upper bound, as RFC 3339 or YYYY-MM-DD
sortstringSort by received_at, processed_at, from, to, subject, or status
directionstringasc 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.