---
title: "Sign in with the emailed code"
method: POST
path: "/v1/auth/sign-in/email-otp"
tags: ["Accounts"]
---

# Sign in with the emailed code

`POST /v1/auth/sign-in/email-otp`

## Request

- Base URL: `https://api.uxduck.com`
- URL: `https://api.uxduck.com/v1/auth/sign-in/email-otp`
- Auth: none declared

Signs into an existing account only; registration uses /email-code/request with signup intent. The bearer token comes back in the set-auth-token header and as token; a page gets neither, only the httpOnly session cookie.

## Request body

- object
  - `email` string, email, required
  - `otp` string, required

## Response `200`

Signed in

- object
  - `token` string
  - `isNew` boolean, required
  - `user` object, required
    - `id` string, required
    - `email` string, required
    - `name` string, required
    - `emailVerified` boolean, required

## Other responses

- `400`: The code is wrong or has expired, as Better Auth's { code, message }
- `429`: Too many tries
- `503`: Accounts are not set up here

---

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