---
title: "Verify CLI signup and create OAuth session"
method: POST
path: "/cli/signup/verify"
tags: ["CLI"]
---

# Verify CLI signup and create OAuth session

`POST /cli/signup/verify`

Verifies the email code for a CLI signup session and creates the
account. When the session was started with a `signup_code`, the
reserved code is redeemed; sessions started without a code skip
the redemption step. Either way an org-scoped OAuth CLI session
is created and the token set is returned exactly once. This
endpoint does not require an API key.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `signup_token` string, required
  - `verification_code` string, required
  - `password` string

## Response `200`

CLI signup verified and OAuth token set created

- object
  - `success` true, required
  - `data` object, required
    - `api_key` string, required — Legacy alias for access_token. New CLI builds should persist access_token and refresh_token.
    - `key_id` string, uuid, required — Legacy alias for oauth_grant_id
    - `key_prefix` string, required — Legacy display prefix derived from access_token
    - `access_token` string, required — OAuth access token for CLI API authentication
    - `refresh_token` string, required — OAuth refresh token used by the CLI to renew access
    - `token_type` 'Bearer', required
    - `expires_in` integer, required — Seconds until access_token expires
    - `auth_method` 'oauth', required
    - `oauth_grant_id` string, uuid, required
    - `oauth_client_id` string, required
    - `org_id` string, uuid, required
    - `org_name` string, nullable, required

## Other responses

- `400` — Invalid request parameters
- `429` — Rate limit exceeded

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) · [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primitive/primitive-api/revisions/c2299d28022c/schema)
