---
title: "Verify a verification code"
method: POST
path: "/api/verification-codes/verify"
tags: ["Verification codes"]
---

# Verify a verification code

`POST /api/verification-codes/verify`

Verify a verification code for a specified identifier.
if you're using email as the identifier, you need to setup your email connector first.
if you're using phone as the identifier, you need to setup your SMS connector first.

## Request body

- union
  - object
    - `email` string, regex, required
    - `verificationCode` string, required
  - object
    - `phone` string, regex, required
    - `verificationCode` string, required

## Response `204`

Verification code verified successfully.

## Other responses

- `400` — Bad request. The payload may be invalid.
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/revisions/a163dc77d842/schema)
