curl --request POST \
--url https://api.example.com/api/auth/signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"user_name": "<string>"
}
'{
"data": {
"user": {
"name": "<string>",
"avatar": "<string>"
},
"session": {
"access_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"expires_at": 123,
"token_type": "<string>"
}
},
"sb-access-token": {},
"sb-refresh-token": {},
"Retry-After": {}
}Register a new user account with email and password
curl --request POST \
--url https://api.example.com/api/auth/signup \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"user_name": "<string>"
}
'{
"data": {
"user": {
"name": "<string>",
"avatar": "<string>"
},
"session": {
"access_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"expires_at": 123,
"token_type": "<string>"
}
},
"sb-access-token": {},
"sb-refresh-token": {},
"Retry-After": {}
}429 Too Many Requests when limit is exceeded[email protected]SecurePass123!AnimeWatcher123curl -X POST "https://anidev.vercel.app/api/auth/signup" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "SecurePass123!",
"user_name": "AnimeWatcher123"
}'
{
"data": {
"user": {
"name": "AnimeWatcher123",
"avatar": null
},
"session": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "v1.MRjyg-VNJ8H7zN...",
"expires_in": 3600,
"expires_at": 1710987654,
"token_type": "bearer"
}
}
}
400 Bad Request
{
"error": "Email, password and username are required",
"type": "validation"
}
400 Bad Request
{
"error": "Invalid email format",
"type": "validation"
}
409 Conflict
{
"error": "User with this email already exists",
"type": "conflict"
}
400 Bad Request
{
"error": "Password should be at least 6 characters",
"type": "validation"
}
429 Too Many Requests
{
"error": "Too many requests, please try again later",
"type": "tooManyRequests"
}
500 Internal Server Error
{
"error": "Internal server error"
}
user_name: Display name provided during registrationavatar_url: Profile picture URL (null by default, can be updated later)public_users table