---
title: "Sign in with an emailed code"
method: POST
path: "/v1/auth/otp/verify"
tags: ["auth"]
---

# Sign in with an emailed code

`POST /v1/auth/otp/verify`

## Request

- Base URL: `https://api.smartloop.ai`
- URL: `https://api.smartloop.ai/v1/auth/otp/verify`
- Auth: none declared

Codes are single use; after 5 wrong attempts the code is burned. Verifies the email on success. Errors carry `detail.code`: OTP_INVALID, OTP_EXPIRED, OTP_TOO_MANY_ATTEMPTS (400), OTP_NO_ACCOUNT (404), OTP_ACCOUNT_INACTIVE (403).

## Request body

- object
  - `email` string, required
  - `code` string, required

## Response `200`

Signed in

- TokenPair
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` 'bearer', required

## Other responses

- `400`: OTP_INVALID, OTP_EXPIRED or OTP_TOO_MANY_ATTEMPTS
- `403`: OTP_ACCOUNT_INACTIVE
- `404`: OTP_NO_ACCOUNT
- `422`: Validation error

---

[API](https://skmtc.dev/smartloop/apis/smartloop-platform-api.md) - [All operations](https://skmtc.dev/smartloop/apis/smartloop-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartloop/apis/smartloop-platform-api/revisions/17a787eabbe8?raw)
