---
title: "Verify code and get API key"
method: POST
path: "/api/auth/verify-code"
tags: ["Onboarding"]
---

# Verify code and get API key

`POST /api/auth/verify-code`

## Request

- Base URL: `https://clearlist.me`
- URL: `https://clearlist.me/api/auth/verify-code`
- Auth: none required

Verifies the 6-digit code. Creates the account if new. Returns an API key when `agent: true` is set.

## Request body

- object
  - `email` string, email, required
  - `code` string, required
  - `agent` boolean: Set true to receive an API key.

## Response `200`

Verified.

- object
  - `success` boolean
  - `isNewUser` boolean
  - `uid` string
  - `apiKey` string: Only when agent=true. Format cl_<64-hex>.

## Other responses

- `400`: Invalid or missing parameters.
- `401`: Missing or invalid API key.
- `429`: Too many requests.
- `500`: Unexpected server error.

---

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