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 Reference

The Users API reference is available at https://developer.doit.com/reference/listusers.

📘

Required Permissions

Users Manager

Operations

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:

{
  "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

PropertyDescription
idstring
The unique ID of the user.
displayNamestring
The user's display name.
firstNamestring
The user's first name.
lastNamestring
The user's last name.
emailstring
The user's email address.
jobFunctionstring
One of the following job functions:

- Data engineer/Data Analysts
- Executive Team
- Finance/Accounting
- Founder
- Legal/Purchasing
- Management
- Sales/Marketing
- Software/Ops Engineer
phonestring
The country code for the user's phone number.
phoneExtensionstring
The landline or mobile number for the user.
languagestring
The user's language preference.

- en: English
- ja: Japanese
roleIdstring
The ID of the role assigned to the user.
organizationIdstring
The unique ID of the organization the user belongs to.
statusstring
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": "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

PropertyDescription
userIDstring
The unique ID for the user.
displayNamestring
The name displayed in the DoiT Platform.
firstNamestring
The user's first name.
lastNamestring
The user's last name.
emailstring
The user's email address.
jobFunctionstring
One of the following job functions:

- Data engineer/Data Analysts
- Executive Team
- Finance/Accounting
- Founder
- Legal/Purchasing
- Management
- Sales/Marketing
- Software/Ops Engineer
phonestring
The country code for the user's phone number.
phoneExtensionstring
The landline or mobile number for the user.
languagestring
The user's language preference. Allowed values:

- en: English
- ja: Japanese
roleIdstring
The ID of the role assigned to the user.
organizationIdstring
The unique ID of the organization the user belongs to.