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
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address for the new account |
password | string | Yes | Password (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
| Field | Type | Description |
|---|---|---|
accessToken | string | JWT access token |
refreshToken | string | Refresh token |
tokenType | string | Token type (bearer) |
expiresIn | integer | Token lifetime in seconds |
expiresAt | integer | Token expiration timestamp |
user | object | User information |
Without Auto-Confirm
| Field | Type | Description |
|---|---|---|
user | object | User 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 Code | Error | Description |
|---|---|---|
| 400 | Invalid request | Invalid email format or weak password |
| 400 | User already exists | Email is already registered |
| 429 | Rate limited | Too 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