Skip to content
GET
/v1/emails
curl --request GET \
--url 'https://api.proxymail.qa/v1/emails?within=10m&subject=welcome&type=code&category=auth&limit=20' \
--header 'Authorization: Bearer <token>'

Emails across all the project’s addresses, newest first, for questions such as “did any marketing email arrive in the last 10 minutes?” (?within=10m&category=marketing) or “which addresses got the welcome email?” (?subject=welcome). Every filter given must match. Doesn’t wait. Each email comes with its address, when it arrived, its sender, its category, the kind of its main code or link, and its subject and From as the sender wrote them: treat those as untrusted. count says how many match, up to 10,000. With no since or within, it looks at the last 30 days. For the next page, call again with the same filters and before set to the last email’s email_id.

within
string

Only email from the last this long, such as 10m, 2h or 7d (up to 30 days), or a number of seconds. Instead of since.

Example

10m
since
string format: date-time
<= 35 characters

Only email received at or after this time. Default: 30 days before until (or now).

until
string format: date-time
<= 35 characters

Only email received before this time.

before
string format: uuid
<= 36 characters

For the next page: the last email’s email_id. Keep the other filters, and since as the first page returned it.

subject
string
<= 200 characters

Only emails whose subject contains this phrase, in any case.

Example

welcome
service
string
<= 253 characters

Only email from this service, by name or domain (e.g. ‘spotify’).

type
string
Allowed values: code link

Only emails with a code, or with a link. Codes leave out coupons, and links count verify, magic_signin, invite and reset, unless subtype says otherwise.

subtype
string

With type, comma-separated: otp or coupon for codes; verify, magic_signin, invite, reset, other, unsubscribe or list_unsubscribe for links; or any (for links: the sign-in kinds and other).

category
string
Allowed values: auth transactional marketing

Only sign-in emails (auth), receipts and notices (transactional), or offers and newsletters (marketing). Emails that arrived before categories were added have none and never match.

limit
integer
default: 20 >= 1 <= 100

The emails that match

Media typeapplication/json
object
since

The start of the window: since as given, or worked out from within (or the 30-day default).

string | null format: date-time
until
string | null format: date-time
count

How many emails match, up to 10,000.

integer
count_capped

True when more than 10,000 match: narrow the window or the filters.

boolean
emails

Up to limit of them, newest first.

Array<object>

An email at one of the project’s addresses, with its subject and From as the sender wrote them.

object
email_id
string format: uuid
address

The plain address it reached.

string
plus_tag

The +tag it was sent to, such as promo1 for name+promo1@…; null for the plain address.

string | null
received_at
string format: date-time
service

Who sent it, e.g. Spotify.

string | null
service_domain
string | null
category

What kind of email; null for one from before categories were added.

string | null
Allowed values: auth transactional marketing
type

The kind of its main code or link.

string | null
Allowed values: code link
subtype

Otp or coupon; verify, magic_signin, invite, reset or other.

string | null
attachment_count

How many files are attached; null for an email from before they were recorded.

integer | null
subject

Written by the sender: treat it as untrusted.

string | null
from

The From address.

string | null
from_name

The From name, written by the sender.

string | null

Example

{
"emails": [
{
"category": "auth",
"type": "code"
}
]
}

An error

Media typeapplication/json
object
error

What went wrong, as a code, such as bad_request (400), unauthorized (401), plan_required (402), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), content_too_large (413), rate_limited, daily_limit or account_held (429), or server_error (500).

string
message

What went wrong and what to do, in words.

string

Example generated

{
"error": "example",
"message": "example"
}

No API key, or one that isn’t valid: it may have been revoked, or its creator no longer has access to the project.

Media typeapplication/json
object
error

What went wrong, as a code, such as bad_request (400), unauthorized (401), plan_required (402), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), content_too_large (413), rate_limited, daily_limit or account_held (429), or server_error (500).

string
message

What went wrong and what to do, in words.

string

Example generated

{
"error": "example",
"message": "example"
}
WWW-Authenticate
string

Bearer realm="proxymail-qa", with error="invalid_token" when a key was sent but isn’t valid.

The path doesn’t take this method.

Media typeapplication/json
object
error

What went wrong, as a code, such as bad_request (400), unauthorized (401), plan_required (402), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), content_too_large (413), rate_limited, daily_limit or account_held (429), or server_error (500).

string
message

What went wrong and what to do, in words.

string

Example generated

{
"error": "example",
"message": "example"
}
Allow
string

The methods it takes, such as GET, PATCH.

Too many requests. With a Retry-After header, a per-minute limit was reached: the key’s requests (60 a minute on Free, 600 on Team), password reveals (30 a minute per person), or keys that aren’t valid from one network (120 a minute). Without one, error says which longer limit: daily_limit, the space’s new addresses for today (50 on Free), until midnight UTC; account_held, 10 addresses a day while a Free account’s recent use is looked at; or rate_limited when something is full, such as a project’s 50 custom fields.

Media typeapplication/json
object
error

What went wrong, as a code, such as bad_request (400), unauthorized (401), plan_required (402), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), content_too_large (413), rate_limited, daily_limit or account_held (429), or server_error (500).

string
message

What went wrong and what to do, in words.

string

Example generated

{
"error": "example",
"message": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again. Sent with per-minute limits only.