---
title: "Wait for a verification or login code"
method: GET
path: "/v1/addresses/{address}/code"
---

# Wait for a verification or login code

`GET /v1/addresses/{address}/code`

## Request

- Base URL: `https://api.proxymail.qa`
- URL: `https://api.proxymail.qa/v1/addresses/{address}/code`
- Auth: HTTP bearer

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.

## Path parameters

- `address` string, email, required

## Query parameters

- `timeout` integer
- `service` string
- `since` string, date-time
- `unused` boolean
- `type` 'otp' | 'coupon'

## Headers

- `Proxy-Mail-QA-Run` string, uuid
- `Proxy-Mail-QA-Test` string
- `Proxy-Mail-QA-Run-Retry` 'true'

## Response `200`

The code

- Match: A code or link and nothing else from the email.
  - `address` string
  - `type` 'code' | 'link'
  - `subtype` string: otp or coupon; verify, magic_signin, invite, reset or other.
  - `value` string: The code, or the link URL.
  - `service` string, nullable: Who sent it, e.g. Spotify.
  - `service_domain` string, nullable
  - `received_at` string, date-time
  - `expires_at` string, date-time, nullable: Only when the email says how long it lasts.
  - `email_id` string, uuid

## Other responses

- `404`: 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`.

---

[API](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api.md) · [All operations](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/proxymail/apis/proxy-mail-qa-api/revisions/8f8a5e84cf5c?raw)
