---
title: "Finish a phone sign-in with the received code"
method: POST
path: "/api/v1/auth/phone/verify"
tags: ["Auth"]
---

# Finish a phone sign-in with the received code

`POST /api/v1/auth/phone/verify`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/auth/phone/verify`
- Auth: none declared

A wrong code answers 422 with status wrong and attempts_left; an expired, locked or finished sign-in answers 410.

## Headers

- `User-Agent` string

## Request body

- VerifyInputBody
  - `challenge_id` string, uuid, required
  - `code` string, required

## Response `200`

OK

- PhoneSessionBody
  - `access_token` string, required
  - `expires_at` string, date-time, required
  - `is_new` boolean, required: True when this sign-in created the account
  - `needs_profile` boolean, required: True until the name and workspace steps of the welcome screen are done
  - `token_type` 'Bearer', required
  - `user` AccountUserBody, required
    - `created_at` string, date-time, required
    - `email` string, nullable, required: Null for accounts created with a phone number
    - `email_verified` boolean, required: True once the email was confirmed with a code or a sign-in link
    - `has_password` boolean, required
    - `id` integer, required
    - `is_admin` boolean, required
    - `locale` string, required
    - `name` string, required: Empty until the person enters a name
    - `phone` string, nullable, required: E.164 number the account signs in with, null for email accounts
    - `public_id` string, uuid, required
  - `workspace` AccountWorkspaceBody, required
    - `created_at` string, date-time, required
    - `id` integer, required
    - `name` string, required
    - `plan` 'free' | 'starter' | 'growth' | 'scale', required
    - `role` 'owner' | 'admin' | 'developer' | 'viewer', required
    - `slug` string, required
    - `trial_ends_at` string, date-time, nullable, required

## Other responses

- `403`: Forbidden
- `409`: Conflict
- `410`: Gone
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
