Skip to content

Create

POST

/:tenantId/users

Body

json
{
    "id": 485,
    "email": "usertemp@medibulut.com",
    "first_name": "Adı",
    "last_name": "Soyadı",
    "name": null,
    "identity_number": null,
    "mobile": "+905555555554",
    "phone": "",
    "role_id": "admin",
    "status": 1,
    "color": "#c00",
    "bonus_rate": "15.00",
    "photo": null,
    "authorized_users": [
      11
    ],
    "permissions": [
      "appointments.manage",
      "patients.manage",
      "patient-groups.manage",
      "services.manage",
      "users.manage",
      "reports.view",
      "finance.manage",
      "settings.manage",
      "working-hours.manage"
    ],
    "service_ids": []
  }
FieldTypeRequiredDescription
first_namestringYesThe first name of the user.
last_namestringYesThe last name of the user.
mobilestringNoThe mobile phone number of the user, including country code.
phonestringNoAn alternate phone number for the user, including country code.
emailstringYesThe email address of the user, used for login and notifications.
passwordstringYesThe user's password, must meet the required security criteria.
password_confirmationstringYesA repeat of the password field to ensure accuracy during input.
statusintegerYesThe current status of the user
0: Inactive (default)
1: Active.
photostringNoA URL pointing to the user's profile photo.(base64-encoded)
identity_numberstringNoThe user's government-issued identity number (if applicable).
bonus_ratefloatNoThe percentage of bonuses applicable to the user (e.g., 15 for 15%).
colorstringNoA hexadecimal code representing the user's assigned color for identification or UI purposes. (Hex Code)
role_idstringYesThe identifier for the user's role within the system
2: Admin
3: Specialist
4: Personnel
permissionsarray of stringsNoA list of permissions granted to the user ("appointments.manage", "patients.manage", etc.).
authorized_usersarray of integersNoAn array of user IDs that this user is authorized to manage or interact with.
service_idsarray of integersNoA list of service IDs associated with the user, representing their responsibilities or offerings.

Response

HTTP 201 Created

json
{
  "data": {
    "id": 485,
    "email": "usertemp@medibulut.com",
    "first_name": "Adı",
    "last_name": "Soyadı",
    "name": null,
    "identity_number": null,
    "mobile": "+905555555554",
    "phone": "",
    "role_id": "admin",
    "status": 1,
    "color": "#c00",
    "bonus_rate": "15.00",
    "photo": null,
    "authorized_users": [
      11
    ],
    "permissions": [
      "appointments.manage",
      "patients.manage",
      "patient-groups.manage",
      "services.manage",
      "users.manage",
      "reports.view",
      "finance.manage",
      "settings.manage",
      "working-hours.manage"
    ],
    "service_ids": []
  }
}

422 Unprocessable Entity

json
{
  "message": "The first name field is required. (and 5 more errors)",
  "errors": {
    "first_name": [
      "The first name field is required."
    ],
    "last_name": [
      "The last name field is required."
    ],
    "email": [
      "The email field is required."
    ],
    "password": [
      "The password field is required."
    ],
    "role_id": [
      "The role id field is required."
    ],
    "status": [
      "The status field is required."
    ]
  }
}