Skip to main content
POST
/
auth
/
register
cURL
curl --request POST \
  --url https://our-secret-api-url.com/auth/register \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "name": "<string>",
  "username": "<string>",
  "email": "<string>",
  "phone": "<string>"
}
'
{
  "message": "<string>",
  "userId": 123
}

Headers

X-API-KEY
string
required

API key required for authentication

Body

application/json
name
string
required

Name of the user

username
string
required

Username of the user

email
string | null

Email address of the user

phone
string | null

Phone number of the user

Response

OTP code successfully sent

message
string

Response message

userId
integer

User ID of the newly created or updated user