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

# Register

`POST /api/v1/auth/register`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/auth/register`
- Auth: none declared

Register a new user.

TECH-663: Rate limited to 3 attempts per minute per IP.

Args:
    http_request: FastAPI request for IP extraction
    request: Registration data
    session: Database session

Returns:
    Created user

Raises:
    ConflictError: If user already exists
    BadRequestError: If password is too weak

## Request body

- RegisterRequest: User registration request model. This endpoint is currently disabled. The frontend uses Clerk OAuth. company_id is accepted by the schema but rejected by the endpoint in all cases until an invitation-based join flow is implemented.
  - `email` string, email, required
  - `password` string, required
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `company_id` integer, nullable

## Response `201`

Successful Response

- UserResponse: User response model.
  - `id` integer, required
  - `email` string, required
  - `first_name` string, nullable
  - `last_name` string, nullable
  - `full_name` string, nullable
  - `company_id` integer, required
  - `role` string, nullable
  - `is_active` boolean, nullable
  - `is_locked` boolean, nullable
  - `is_superuser` boolean, nullable
  - `is_allowlisted` boolean, nullable
  - `company_name` string, nullable
  - `phone` string, nullable
  - `timezone` string, nullable
  - `clerk_user_id` string, nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable
  - `notify_product_newsletters` boolean
  - `notify_billing_alerts` boolean
  - `onboarding_completed` boolean
  - `is_impersonation` boolean, nullable
  - `impersonated_by` integer, nullable

## Other responses

- `422`: Validation Error

---

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