Skip to content
Documentation/API reference
API · testing

Wait for a new email

POST /api/v2/testing/inboxes/{id}/wait

Authorization

messages:read. Use a workspace-scoped bearer key or an authorized user session.

Parameters

All resource access is checked against the selected workspace and user permissions.

NameTypeContract
idpath · requiredResource UUID
senderstring · optionalExact email address, case insensitive
subjectstring · optionalSubject substring, case insensitive
timeout_secondsinteger · optional1–300; default 60

Request

Set INBOXIT_API_KEY in your server environment. The CLI can also use an authenticated user session.

Example
curl -X POST 'https://inboxit.wtf/api/v2/testing/inboxes/RESOURCE_UUID/wait' \
  -H "Authorization: Bearer $INBOXIT_API_KEY" \
  -H "Content-Type: application/json" --data @request.json

JSON body

Save this JSON as request.json for the request above. Replace example values with your own.

Example
{
  "subject": "Verify",
  "timeout_seconds": 60
}

CLI equivalent

Use INBOXIT_TOKEN for a scoped key, or inboxit login for a user session.

Example
inboxit testing wait --id RESOURCE_UUID --data @request.json

Response

HTTP 201. Example values are illustrative; excerpts are marked.

Example
{
  "id": "RUN_UUID",
  "status": "waiting",
  "after_id": "0",
  "uid_validity": "1234",
  "deadline": "2026-10-23T19:01:00Z"
}

Behavior & errors

Start BEFORE triggering your application. Existing messages are excluded using a mailbox UID boundary. API returns immediately; poll testing result. CLI waits and exits 2 on timeout. Inbox must be active (409 otherwise). Common errors: 400 invalid input, 401 unauthenticated, 403 insufficient permission, 404 missing/inaccessible resource, 409 conflict, 429 rate/usage limit, 503 service unavailable. See Errors & retries for recovery guidance.