---
title: "Extract the most recent verification code or confirmation link from inbound mail"
method: GET
path: "/api/v1/inboxes/{inboxId}/verification-code"
tags: ["Messages"]
---

# Extract the most recent verification code or confirmation link from inbound mail

`GET /api/v1/inboxes/{inboxId}/verification-code`

## Request

- Base URL: `https://machineinbox.com`
- URL: `https://machineinbox.com/api/v1/inboxes/{inboxId}/verification-code`
- Auth: none required

Scans recent inbound messages, newest first, for one-time verification codes and confirmation links. Returns the newest match so an agent completing a signup flow does not have to parse mail bodies itself.

## Path parameters

- `inboxId` string, uuid, required

## Query parameters

- `sender` string

## Response `200`

The newest detected code and any confirmation links, or found=false when nothing matches yet.

- VerificationCodeResponse
  - `found` boolean, required
  - `code` string, nullable, required: The detected one-time code, or null when only links were found.
  - `links` string[], required: Confirmation or verification links found in the same message.
  - `messageId` string, uuid, nullable, required
  - `from` Address, required
    - `address` string, email, required
    - `name` string
  - `subject` string, nullable, required
  - `receivedAt` string, date-time, nullable, required

## Other responses

- `401`: A valid mailbox bearer token is required.
- `403`: The inbox is suspended.
- `404`: The inbox, message, attachment, or route was not found.
- `410`: The inbox has expired.
- `429`: A request or reply limit was reached.

---

[API](https://skmtc.dev/machineinbox/apis/machine-inbox-api.md) · [All operations](https://skmtc.dev/machineinbox/apis/machine-inbox-api/llms.txt) · [OpenAPI document](https://skmtc.dev/machineinbox/apis/machine-inbox-api/revisions/bcb3cf08ad6d?raw)
