Skip to main content
POST
/
users
cURL
curl --request POST \
  --url https://grm-api.vercel.app/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Name": "<string>",
  "Email": "jsmith@example.com",
  "State": "<string>",
  "Gender": "<string>",
  "District": "<string>",
  "Mobile": "<string>"
}
'
{
  "id": "<string>",
  "status": "<string>"
}
Creates a new user with validation. This endpoint requires authentication via a bearer token. Required fields include Name, Email, State, Gender, District, and Mobile. The Email field must be in a valid email format, and the Mobile field must be exactly 10 digits.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

User to add to the system

Name
string
required

The full name of the user

Email
string<email>
required

Email address of the user Email address of the user

State
string
required

State of residence of the user

Gender
string
required

Gender of the user

District
string
required

District of residence of the user

Mobile
string
required

Mobile number of the user Mobile number of the user

Response

User created successfully

id
string
required

Unique identifier for the user

status
string
required

Status of the user creation or operation