List emails
GET /emails
Returns a paginated list of emails accepted for the authenticated team. Use limit, after, and before to move through history; each item includes sender, recipients, subject, timestamps, and the latest recorded delivery event.
Send a full access API key as a bearer token in the Authorization header. A sending access key is refused.
| Name | Type | Required | Details |
|---|---|---|---|
limit |
integer | No | 1 to 100. |
after |
string | No | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
before |
string | No | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
Status 200, a JSON object.
| Field | Type | Details |
|---|---|---|
object |
list |
|
has_more |
boolean | |
data |
array of object | |
data[].object |
email |
|
data[].id |
string | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
data[].message_id |
string or null | |
data[].to |
array of string | |
data[].from |
string | |
data[].created_at |
string | Matches ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\+00$. |
data[].subject |
string | |
data[].bcc |
array of string | |
data[].cc |
array of string | |
data[].reply_to |
array of string | |
data[].last_event |
string | One of bounced, canceled, clicked, complained, delivered, delivery_delayed, failed, opened, queued, scheduled, sent, suppressed. |
data[].scheduled_at |
string or null | Matches ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3}\+00$. |
data[].tags |
array of object | |
data[].tags[].name |
string | |
data[].tags[].value |
string |
Headers: x-request-id, ratelimit-limit, ratelimit-remaining, ratelimit-reset.
Each error answers with the status below and a JSON body naming the error. Every error has its own entry.
| Status | Names |
|---|---|
| 400 | validation_error |
| 401 | missing_api_key, validation_error, restricted_api_key |
| 403 | validation_error, restricted_api_key, suspended_api_key, terms_acceptance_required |
| 413 | validation_error |
| 415 | validation_error |
| 422 | validation_error |
| 429 | rate_limit_exceeded |
Error headers: x-request-id, ratelimit-limit, ratelimit-remaining, ratelimit-reset, retry-after.
curl -X GET 'https://api.hermesmail.app/emails' \
-H "Authorization: Bearer $HERMESMAIL_API_KEY"
import { Resend } from 'resend';
const resend = new Resend(process.env.HERMESMAIL_API_KEY, { baseUrl: 'https://api.hermesmail.app' });
const { data, error } = await resend.emails.list();
import os
import resend
resend.api_key = os.environ["HERMESMAIL_API_KEY"]
resend.api_url = "https://api.hermesmail.app"
result = resend.Emails.list()
<?php
// Set RESEND_BASE_URL="https://api.hermesmail.app" in the environment.
$resend = Resend::client(getenv("HERMESMAIL_API_KEY"));
$result = $resend->emails->list();
package main
import (
"net/url"
"os"
"github.com/resend/resend-go/v4"
)
func main() {
client := resend.NewClient(os.Getenv("HERMESMAIL_API_KEY"))
baseURL, _ := url.Parse("https://api.hermesmail.app/")
client.BaseURL = baseURL
_, err := client.Emails.List()
_ = err
}
# Set RESEND_BASE_URL="https://api.hermesmail.app/" before require "resend".
require "resend"
Resend.api_key = ENV.fetch("HERMESMAIL_API_KEY")
result = Resend::Emails.list