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

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

PropertyDescription
userIdstring
The unique ID of the user.
emailstring
The user's email address.
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": 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

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.
jobFunctionint
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
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.