Reference
Received email API
List received email, read one with its text, HTML, attachments and forwarding outcome, or download it as it arrived.
Every request needs Authorization: Bearer with an API key. Errors use the shapes and codes in Errors and retry decisions. The OpenAPI document has the full schemas.
List inbound emails
GET /v1/inbound-emails (listInboundEmails)
Lists email received at your receiving addresses, newest first. Needs the inbound:read scope. Received email is kept for 30 days. forward says whether an email was forwarded, and why not.
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
cursor | string | No | |
limit | integer | No | From 1 to 100. Default 25. |
domainId | string | No |
curl --request GET "https://ternwire.com/v1/inbound-emails" \
--header "Authorization: Bearer $TERNWIRE_API_KEY"Get inbound email
GET /v1/inbound-emails/{inboundEmailId} (getInboundEmail)
One received email with its text, HTML and attachment list. The HTML is the sender's and is not sanitized. Needs the inbound:read scope.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
inboundEmailId | string | Yes |
curl --request GET "https://ternwire.com/v1/inbound-emails/{inboundEmailId}" \
--header "Authorization: Bearer $TERNWIRE_API_KEY"Get inbound email raw
GET /v1/inbound-emails/{inboundEmailId}/raw (getInboundEmailRaw)
The received message exactly as it arrived, as message/rfc822, including attachments. Returns 410 inbound_email_content_unavailable after retention removed it. Needs the inbound:read scope.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
inboundEmailId | string | Yes |
curl --request GET "https://ternwire.com/v1/inbound-emails/{inboundEmailId}/raw" \
--header "Authorization: Bearer $TERNWIRE_API_KEY"