API referenceConversation Autopilot

Register a durable verification wait on an inbox

Opens a durable background wait that watches the inbox's inbound mail and resolves the awaited email for you, returning immediately with status: pending.

Endpoint
POST https://api.dairo.app/v1/inboxes/{inbox}/verification-waits

Opens a durable background wait that watches the inbox's inbound mail and resolves the awaited email for you, returning immediately with status: pending. An EU-resident AI matcher evaluates each incoming message against your natural-language instruction — for example wait for the GitHub sign-in code and return it — and, on a match, resolves the wait with the extracted value in result (a code, a link, or a quoted line); omit instruction and it defaults to matching any verification, OTP, or confirmation code. Set fromHint to the sender's address (matched exactly) or domain (which also matches its subdomains) — anything else is a 400 — so only that sender, authenticated by DMARC, can resolve the wait (a wait without a hint resolves from any sender except one that failed its domain's DMARC policy); and timeoutSec (30–1800 seconds, default 300) to size the window, where expiresAt is now + timeoutSec. The outcome later arrives as a verification.resolved (carrying result, from, and messageId) or verification.expired event on your webhook and the durable event ledger, or by polling the wait. Pass idempotencyKey to make retries safe — a repeat with the same key returns the original wait, scoped to this inbox, without opening a second one. An inbox allows at most 50 open waits at once; registering beyond that returns 429, and an unknown or non-owned {inbox} returns 404.

Scope: inboxes:write. Send the API key as a bearer token; Scopes lists what each one reaches.

Request

cURL
curl -X POST "https://api.dairo.app/v1/inboxes/support/verification-waits" \
  -H "Authorization: Bearer $DAIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "timeoutSec": 30
  }'

Path parameters

NameTypeRequiredDescription
inboxstringyesInbox UUID or full address (e.g. agent@dairo.app).

Body

Required, application/json: RegisterVerificationWaitRequest.

FieldTypeRequiredDescription
timeoutSecintegeryesHow long the wait stays open, 30..=1800 seconds. expiresAt = now + timeoutSec. (minimum 30, maximum 1800)
fromHintstring or nullnoOptional sender to accept, case-insensitive: a full address (matched exactly) or a domain (matches that domain and its subdomains, e.g. 'github.com' matches 'noreply@mail.github.com'). Never a substring match. Anything that is not an address or a domain is a 400. A hinted wait resolves only from an authenticated sender: an email whose From domain passed DMARC, or an A2A message from a Dairo inbox on a verified domain or a Dairo address. Null/absent accepts any sender except an email that failed its From domain's DMARC policy. (max length 255)
instructionstring or nullnoNatural-language instruction for the AI matcher: which email to wait for and what to extract (e.g. 'wait for the Telnyx password-reset email and return the reset link'). An EU-resident model evaluates each inbound email against it and, on a match, resolves the wait with the extracted value in result. Absent defaults to extracting any verification/OTP/confirmation code. (max length 2000)
idempotencyKeystring or nullnoOptional idempotency key; a retried register with the same key returns the same wait. (max length 255)

Response

200 Success. Body: application/json, VerificationWait.

FieldTypeRequiredDescription
waitIdstring (uuid)yes
inboxIdstring (uuid)yes
agentIdstring (uuid) or nullnoThe Agent Passport that registered this wait, when the API key was agent-bound.
status"pending", "resolved", "expired"yes
fromHintstring or nullno
instructionstring or nullnoThe natural-language matcher instruction this wait was registered with.
resultstring or nullnoThe value the AI matcher extracted per the instruction (present once resolved) — a code, a link, or a quoted line.
fromstring or nullnoThe From address of the message that resolved the wait.
messageIdstring (uuid) or nullnoThe inbound message that resolved the wait.
idempotencyKeystring or nullno
expiresAtstring (date-time)yes
createdAtstring (date-time)yes
resolvedAtstring (date-time) or nullno
expiredAtstring (date-time) or nullno
200
{
  "waitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "inboxId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "agentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending",
  "fromHint": null,
  "instruction": null,
  "result": null,
  "from": null,
  "messageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "idempotencyKey": null,
  "expiresAt": "2026-10-19T09:30:00Z",
  "createdAt": "2026-10-19T09:30:00Z",
  "resolvedAt": "2026-10-19T09:30:00Z",
  "expiredAt": "2026-10-19T09:30:00Z"
}

201 Created. Body: application/json, VerificationWait.

FieldTypeRequiredDescription
waitIdstring (uuid)yes
inboxIdstring (uuid)yes
agentIdstring (uuid) or nullnoThe Agent Passport that registered this wait, when the API key was agent-bound.
status"pending", "resolved", "expired"yes
fromHintstring or nullno
instructionstring or nullnoThe natural-language matcher instruction this wait was registered with.
resultstring or nullnoThe value the AI matcher extracted per the instruction (present once resolved) — a code, a link, or a quoted line.
fromstring or nullnoThe From address of the message that resolved the wait.
messageIdstring (uuid) or nullnoThe inbound message that resolved the wait.
idempotencyKeystring or nullno
expiresAtstring (date-time)yes
createdAtstring (date-time)yes
resolvedAtstring (date-time) or nullno
expiredAtstring (date-time) or nullno
201
{
  "waitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "inboxId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "agentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending",
  "fromHint": null,
  "instruction": null,
  "result": null,
  "from": null,
  "messageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "idempotencyKey": null,
  "expiresAt": "2026-10-19T09:30:00Z",
  "createdAt": "2026-10-19T09:30:00Z",
  "resolvedAt": "2026-10-19T09:30:00Z",
  "expiredAt": "2026-10-19T09:30:00Z"
}

Errors

Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.

StatusMeaning
400The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch).
401The API key is missing or invalid.
403The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted).
404No such resource in this account (resource_not_found).
409The resource already exists or its state does not allow this (duplicate_resource or a condition-specific code).
422The request is well-formed but a field failed validation (validation_failed).
429Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached).
500An unexpected error; retry with backoff, then contact support (internal_error).

On this page