API endpoints
Received emails
List and read emails received on your domains.
Received emails are available under /inbound/emails. See Receiving emails to set up receiving.
List received emails
GET /inbound/emails
Returns received emails, newest first. Paginated.
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | 1 to 100. Default 50. |
after | string | No | Return emails older than this ID. |
before | string | No | Return emails newer than this ID. |
curl "https://api.usend.et/inbound/emails?limit=10" \
-H "Authorization: Bearer us_123456789"const { data, error } = await usend.received.list({ limit: 10 });emails = usend.received.list(limit=10){
"object": "list",
"data": [
{
"object": "inbound_email",
"id": "a39999a6-88e3-48b1-888b-beaabcde1b33",
"from": "Ann <[email protected]>",
"to": ["[email protected]"],
"subject": "Question about my order",
"created_at": "2026-10-11T08:30:12.402Z",
"attachment_count": 1
}
],
"has_more": false
}Retrieve a received email
GET /inbound/emails/{id}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The received email ID (path). |
curl https://api.usend.et/inbound/emails/a39999a6-88e3-48b1-888b-beaabcde1b33 \
-H "Authorization: Bearer us_123456789"const { data, error } = await usend.received.get('a39999a6-88e3-48b1-888b-beaabcde1b33');email = usend.received.get("a39999a6-88e3-48b1-888b-beaabcde1b33"){
"object": "inbound_email",
"id": "a39999a6-88e3-48b1-888b-beaabcde1b33",
"from": "Ann <[email protected]>",
"to": ["[email protected]"],
"subject": "Question about my order",
"created_at": "2026-10-11T08:30:12.402Z",
"attachment_count": 1,
"cc": [],
"reply_to": [],
"html": "<p>Hi, where is order #1042?</p>",
"text": "Hi, where is order #1042?",
"headers": { "Message-ID": "<[email protected]>", "Date": "Sun, 11 Oct 2026 08:30:10 +0000" },
"attachments": [
{ "id": "2a0c9ce0-3112-4728-976e-47ddcd16a318", "filename": "screenshot.png", "content_type": "image/png", "size": 182044 }
]
}headers maps each header name to its value (the topmost one when a header appears several times). Empty cc and reply_to may be omitted.
Retrieve the raw message
GET /inbound/emails/{id}/raw
Returns the original message as message/rfc822, downloaded as <id>.eml.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The received email ID (path). |
curl -o message.eml https://api.usend.et/inbound/emails/a39999a6-88e3-48b1-888b-beaabcde1b33/raw \
-H "Authorization: Bearer us_123456789"Download an attachment
GET /inbound/emails/{id}/attachments/{attachment_id}
Returns the attachment's content directly (not a JSON object), as a file download. Attachment IDs are listed in attachments of the received email and in the email.received webhook.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The received email ID (path). |
attachment_id | string | Yes | The attachment ID (path). |
curl -o screenshot.png \
https://api.usend.et/inbound/emails/a39999a6-88e3-48b1-888b-beaabcde1b33/attachments/2a0c9ce0-3112-4728-976e-47ddcd16a318 \
-H "Authorization: Bearer us_123456789"