POST
/
users
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

The body is of type object.

Response

201
application/json

User created successfully

The response is of type object.