Skip to main content

POST /api/users

Creates a new user account with a specified role.
Requires a valid Bearer token. Allowed roles: ADMIN.

Request body

email
string
required
Email address for the new user. Must be a valid email format.
password
string
required
Password for the new user. Must be at least 8 characters and include uppercase letters, lowercase letters, numbers, and special characters (@$!%*?&).
role
string
required
Role to assign to the user. Must be one of: ADMIN, ORGANIZER, USER.
firstName
string
required
First name of the user.
lastName
string
required
Last name of the user.
location
string
required
Geographic location of the user.

Response fields

status
boolean
required
Indicates whether the request succeeded.
message
string
Human-readable result message.
data
object
required
The created user object. See Get user for the full field list.
curl --request POST \
  --url 'https://api.meetpoint.com/api/users' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "john.smith@example.com",
    "password": "Secure@1234",
    "role": "ORGANIZER",
    "firstName": "John",
    "lastName": "Smith",
    "location": "Los Angeles, USA"
  }'
{
  "status": true,
  "message": "Usuario creado correctamente",
  "data": {
    "id": "user-def456",
    "roles": ["ORGANIZER"],
    "email": "john.smith@example.com",
    "firstName": "John",
    "lastName": "Smith",
    "location": "Los Angeles, USA",
    "isBlocked": false,
    "membership": null,
    "eventsCount": 0,
    "attendancesCount": 0,
    "reportsCount": 0,
    "ratingsCount": 0,
    "averageRating": 0,
    "organizedEvents": [],
    "attendances": [],
    "comments": [],
    "madeReports": [],
    "reports": [],
    "madeRatings": [],
    "ratings": []
  }
}

Build docs developers (and LLMs) love