---
title: "Wait for a message"
method: GET
path: "/v1/inboxes/{inbox_id}/messages/wait"
tags: ["Messages"]
---

# Wait for a message

`GET /v1/inboxes/{inbox_id}/messages/wait`

## Request

- Base URL: `https://api.send0.dev`
- URL: `https://api.send0.dev/v1/inboxes/{inbox_id}/messages/wait`
- Auth: HTTP bearer

Long-poll. Returns the first message matching the filters received at or after `since` (default: one minute before the call), waiting up to `timeout` seconds. Codes and links are already extracted.

## Path parameters

- `inbox_id` string, required

## Query parameters

- `timeout` integer
- `since` string, date-time
- `from` string
- `subject` string
- `direction` 'in' | 'out'

## Response `200`

WaitResult

- WaitResult
  - `object` 'wait_result', required
  - `timed_out` boolean, required
  - `message` Message, required
    - `object` 'message', required
    - `id` string, required
    - `inbox_id` string, required
    - `thread_id` string, required
    - `direction` 'in' | 'out', required
    - `status` 'received' | 'queued' | 'sent' | 'delivered' | 'bounced' | 'complained' | 'failed', required
    - `expired` boolean, required: true once the inbox's retention period has passed: text, html, extracted_text, extracted and attachments are gone (null or empty) and the raw message can't be downloaded. Addresses, subject, status and timestamps remain until the message is deleted, 35 days after it was created.
    - `rfc_message_id` string, nullable, required
    - `in_reply_to` string[], required
    - `references` string[], required
    - `from` Mailbox, required
      - `name` string, nullable, required
      - `email` string, required
    - `to` Mailbox[], required
      - `name` string, nullable, required
      - `email` string, required
    - `cc` Mailbox[], required
      - `name` string, nullable, required
      - `email` string, required
    - `reply_to` Mailbox[], required
      - `name` string, nullable, required
      - `email` string, required
    - `subject` string, required
    - `text` string, nullable, required
    - `html` string, nullable: Only on single-message reads and threads with include_html=true
    - `extracted_text` string, nullable, required: New text only: quoted history, forwards and signatures removed
    - `extracted` object, nullable, required
      - `otp` string, nullable, required: Most likely one-time code
      - `links` string[], required
      - `action_link` string, nullable, required: Most likely verify / sign-in / reset link
    - `auth` object, nullable, required
      - `spf` string, required
      - `dkim` string, required
      - `dmarc` string, required
    - `safety` object, nullable, required
      - `prompt_injection` 'none' | 'suspected' | 'likely', required
      - `reasons` string[], required
    - `tag` string, nullable, required: Plus-address tag, e.g. task42 for bot+task42@
    - `attachments` Attachment[], required
      - `id` string, required
      - `filename` string, nullable, required
      - `content_type` string, required
      - `size` integer, required
      - `inline` boolean, required
      - `content_id` string, nullable, required
    - `size` integer, required
    - `sent_at` string, date-time, nullable, required
    - `received_at` string, date-time, nullable, required
    - `created_at` string, date-time, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `403`: Not allowed (scope, policy or account state)
- `404`: Not found, or not visible to this key
- `429`: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached

---

[API](https://skmtc.dev/send0/apis/send0-api.md) · [All operations](https://skmtc.dev/send0/apis/send0-api/llms.txt) · [OpenAPI document](https://skmtc.dev/send0/apis/send0-api/revisions/5b9775525cef?raw)
