Skip to main content
POST
/
users
/
Create a new user
curl --request POST \
  --url http:localhost:3000/v2/users/ \
  --header 'Content-Type: application/json' \
  --header 'x-API-Key: <api-key>' \
  --data '{
  "_id": "<string>",
  "number": 123,
  "companyId": "<string>",
  "status": {
    "status": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "lastModifiedAt": "2023-11-07T05:31:56Z",
    "lastModifiedBy": "<string>"
  },
  "chatId": "<string>",
  "id": "36920",
  "general": {
    "firstName": "John",
    "lastName": "Doe",
    "sex": "male",
    "birthDate": "15.08.1990",
    "language": "de",
    "insuranceNumber": "12345678901",
    "deviceToken": "dGhpcyBpcyBhIHRva2VuIGV4YW1wbGU=",
    "webPushToken": "BKP4z...",
    "profileImage": "https://example.com/profiles/user123.jpg",
    "description": "Team lead with 5 years experience",
    "lastNpsScoreSend": "2023-11-07T05:31:56Z",
    "badges": [
      {
        "type": "experience",
        "level": "senior"
      }
    ]
  },
  "access": {
    "dashboardAccess": true,
    "password": "<string>",
    "webAccess": "1",
    "token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "email": "user@company.com",
    "loginTries": 0,
    "passwordChangeToken": "reset-token-12345",
    "passwordChangeDate": "2023-12-01T10:30:00Z"
  },
  "contract": {
    "startDate": "2023-01-01T00:00:00Z",
    "endDate": "2024-12-31T23:59:59Z",
    "department": "service",
    "salary": 15.5,
    "salaryType": "hourly",
    "employment": "full-time",
    "payment": "direct-deposit",
    "dailyWorkingHours": {},
    "payTypeId": "<string>",
    "vacationDays": 30,
    "remainingLeave": [
      {
        "year": 2023,
        "days": 5
      }
    ],
    "allowedToTrackDrivingTime": true
  },
  "contact": {
    "telephone": "+1-555-123-4567",
    "mobile": "+1-555-987-6543",
    "email": "contact@company.com",
    "sms": "+1-555-111-2222",
    "smsCount": 5,
    "smsChatCount": 12,
    "smsSendDate": "2024-01-15T10:30:00Z",
    "smsSendBy": "user123",
    "website": "https://www.company.com",
    "lastSMSStatus": "delivered",
    "secondSmsSendDate": "2024-01-16T14:45:00Z"
  },
  "address": {
    "street": "<string>",
    "zip": "<string>",
    "city": "<string>",
    "country": "<string>",
    "co": "<string>",
    "state": "<string>"
  },
  "accessGroupId": "service",
  "totalTargetHours": 40,
  "jobs": [
    {}
  ],
  "setUpDone": true,
  "location": {
    "latitude": 48.8566,
    "longitude": 2.3522,
    "location": {
      "type": "Point",
      "coordinates": [
        2.3522,
        48.8566
      ]
    }
  },
  "activityTypeIds": [
    "cleaning",
    "maintenance",
    "inspection"
  ],
  "implementation": {
    "hasJob": true,
    "hasTimeTracking": true,
    "isSuccessfullyImplemented": false,
    "lastTimeActive": "2023-12-01T14:30:00Z"
  },
  "workedOnObjectIds": [
    "507f1f77bcf86cd799439011",
    "507f191e810c19729de860ea"
  ],
  "tags": [
    "full-time",
    "certified",
    "team-lead"
  ],
  "analytics": {
    "createdProfile": "2023-01-15T09:00:00Z"
  }
}'
{
  "_id": "<string>"
}

Authorizations

x-API-Key
string
header
required

Body

application/json

A system user representing an employee or team member. Inherits common entity fields and includes personal information, contact details, contract information, and system access settings. Base class for all entities that can have a chat associated with them. Base class for all entities in the system, providing common properties and methods.

id
number

Login ID

Example:

"36920"

general
object

General personal information and profile data for a user

access
object

User authentication and access control information including login credentials, permissions, and security settings

contract
object

Employment contract information including dates, salary, working hours, and employment terms

contact
object

Contact information structure containing phone numbers, email, SMS details, and website

address
object

Address

accessGroupId
string

Access group ID defining user permissions and role within the system

Example:

"service"

totalTargetHours
number

Total target working hours per week for the user

Example:

40

jobs
object[]

Associated jobs and assignments for the user

setUpDone
boolean

Whether initial user setup has been completed

Example:

true

location
object

GPS coordinates and location information used for time tracking and object positioning

activityTypeIds
string[]

List of activity type IDs the user is qualified or assigned to perform

Example:
["cleaning", "maintenance", "inspection"]
implementation
object

Tracks user onboarding progress and system integration status

workedOnObjectIds
string<objectid>[]

Array of customer object IDs the user has worked on

Example:
[
"507f1f77bcf86cd799439011",
"507f191e810c19729de860ea"
]
tags
string[] | null

Tags for categorizing and filtering users

Example:
["full-time", "certified", "team-lead"]
analytics
object

Analytics and performance tracking information for users

_id
string<objectid>

Unique identifier of the entity

number
integer

Unique number of the entity, used for identification

companyId
string<objectid>

The ID of the company this entity belongs to

status
object

Entity Status information

chatId
string<objectid> | null

ID of the chat associated with this entity

Response

User created successfully

_id
string<objectid>

ID of the created user