> Toden documentation. For the full index fetch /llms.txt. Every page is available as Markdown by appending .md to its URL. Every endpoint is under /api/v1. Identity verification and Risk Intelligence are separate contracts there with different error shapes; /api/kyc and /api/identity are older prefixes that still answer the same. Never invent an endpoint, field or enum value: read the API reference page for the operation first.

## Decline a session after the last code attempt

The email and phone steps can now decline the session when the applicant enters a code wrongly too many times, instead of offering a new code.

### Added

* **Decline after the last attempt**, a setting on the email and phone verification steps (`declineOnLastAttempt`, off by default). When the applicant uses up a code's attempts (3 by default), the step is charged and the session is declined with the reason code `contact_attempts_exceeded`. See [Decisioning](/user-verification/workflows/decisioning).
* **`session.declined` webhook**, with `reasonCode`, and the attempt status `declined` on `GET /api/v1/status/:id`, also with `reasonCode`. A request that names a declined session answers `409 session_declined` with `reasonCode`.

### Changed

* **Three codes per address per hour by default**, down from five. A workflow that sets no limit now sends at most 3 codes to one email address or phone number in an hour; set **Max codes sent** on the step (up to 5) to allow more. Past the limit, a send answers `429 send_rate_limited`.
* With the setting off, the SDKs now disable the code field once a code is used up, until the applicant requests a new one. This is in `@toden/react`, `@toden/react-native` and `toden_flutter` 4.2.0, which also show a final screen when a session is declined.

### What you need to do

Nothing unless you turn the setting on. If you do, handle `session.declined` (or the `declined` attempt status) as a final outcome, and update the SDKs to the versions above so applicants see why the verification ended.