Lifecycle and expiry
The states of a Request, the receipts of a Notification, and an expiry that happens only when you ask for one.
A Request is pending until something ends it. Then it is in one of four terminal states, for good. A Notification has no states: it is delivered, and then it is read.
The states of a Request
pending: waiting for the person.answered: the person chose an action. The Request carries their Response.expired: itsexpiresAtpassed with no answer.dismissed: the person declined it without answering, by deleting it from their Inbox.cancelled: your agent withdrew it, withDELETE /v1/requests/{id}or the SDK'srequest.cancel().
The four terminal states are kept apart because they tell your agent four different things: the person chose, time ran out, the person said no, you no longer need the answer. Only answered has a Response.
The first one to happen wins, atomically. If the person taps File it in the same instant your agent cancels, the Request ends one way, and the phone and your agent see the same one. A terminal Request never changes again.
Nothing is deleted when a Request ends. GET /v1/requests/{id} reads it in whatever state it reached, and each terminal state is also a webhook event: message.answered, message.expired, message.dismissed, message.cancelled.
An outcome is not an error
expired, dismissed and cancelled are outcomes, not failures. GET /v1/requests/{id}/response answers 200 in every state, and ask() resolves with them instead of throwing. Read status and decide what your agent does next.
No expiry by default
A Request without an expiresAt waits for ever, like an unread email. The app shows its age instead: waiting 3 days. Set expiresAt only when the answer stops being useful after a while.
research-agent is putting a report together. Three of its sources need a login, and it asks whether to include them, but it will not hold the report for more than an hour:
With curl, expiresAt is an absolute time in ISO 8601 with an offset, such as 2026-10-12T10:00:00Z, and it must be in the future: a time already past is refused with 422 invalid_request_body.
Nibify expires a Request within a minute of its expiresAt, and at once whenever something reads that Request: once the time has passed, a read never says pending. When nobody answered in time, the long poll returns:
The phone shows the card as expired, and an answer given after that is refused. To ask again, send a new Request.
Waiting is not expiring
Your code waiting for an answer and the Request waiting for the person run on two different clocks. The Wait window is your code's: ?wait=30 on GET /v1/requests/{id}/response, or timeout in the SDK. When it runs out, the Request is still pending. The long poll returns "status": "pending", ask() returns "status": "timeout", and you can wait again. Only expiresAt makes a Request expired. Wait for the answer shows how to wait, and how to be called back instead.
Changing a Request
A Request is never edited after it is sent. To change what you asked, withdraw it and send a new one, or send a new Message in its Thread.
To remind the person without changing anything, nudge it: POST /v1/requests/{id}/nudge, or request.nudge(), sends the push again for the same Request, in the same state.
Withdrawing and nudging both need a pending Request. On a terminal one they answer 409, with a code that names the state that won: request_already_answered, for example.
Delivered and read
Requests and Notifications both have two receipts. Delivered is when the first of the person's phones confirmed the push arrived; read is when the person first opened the Message. A Request carries them as deliveredAt and readAt. For a Notification they are the message.delivered and message.read webhook events, and they are its whole life.
deliveredAt: null means not confirmed yet, never not sent: a phone that is switched off has not confirmed anything.