---
title: "User registration"
method: POST
path: "/api/auth/register"
tags: ["auth"]
---

# User registration

`POST /api/auth/register`

Register a new user in Keycloak

## Request body

- RegisterRequest — User registration request model.
  - `email` string, required — User email address
  - `password` string, required — User password (min 8 characters)
  - `first_name` string, required — User first name
  - `last_name` string, required — User last name
  - `phone` string, required — User phone number
  - `birth_date` string, required — User date of birth (YYYY-MM-DD format, required)
  - `country` string, nullable — User country (optional)
  - `reason_for_registration` string, required — Reason for registration
  - `commercial_communications_consent` boolean — Consent to receive commercial and promotional communications
  - `email_verified` boolean — Whether the email should be marked as verified. Defaults to False so that users must verify their email before accessing the app.

## Response `201`

Successful Response

- RegisterResponse — User registration response model with authentication tokens.
  - `user_id` string, required — Created user ID
  - `email` string, required — User email
  - `access_token` string, required — JWT access token
  - `refresh_token` string, required — Refresh token
  - `expires_in` integer, required — Access token expiration time in seconds
  - `refresh_expires_in` integer, required — Refresh token expiration time in seconds
  - `token_type` string — Token type
  - `title` string — Response title
  - `message` string — Response message

## Other responses

- `422` — Validation Error

---

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