---
title: "Register"
method: POST
path: "/api/v1/auth/register"
tags: ["auth"]
---

# Register

`POST /api/v1/auth/register`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/auth/register`
- Auth: none declared

Register a new user with email and password.

Sets `badge_session` + `badge_refresh` cookies AND returns the access
token in the JSON body. The body-token return is transitional — the
SDK + curl users rely on it; once those clients adopt cookies we can
drop it (separate PR).

BRIEF-LP-000 §6.3 — fires the canonical `signup_completed` event on 201.
`time_to_complete_ms` is measured from handler entry to response build
via perf_counter — captures the server-side cost of the signup path,
which is the relevant counter-metric (BRIEF §5: p95 latency must not
regress >20ms).

v0.1.29: the legacy `user_signed_up` parallel-fire event was removed
after the v0.1.24 deprecation window. Downstream PostHog Insights /
dashboards must consume `signup_completed`.

## Request body

- UserCreate
  - `email` string, email, required
  - `name` string, nullable
  - `avatar_url` string, nullable
  - `password` string, required

## Response `201`

Successful Response

- TokenResponse
  - `access_token` string, required
  - `token_type` string
  - `user` UserRead, required
    - `email` string, email, required
    - `name` string, nullable
    - `avatar_url` string, nullable
    - `id` string, uuid, required
    - `username` string, nullable
    - `auth_provider` string, required
    - `plan` string, required
    - `has_billing_account` boolean
    - `plan_interval` string, nullable
    - `email_verified` boolean
    - `trial_ends_at` string, date-time, nullable
    - `is_active` boolean, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `notify_run_complete` boolean, required
    - `notify_score_change` boolean, required
    - `notify_rank_change` boolean, required
    - `notify_weekly_digest` boolean, required
    - `notify_lifecycle_email` boolean
    - `notify_regression` boolean
    - `pmf_survey_last_shown` string, date-time, nullable
    - `marketplace_payout_email` string, nullable
    - `is_admin` boolean
    - `deletion_requested_at` string, date-time, nullable
    - `deletion_due_at` string, date-time, nullable
    - `arena_run_count` integer
    - `monthly_run_count` integer
    - `agent_count` integer
    - `team_count` integer

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
