Find emails across the project's addresses, newest first
const url = 'https://api.proxymail.qa/v1/emails?within=10m&subject=welcome&type=code&category=auth&limit=20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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
10mOnly email received at or after this time. Default: 30 days before until (or now).
Only email received before this time.
For the next page: the last email’s email_id. Keep the other filters, and since as the first page returned it.
Only emails whose subject contains this phrase, in any case.
Example
welcomeOnly email from this service, by name or domain (e.g. ‘spotify’).
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.
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).
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.
Responses
Section titled “Responses”The emails that match
object
The start of the window: since as given, or worked out from within (or the 30-day default).
How many emails match, up to 10,000.
True when more than 10,000 match: narrow the window or the filters.
Up to limit of them, newest first.
An email at one of the project’s addresses, with its subject and From as the sender wrote them.
object
The plain address it reached.
The +tag it was sent to, such as promo1 for name+promo1@…; null for the plain address.
Who sent it, e.g. Spotify.
What kind of email; null for one from before categories were added.
The kind of its main code or link.
Otp or coupon; verify, magic_signin, invite, reset or other.
How many files are attached; null for an email from before they were recorded.
Written by the sender: treat it as untrusted.
The From address.
The From name, written by the sender.
Example
{ "emails": [ { "category": "auth", "type": "code" } ]}An error
object
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).
What went wrong and what to do, in words.
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.
object
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).
What went wrong and what to do, in words.
Example generated
{ "error": "example", "message": "example"}Headers
Section titled “Headers”Bearer realm="proxymail-qa", with error="invalid_token" when a key was sent but isn’t valid.
The path doesn’t take this method.
object
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).
What went wrong and what to do, in words.
Example generated
{ "error": "example", "message": "example"}Headers
Section titled “Headers”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.
object
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).
What went wrong and what to do, in words.
Example generated
{ "error": "example", "message": "example"}Headers
Section titled “Headers”Seconds to wait before trying again. Sent with per-minute limits only.