Receiving through the API reads a user's mailbox, with one of their personal keys. An application key has no mailbox (401 restricted_api_key).
Enabling receiving on a key
In the mail app: Developers › Receiving, choose the key and enable receiving (and, if you want, spam and the webhook). This gives the key the mail.read scope.
Reading
Node / Bun
const { data: list } = await voaaro.emails.receiving.list({ limit: 10 })
const { data: email } = await voaaro.emails.receiving.get(list.data[0].id)
console.log(email.from, email.subject, email.text)Python
page = voaaro.Emails.Receiving.list({"limit": 10})
email = voaaro.Emails.Receiving.get(page["data"][0]["id"])PHP
$list = $voaaro->emails->receiving->list(['limit' => 10]);
$email = $voaaro->emails->receiving->get($list->data[0]->id);Go
list, _ := client.Emails.Receiving.List(&voaaro.ListReceivedOptions{ListOptions: voaaro.ListOptions{Limit: 10}})
email, _ := client.Emails.Receiving.Get(list.Data[0].Id)cURL
curl "https://mail.example.com/api/v1/emails/receiving?limit=10" \
-H "Authorization: Bearer $VOAARO_PERSONAL_KEY"GET /api/v1/emails/receiving: from newest to oldest, without spam or trash (include_spam=true,include_trash=trueto include them), and without drafts and sent messages. Fields:id,from,from_name,to,cc,reply_to,subject,created_at(arrival),sent_at,message_id,size,spam,trash,attachments.GET /api/v1/emails/receiving/{id}: the same, plushtml,textandheaders.GET …/{id}/attachmentsandGET …/{id}/attachments/{attachment}: each attachment with a signeddownload_url, valid for one hour, to download without a key.
The IDs of received messages are the mailbox's own (short strings), not UUIDs.
Being notified of each arrival
The email.received webhook is sent for each new message in the mailbox (within seconds of its arrival), with a summary: sender, recipients, subject, size, attachments without their content. Then read the full message with GET /api/v1/emails/receiving/{email_id}. See Events.