Users API Overview
Programmatically manage your users
The Users API allows you to invite and manage the users in your organization who need access to the DoiT Platform. Using the API for user invitations, updates, and deletes, rather than the DoiT console, eliminates manual effort, supports programmatic onboarding, and enables users to join the DoiT platform faster.
The List Roles and List Organizations methods enable you to identify the roleId
and organizationId
assigned to your users.
API ReferenceThe Users API reference is available at https://developer.doit.com/reference/listusers.
Required PermissionsUsers Manager
Operations
- GET /users/v1/list: Lists all users.
- POST /users/v1/invite: Invites a user.
- PATCH /users/v1/{id}: Updates a user.
- DELETE /users/v1/{id}: Deletes a user.
Examples
YOUR_API_KEYReplace "YOUR_API_KEY" with your actual API key as explained at Get Started
List all users
The List all users method lists all users in your organization that have access to the DoiT Platform.
Sample request:
curl --location \
--request GET 'https://api.doit.com/users/v1/list' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data-raw ''
Sample response body:
{
"id": "user_001_abc123def456",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"jobFunction": "Software / Ops Engineer",
"phone": "+44",
"phoneExtension": "236542515241",
"roleId": "0Zi3OPnKAvli7ukMqiKg",
"organizationId": "org_12345_example_main",
"status": "active"
},
{
"id": "user_002_ghi789jkl012",
"displayName": "Bob Brown",
"firstName": "Alice",
"lastName": "Smith",
"email": "[email protected]",
"jobFunction": "Management",
"phone": "+44",
"phoneExtension": "236542515242",
"displayName": "Alice Smith",
"roleId": "1Aj4QPmLBwmj8vlNrjLh",
"organizationId": "org_67890_example_dev",
"status": "invited
},
{
"id": "user_003_mno345pqr678",
"displayName": "Bob Jones",
"firstName": "Robert",
"lastName": "Jones",
"email": "[email protected]",
"jobFunction": "Sales / Marketing",
"phone": "+44",
"phoneExtension": "236542515243",
"roleId": "2Bk5RQnMCxnk9wmOskMi",
"organizationId": "org_12345_example_main",
"status": "invited"
}
Response body fields
Property | Description |
---|---|
id |
|
displayName |
|
firstName |
|
lastName |
|
| |
jobFunction |
|
phone |
|
phoneExtension |
|
language |
|
roleId |
|
organizationId |
|
status |
|
Update a user
The Update a user method updates a single user in your organization. The request only needs to contain the parameters that you want to update for the user. At least one of the parameters must be provided.
Sample request:
curl --location \
--request PATCH 'https://api.doit.com/users/v1/{id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data-raw '
{
"firstName": "John",
"lastName": "Doe",
"jobFunction": "Data engineer/Data Analysts",
"phone": "+44",
"phoneExtension": "2071234567",
"language": "en",
"roleId": "0Zi3OPnKAvli7ukMqiKg"
}
'
Sample response body:
{
"message": "2qX2mzJXAPqsjF5P1LEY user was updated",
"user": {
"userId": "2qX2mzJXAPqsjF5P1LEY",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"jobFunction": "Data engineer/Data Analysts",
"phone": "+44",
"phoneExtension": "07452988658",
"language": "en",
"roleId": "GjM9ZwIyGeuXfBraOl47",
"organizationId": "Kp9fA2L0lVYGUZn5oEyU"
}
}
Response body fields
Property | Description |
---|---|
userID |
|
displayName |
|
firstName |
|
lastName |
|
| |
jobFunction |
|
phone |
|
phoneExtension |
|
language |
|
roleId |
|
organizationId |
|
Updated 11 days ago