Skip to main content
POST
/
api
/
v1
/
auth
/
register
Register
curl --request POST \
  --url https://api.superbox.ai/api/v1/auth/register \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "display_name": "<string>"
}
'
{
  "id_token": "<string>",
  "refresh_token": "<string>",
  "expires_in": 123,
  "email": "<string>",
  "local_id": "<string>"
}

Endpoint

POST /api/v1/auth/register
Registration uses a two-step OTP verification flow. Call /auth/register/send-otp first to trigger email verification, then call this endpoint after the user verifies.

Request Body

email
string
required
User email address
password
string
required
Account password (minimum 8 characters)
display_name
string
Display name shown in the UI

Example Request

curl -X POST https://api.superbox.ai/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "SecurePass123!",
    "display_name": "Your Name"
  }'

Response

id_token
string
Firebase ID token (JWT). Use this as Authorization: Bearer <id_token> for API requests.
refresh_token
string
Long-lived refresh token used to obtain new ID tokens via /auth/refresh.
expires_in
number
Seconds until the ID token expires (3600 = 1 hour).
email
string
Registered email address.
local_id
string
Firebase user ID.

Success Response (201)

{
  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6...",
  "refresh_token": "AMf-vByW3...",
  "expires_in": 3600,
  "email": "user@example.com",
  "local_id": "abc123def456"
}

Error Responses

{
  "status": "error",
  "detail": "Invalid request: email is required"
}