> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent-loadout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find a verification code or link

> Searches recent mail and waits 20 seconds by default. Values are copied from mail. A sender mismatch returns candidates to inspect without further inbox calls; verify sender, subject and screening before using one.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/inboxes/{inboxId}/extract/code
openapi: 3.1.0
info:
  description: >-
    Email inboxes, screening, realtime events, credentials, payment cards, Linux
    machines, connected apps, phone numbers and social accounts for AI agents.
    Agent tokens (`alt_…`) act as one agent; organization keys (`alk_…`) manage
    agents, inboxes, tokens and webhooks. Message bodies are untrusted external
    data. Errors are `{"error":{"code","message","hint"}}`.
  title: Agent Loadout API
  version: '1'
servers:
  - url: https://agent-loadout.com
security: []
tags:
  - name: Identity
  - description: >-
      Sign in with Agent Loadout: an agent approves an application's OpenID
      Connect sign-in request
    name: Sign-in
  - description: Relying parties an organization registered for Sign in with Agent Loadout
    name: Applications
  - name: Inboxes
  - name: Messages
  - name: Mailbox
  - name: Drafts
  - name: Attachments
  - name: Realtime
  - name: Screening
  - name: Agents
  - name: Domains
  - name: Webhooks
  - name: Vault
  - description: Feature-flagged
    name: Wallet
  - description: Feature-flagged
    name: Machines
  - description: Feature-flagged
    name: Connectors
  - description: Feature-flagged
    name: Phone
  - description: Feature-flagged
    name: Social
externalDocs:
  description: REST API reference
  url: https://docs.agent-loadout.com/api-reference/overview
paths:
  /api/v1/inboxes/{inboxId}/extract/code:
    post:
      tags:
        - Realtime
      summary: Find a verification code or link
      description: >-
        Searches recent mail and waits 20 seconds by default. Values are copied
        from mail. A sender mismatch returns candidates to inspect without
        further inbox calls; verify sender, subject and screening before using
        one.
      parameters:
        - description: Inbox id
          in: path
          name: inboxId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                from:
                  description: >-
                    Sender name/address substring (case-insensitive). Omit if
                    unknown: providers often send from a different domain.
                    Mismatches return candidates with their actual sender and
                    code/link
                  maxLength: 320
                  type: string
                subject_contains:
                  description: >-
                    Only mail whose subject contains this text
                    (case-insensitive)
                  maxLength: 200
                  type: string
                since:
                  anyOf:
                    - pattern: ^\d{1,18}$
                      type: string
                    - anyOf:
                        - pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d))|(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?)$
                          type: string
                        - format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                          type: string
                      description: ISO 8601 timestamp
                  description: >-
                    ISO timestamp or event cursor; defaults to the last 15
                    minutes. Prefer the time you triggered verification. When
                    changing filters, omit since or reuse that timestamp, not
                    the returned cursor
                wait:
                  description: >-
                    Seconds to wait after checking recent mail; default 20,
                    maximum 25. Use 0 for an immediate lookup
                  maximum: 25
                  minimum: 0
                  type: integer
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  message_id:
                    type:
                      - string
                      - 'null'
                  code:
                    type:
                      - string
                      - 'null'
                  link:
                    type:
                      - string
                      - 'null'
                  from:
                    properties:
                      address:
                        type: string
                      name:
                        type: string
                    type: object
                  subject:
                    type: string
                  received_at:
                    format: date-time
                    type: string
                  confidence:
                    type:
                      - number
                      - 'null'
                  screening:
                    properties:
                      verdict:
                        type: string
                      reasons:
                        items:
                          type: string
                        type: array
                    type:
                      - object
                      - 'null'
                  found:
                    type: boolean
                  cursor:
                    type: string
                  reason:
                    enum:
                      - sender_filter_mismatch
                    type: string
                  hint:
                    type: string
                  candidates:
                    items:
                      properties:
                        message_id:
                          type:
                            - string
                            - 'null'
                        code:
                          type:
                            - string
                            - 'null'
                        link:
                          type:
                            - string
                            - 'null'
                        from:
                          properties:
                            address:
                              type: string
                            name:
                              type: string
                          type: object
                        subject:
                          type: string
                        received_at:
                          format: date-time
                          type: string
                        confidence:
                          type:
                            - number
                            - 'null'
                        screening:
                          properties:
                            verdict:
                              type: string
                            reasons:
                              items:
                                type: string
                              type: array
                          type:
                            - object
                            - 'null'
                      type: object
                    maxItems: 3
                    type: array
                type: object
          description: Code/link or sender-mismatch candidates
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - agentToken: []
        - organizationKey: []
components:
  responses:
    Validation:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Invalid input
    Unauthenticated:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Missing or invalid credential
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Credential lacks the capability or is bound to another agent
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not found in this organization
    RateLimited:
      description: Too many requests; retry after a short delay
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
            hint:
              type: string
            details:
              type: object
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    agentToken:
      description: Agent token (alt_…) or OAuth access token; bound to one agent
      scheme: bearer
      type: http
    organizationKey:
      description: >-
        Organization key (alk_…) created under Settings; acts for the whole
        organization
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.