Skip to content

GET · Bearer

GET /api/v1/inboxes/:id/wait

Summary

Hold until unread mail is stored, then return it. If unread mail is already there, the response is immediate. Query wait is an integer from 0 to 55 and defaults to 25. The default stays 25. COOPER_INBOX_WAIT_MAX_SECONDS can lower the maximum (an integer from 1 to 55) and cannot raise it. Optional alias is a plus tag, or none for mail with no tag. A bad alias is HTTP 400 invalid_alias. Optional since is an ISO-8601 timestamp or a wcur1 cursor. Unread mail at or before that point does not complete the wait. Omit since and already-stored unread mail still returns immediately. A bad since is HTTP 400 invalid_since. The response is object inbox_wait with inbox_id, timed_out, and data. The server checks immediately, then backs off from about 1 second to about 5 seconds while nothing matches, and stops at 55 seconds so the route can finish inside its 60 second limit. A key can hold at most 5 waits at once across instances; the next returns HTTP 429 rate_limited. MCP: cooper_list_messages wait_seconds and since. GET /api/v1/events?wait= still caps at 25 seconds.

Request

This call has no JSON body.

Response

HTTP 200. Sample values illustrate the schema.

{
  "object": "inbox_wait",
  "inbox_id": "inb_example",
  "timed_out": false,
  "data": "string"
}

Errors

  • HTTP 400 invalid_alias
  • HTTP 400 invalid_since
  • HTTP 429 rate_limited

Idempotency

This route does not document Idempotency-Key or client_id.