In this article, you can read about retrieving, creating, updating, and deleting users via the API.
Get Users
GET
Retrieves a list of all users. The result can be limited by department or corporation using the optionaldepartmentId or corporationId parameters.
https://api.recman.io/v2/get/?key={{api_key}}&scope=user&
fields=firstName,lastName,email,title,admin&
departmentId={{departmentId}}| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Required | Your API key |
| scope | string | Required | Must be set to user |
| fields | string | Required | At least 1 required, comma-separated values |
| departmentId | integer | Optional | Search criteria. Limits results to users connected to this department |
| corporationId | integer | Optional | Search criteria. Limits results to users connected to this corporation |
User fields
| Field | Type | Description |
|---|---|---|
| userId | integer | Required on operation: update, delete |
| firstName | string | First name |
| lastName | string | Last name |
| mobilePhone | object | Best practice example: "mobilePhone": {"prefix": "+47", "number": "57877545"} |
| officePhone | object | Best practice example: "officePhone": {"prefix": "+47", "number": "57877545"} |
| string | ||
| title | string | Title. Example: "General Manager" |
| string | ||
| string | ||
| string | ||
| departmentId | string | Department ID this user is connected to |
| corporationId | string | Corporation ID this user is connected to |
| admin | string boolean | Whether the user is a superadmin. 0 = not superadmin, 1 = is superadmin |
| created | string | Date of creation |
| updated | string | Date of last update |
| profilePicture | string | Profile picture link |
| userTagList | string | Tags applied to this user |
| gender | string | Valid values: female, male |
Insert User
POST
Creates a new user. The operation must be set to insert and the scope to user. It is required to specify the corporationId, departmentId, email, firstName, and lastName fields when inserting a user.
https://api.recman.io/v2/post/| Field | Type | Required | Description |
|---|---|---|---|
| corporationId | integer | Required | Corporation ID this user is connected to |
| departmentId | integer | Required | Department ID this user is connected to |
| string | Required | ||
| firstName | string | Required | First name |
| lastName | string | Required | Last name |
| title | string | Optional | Example: "General Manager" |
| gender | string | Optional | Allowed values: female, male |
| mobilePhone | object | Optional | Best practice example: "mobilePhone": {"prefix": "+47", "number": "57877545"} |
| officePhone | object | Optional | Best practice example: "officePhone": {"prefix": "+47", "number": "57877545"} |
| string | Optional | ||
| string | Optional | ||
| string | Optional | X (Twitter) |
Update User
POST
Updates an existing user. The operation must be set to update and the scope to user. It is required to specify the userId field when updating a user.
https://api.recman.io/v2/post/| Field | Type | Required | Description |
|---|---|---|---|
| userId | integer | Required | ID of the user to update |
| departmentId | integer | Optional | Department ID this user is connected to |
| string | Optional | ||
| firstName | string | Optional | First name |
| lastName | string | Optional | Last name |
| title | string | Optional | Example: "General Manager" |
| gender | string | Optional | Allowed values: female, male |
| mobilePhone | object | Optional | Best practice example: "mobilePhone": {"prefix": "+47", "number": "57877545"} |
| officePhone | object | Optional | Best practice example: "officePhone": {"prefix": "+47", "number": "57877545"} |
| string | Optional | ||
| string | Optional | ||
| string | Optional | X (Twitter) |
Delete User
POST
Deletes a user. The operation must be set to delete and the scope to user. It is required to specify the userId field when deleting a user.
https://api.recman.io/v2/post/| Field | Type | Required | Description |
|---|---|---|---|
| userId | integer | Required | ID of the user to delete |