Skip to main content
POST
/
api
/
users
Create User
curl --request POST \
  --url https://api.example.com/api/users \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "name": "<string>",
  "password": "<string>",
  "profile_image_url": "<string>",
  "role": "<string>",
  "username": "<string>",
  "oauth": {}
}
'
{
  "id": "<string>",
  "email": "<string>",
  "username": "<string>",
  "role": "<string>",
  "name": "<string>",
  "profile_image_url": "<string>",
  "last_active_at": 123,
  "updated_at": 123,
  "created_at": 123
}
Creates a new user account. Note: User creation is typically handled through the authentication endpoints (/api/v1/auths/signup). This documentation is for reference.

Authentication

User creation through signup endpoints requires appropriate signup configuration.

Request Body

email
string
required
User email address (will be converted to lowercase)
name
string
required
User display name
password
string
required
User password (will be hashed)
profile_image_url
string
default:"/user.png"
URL to user’s profile image
role
string
default:"pending"
User role: admin, user, or pending
username
string
Username (optional)
oauth
object
OAuth provider information for OAuth-based signups

Response

id
string
Unique user identifier (auto-generated UUID)
email
string
User email address
username
string
Username
role
string
User role
name
string
User display name
profile_image_url
string
URL to user’s profile image
last_active_at
integer
Unix timestamp of last activity (set to creation time)
updated_at
integer
Unix timestamp of last update
created_at
integer
Unix timestamp of creation

Example Request

curl -X POST "https://your-domain.com/api/v1/auths/signup" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newuser@example.com",
    "name": "New User",
    "password": "securePassword123!"
  }'

Example Response

{
  "id": "user-abc123",
  "email": "newuser@example.com",
  "role": "pending",
  "name": "New User",
  "profile_image_url": "/api/v1/users/user-abc123/profile/image",
  "last_active_at": 1709424000,
  "updated_at": 1709424000,
  "created_at": 1709424000
}

Notes

  • Email addresses are automatically converted to lowercase
  • First user created automatically becomes an admin
  • Subsequent users are created with pending role by default unless configured otherwise
  • Profile image URL defaults to /api/v1/users/{id}/profile/image
  • Password is hashed using secure password hashing before storage
  • User creation is handled by the authentication system at /api/v1/auths/signup