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, rather than the DoiT console, eliminates manual effort, supports large-volume onboarding, and enables users to join the DoiT platform more quickly.
The List Roles and List Organizations methods enables you to identify the roleId
and organizationId
assigned to your users.
API Reference
The Users API reference is available at https://developer.doit.com/reference/listusers.
Required Permissions
Users 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_KEY
Replace "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:
{
"userId": "user_001_abc123def456",
"email": "[email protected]",
"roleId": "0Zi3OPnKAvli7ukMqiKg",
"organizationId": "org_12345_example_main",
"status": "active"
},
{
"userId": "user_002_ghi789jkl012",
"email": "[email protected]",
"roleId": "1Aj4QPmLBwmj8vlNrjLh",
"organizationId": "org_67890_example_dev",
"status": "invited
},
{
"userId": "user_003_mno345pqr678",
"email": "[email protected]",
"roleId": "2Bk5RQnMCxnk9wmOskMi",
"organizationId": "org_12345_example_main",
"status": "invited"
}
Response body fields
Property | Description |
---|---|
userId | string The unique ID of the user. |
string The user's email address. | |
roleId | string The ID of the role assigned to the user. |
organizationId | string The unique ID of the organization the user belongs to. |
status | string The status of the user account. Possible values: active , invited , disabled . |
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": 1,
"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": 1,
"phone": "44",
"phoneExtension": "07452988658",
"language": "en",
"roleId": "GjM9ZwIyGeuXfBraOl47",
"organizationId": "Kp9fA2L0lVYGUZn5oEyU"
}
}
Response body fields
Property | Description |
---|---|
userID | string The unique ID for the user. |
displayName | string The name displayed in the DoiT Platform. |
firstName | string The user's first name. |
lastName | string The user's last name. |
string The user's email address. | |
jobFunction | int A job function code (0-8). Each value corresponds to a specific job title: - 1 : Data engineer/Data Analysts- 2 : Executive Team- 3 : Finance/Accounting- 4 : Founder- 5 : Legal/Purchasing- 6 : Management- 7 : Sales/Marketing- 8 : Software/Ops Engineer |
phone | string The country code for the user's phone number. |
phoneExtension | string The landline or mobile number for the user. |
language | string The user's language preference. Allowed values: - en : English- ja : Japanese |
roleId | string The ID of the role assigned to the user. |
organizationId | string The unique ID of the organization the user belongs to. |
Updated about 21 hours ago