GET · Bearer

GET /api/v1/inboxes/:id/wait-for-code

Summary

Hold until an inbound message with a one-time verification code is stored, then return the code and the message id. Query wait is an integer from 0 to 55 and defaults to 25. after is an ISO-8601 timestamp and defaults to 5 minutes before the call, so a code that arrived just before is still found. from and subject are optional case-insensitive substrings. A code is 4 to 8 digits, or 123-456, next to a word such as code, OTP, verification, passcode, or PIN. The response is object inbox_code with inbox_id, timed_out, code, candidates, message (id, thread_id, from, subject, created_at, channel), and after. The body is not returned and nothing is marked read. Held messages are skipped. Needs message_read. MCP: cooper_wait_for_code.

Request

This call has no JSON body.

Response

HTTP 200. Sample values illustrate the schema.

{
  "object": "inbox_code",
  "inbox_id": "inb_example",
  "timed_out": false,
  "code": "482913",
  "candidates": [
    "482913"
  ],
  "message": "string",
  "after": "string"
}

Errors

The summary and the OpenAPI operation do not name an error code.

Idempotency

This route does not document Idempotency-Key or client_id.