Receiving email
Mail sent to an address on one of your domains is kept, and your code can be told the moment it arrives.
How mail arrives
Once the DNS records of a domain are published, mail to any address on it is taken by the sending platform and handed to the API. The API keeps it as a received email of the workspace that has the domain.
A received email has the sender, the address it was sent to, the subject, the text and the HTML, whether it was judged to be spam, and a list of its files.
Read received mail
List what arrived, newest first, for every domain or for one.
curl "$OPENSEND_API_URL/v1/inbound?domain=mail.example.com" \ -H "Authorization: Bearer $OPENSEND_API_KEY"Then read one in full.
curl "$OPENSEND_API_URL/v1/inbound/in_01" \ -H "Authorization: Bearer $OPENSEND_API_KEY"{ "object": "inbound_email", "id": "in_01", "from": "grace@customer.example", "fromName": "Grace Hopper", "to": "support@mail.example.com", "subject": "A question about my invoice", "domain": "mail.example.com", "spam": false, "size": 48920, "attachments": 1, "createdAt": "2026-11-27T09:30:00.000Z", "text": "Hello, could you send the invoice for November again? Thanks, Grace", "html": "<p>Hello, could you send the invoice for November again?</p><p>Thanks, Grace</p>", "truncated": false, "messageId": "<b7f1c2d4@mail.customer.example>", "files": [ { "filename": "invoice-october.pdf", "mimeType": "application/pdf", "size": 41213 } ]}Both need the scope emails:read. The reference lists every field.
Be told when mail arrives
Add a webhook for the event email.received. Its data.id is the id of the received email, so one request reads the rest.
{ "id": "evt_14", "type": "email.received", "createdAt": "2026-11-27T09:30:00.000Z", "data": { "id": "in_02", "from": "grace@customer.example", "to": "support@mail.example.com", "subject": "A question about my invoice" }}