Skip to main content
POST
/
auth
/
signup
Sign Up
curl --request POST \
  --url https://api.example.com/auth/signup \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>"
}
'
{
  "message": "<string>",
  "user": {
    "id": "<string>",
    "email": "<string>",
    "role": "<string>"
  }
}
Creates a new user account with the ‘user’ role. This is a public endpoint that does not require authentication.

Request Body

email
string
required
User’s email address. Must be a valid email format.
password
string
required
User’s password. Must be at least 6 characters long.

Response

message
string
Success message indicating user creation status.
user
object
The created user object.

Example

curl -X POST https://api.yourapp.com/auth/signup \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "securepassword123"
  }'

Response Examples

{
  "message": "User created successfully",
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "role": "user"
  }
}

Notes

  • This endpoint is public and does not require authentication.
  • The user’s email is automatically confirmed upon creation.
  • All new users are assigned the ‘user’ role by default.
  • The password must meet minimum security requirements (at least 6 characters).
  • Duplicate email addresses are not allowed.

Build docs developers (and LLMs) love