---
search:
  tags:
    - Inboxes
    - GET
seo:
  description: >-
    BillionSend extension: the newest code or sign-in link in delivered…
    Reference for the GET /inboxes/{inbox_id}/codes/latest endpoint in the
    BillionSend API.
sidebar:
  label: Get latest code
  badge: GET
title: Get latest code
type: openapi-operation
---
BillionSend 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.

`GET /inboxes/{inbox_id}/codes/latest`

**Responses**

- `200` — The latest code, or a status saying why none
- `401` — Missing, malformed, unknown or revoked API key
- `404` — Not found
- `422` — Validation error
- `429` — Too many waits at once, or the rate limit (rate\_limit\_exceeded, with Retry-After)

Response example, 200:

```json
{
  "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"
}
```
