Skip to main content

Signup

Create a new user account.

Endpoint

POST /api/v3/auth/signup

Description

Creates a new user account with email and password. Depending on the environment configuration, the user may need to confirm their email before the account is activated.

Authentication

This endpoint does not require authentication.

Request Body

FieldTypeRequiredDescription
emailstringYesEmail address for the new account
passwordstringYesPassword (minimum 6 characters)

Response

Returns session data with tokens (if auto-confirm is enabled) or user information (if email confirmation is required).

With Auto-Confirm

FieldTypeDescription
accessTokenstringJWT access token
refreshTokenstringRefresh token
tokenTypestringToken type (bearer)
expiresInintegerToken lifetime in seconds
expiresAtintegerToken expiration timestamp
userobjectUser information

Without Auto-Confirm

FieldTypeDescription
userobjectUser information (no tokens until email confirmed)

Usage

import requests

response = requests.post(
"https://cadenza-api-uat.algo724.com/api/v3/auth/signup",
json={
"email": "newuser@example.com",
"password": "secure-password"
}
)

data = response.json()["data"]
curl -X POST https://cadenza-api-uat.algo724.com/api/v3/auth/signup \
-H "Content-Type: application/json" \
-d '{"email": "newuser@example.com", "password": "secure-password"}'

Example Response

With Auto-Confirm (UAT)

{
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "v1.MjAyNC0wMS0xNVQxMDowMDowMFo...",
"tokenType": "bearer",
"expiresIn": 3600,
"expiresAt": 1703056235,
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "newuser@example.com",
"createdAt": "2024-01-15T10:00:00Z"
}
},
"success": true,
"errno": 0,
"error": null
}

Without Auto-Confirm (Production)

{
"data": {
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "newuser@example.com",
"createdAt": "2024-01-15T10:00:00Z"
}
},
"success": true,
"errno": 0,
"error": null
}

Error Responses

HTTP CodeErrorDescription
400Invalid requestInvalid email format or weak password
400User already existsEmail is already registered
429Rate limitedToo many signup attempts

Example Error

{
"data": null,
"success": false,
"errno": -100002,
"error": "User already registered"
}

Notes

  • In UAT environment, email confirmation is typically disabled (auto-confirm)
  • In Production environment, users must confirm their email before logging in
  • Password must be at least 6 characters
  • After signup with email confirmation, user must check email and click confirmation link