Wait for a verification or login code
const url = 'https://api.proxymail.qa/v1/addresses/k7f2x9ab12cd%40mailclub.dev/code?timeout=30&unused=false&expect_site=staging.example.com&type=otp';const options = { method: 'GET', headers: { 'Proxy-Mail-QA-Test': 'sign-up%20%E2%80%BA%20sends%20one%20code', 'Proxy-Mail-QA-Run-Retry': 'true', 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/addresses/k7f2x9ab12cd%40mailclub.dev/code?timeout=30&unused=false&expect_site=staging.example.com&type=otp' \ --header 'Authorization: Bearer <token>' \ --header 'Proxy-Mail-QA-Run-Retry: true' \ --header 'Proxy-Mail-QA-Test: sign-up%20%E2%80%BA%20sends%20one%20code'Returns the newest code received since since, waiting up to timeout seconds for one to arrive. Coupons are left out unless asked for with type=coupon (or any, for either); a coupon comes with its discount and the date it is valid until, when the email states them. With since, after_seconds says how long after it the email arrived.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The test address, URL-encoded. A variant also works: capitals, or a +tag (k7f2x9ab12cd+o’brien@mailclub.dev). It acts on the plain address; waiting on a +tag variant, or listing its messages, only finds mail sent to that variant.
Example
k7f2x9ab12cd@mailclub.devQuery Parameters
Section titled “Query Parameters”Seconds to wait for a match. 0 checks once.
Only match email from this service, by name or domain (e.g. ‘spotify’).
Only match email received at or after this time: the time just before you asked the app to send it, so a code or link from an earlier email can’t come back. Default: the last 15 minutes.
True: only a code or link nobody has used yet. One counts as used once it’s returned by a wait, or opened, copied or filled in the app or Proxy Mail QA for Chrome.
The site the test started on, such as staging.example.com, localhost:3000 or myapp.bubbleapps.io/version-test, for link_site. Default: the site the address was created with.
Example
staging.example.comOtp for a sign-in or verification code, coupon for a coupon or promo code, any for either.
Header Parameters
Section titled “Header Parameters”A run’s id (POST /v1/runs): adds what this call saw to the run. If it can’t be added (the run finished, or isn’t in this project), the call still works and the Proxy-Mail-QA-Run-Warning response header says why.
With Proxy-Mail-QA-Run: the test this call belongs to, percent-encoded (encodeURIComponent), up to 200 characters once decoded. The run’s report shows it beside what the call saw.
Example
sign-up%20%E2%80%BA%20sends%20one%20codeTrue when you’ll call again if nothing arrives (waits longer than 30 seconds), so only the last call’s “nothing arrived” is added to the run.
Responses
Section titled “Responses”The code
A code or link and nothing else from the email.
object
Otp or coupon; verify, magic_signin, invite, reset or other.
The code, or the link URL.
Who sent it, e.g. Spotify.
Only when the email says how long it lasts.
With since: how many seconds after it the email arrived.
Set when this code or link was already used, and how to get a newer one.
Whether the verify, sign-in, invite or reset link goes back to the site the test started on (expect_site, or the address’s site), read from the link and the auth provider’s redirect without opening it. For a code, the email’s own links. Missing when there is no site or nothing to compare.
object
When it fails: a localhost link from a hosted site, another site, a preview or the published app instead of the other, plain http, or Bubble’s live app instead of version-test (bubble_live) or the other way (bubble_test).
What it was compared with, as host and Bubble version.
Where the link ends up, as host and Bubble version: never its path or query.
How long the email took after the form was sent (POST /v1/addresses/{address}/submits), by our clock. Missing when no submit came in the 15 minutes before it.
object
From the submit to the email reaching us.
The app and its email provider: from the submit to Cloudflare’s mail server, read from the Received header. Null when it couldn’t be read.
Proxy Mail QA: from Cloudflare’s mail server to the inbox.
Codes or links that one submit brought. 2 or more: the app sent twice.
Which of them this is.
A wait had already found nothing when it came.
The site’s and flow’s last 30 days in this project.
object
Submits that got no email.
Before today.
Today’s median is more than twice the usual and over 5 seconds longer.
Coupons only: the discount in our words, such as “20% off”, “$10 off” or “Free shipping”, when the email states one.
Coupons only: the date the email says it is valid until.
Example
{ "type": "code", "link_site": { "status": "pass", "problem": "local", "site": "staging.example.com", "goes_to": "localhost:3000", "detail": "After the auth step, the link sends people to localhost:3000, which only opens on the computer running that server, but the test started on staging.example.com." }, "time_to_email": { "flow": "sign_up", "site": "staging.example.com/sign-up", "source": "extension", "after_seconds": 4.2, "their_seconds": 3.7, "our_seconds": 0.5, "emails_for_submit": 1 }}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.
Nothing arrived in time, or the address isn’t in this project. hint says why as far as we can tell; after a wait, refused lists mail we turned away since since.
object
What we refused, or the likeliest cause, such as an email provider in sandbox mode.
After a wait, which case it is: nothing_arrived (nothing reached Proxy Mail QA since the wait began: the app didn’t send it, a sandbox held it or the app is over a sending cap), no_match (email arrived, so the app is sending, but none matched), turned_away (refused, or turned away by Cloudflare’s mail servers), already_used (with unused, only a used one matched) or arrived_before_since (an unused one arrived shortly before since: up to 2 minutes before it, or before now when since is ahead of our clock; since was probably set after the form was sent, or is ahead; hint says when).
Mail we refused for the address, newest first. Refusals for the same reason within an hour share one entry with a count.
object
The largest refused message, in bytes.
For blocked_site, the site the mail came from, such as Instagram.
When the last email came from a platform’s built-in sender rather than the app’s own email provider: which one, its cap and the fix. After a wait, only with why nothing_arrived.
object
Its sending cap in a sentence, or null when none is published.
Example
{ "error": "not_found", "why": "nothing_arrived", "refused": [ { "reason": "too_large" } ], "shared_sender": { "platform": "supabase", "name": "Firebase’s built-in email" }, "help": "https://proxymail.qa/troubleshooting"}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.