MillionSend Docs

Retrieve the latest verification code

GET
/inboxes/{inbox_id}/codes/latest

MillionSend extension: the newest code or sign-in link in delivered mail, never from held mail or senders that failed authentication; links are never fetched. max_age counts from delivery, so a code released from quarantine counts from its release; since skips mail received at or before it, so a second sign-in waits for its own code. wait > 0 long-polls until one arrives (status timeout when none did). Always 200; status none when there is nothing.

Path Parameters

inbox_id*string

The inbox ID

Formatuuid

Query Parameters

from?string

An exact sender address, or a domain covering itself and its subdomains

wait?string

Seconds to wait for a code to arrive, 0-50 (default 0)

max_age?string

How long ago the code may have reached the inbox, in seconds, 60-86400 (default 600); a released code counts from its release

since?string

Only mail received after this ISO 8601 instant, such as the received_at of a code already used

Formatdate-time

Response Body

The latest code, or a status saying why none

application/json
  1. response
object*"verification_code"
Value in"verification_code"
status*string
Value in"found""none""ambiguous""timeout"
kind*string
Value in"otp""link"null
code*string
url*string
link_domain_matches_sender*boolean
email_id*string
Formatuuid
from*string
received_at*string
sender_trust*string
Value in"owner""allowlisted""known_thread""external""unauthenticated""failed"null
Example Request
curl -X GET 'https://api.millionsend.com/inboxes/497f6eca-6276-4993-bfeb-53cbbbba6f08/codes/latest'
Example Response
{  "object": "verification_code",  "status": "found",  "kind": "otp",  "code": "string",  "url": "string",  "link_domain_matches_sender": true,  "email_id": "8e6bf5ae-e456-4654-87f8-33e2156caffc",  "from": "string",  "received_at": "string",  "sender_trust": "owner"}