User API

User API Reference

User objects allow you to manage a user and the user’s attributes such as a department, phone number, employee number, email, and username. The API allows you to create, delete, retrieve a user or a list of users, and update user information.

The user object

Attributes

Property Name Type Description
name string User's full name
email string User's primary email used in profile
role string The role of the user created (available roles are: 'Admin', 'Privileged', 'Participant')
title string User's job title
alternateEmail string User's secondary email in profile
phone string Primary phone number of user
location string Free text that can be used to define office location (e.g. City, State, Country)
timezone string Time zone used to display to user the system times throughout Domo application
locale date-time Locale used to display to user the system settings throughout Domo application
employeeNumber string Employee number within company

Retrieve a user

Retrieves the details of an existing user.

Definition

https://api.domo.com/v1/users/{id}

Arguments

Property Name Type Required Description
id string Required The ID of the user

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
GET https://api.domo.com/v1/users/1
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Returns

Returns a user object if valid user ID was provided. When requesting, if the user ID is related to a user that has been deleted, a subset of the user information will be returned, including a deleted property, which will be true.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "alternateEmail": "leonardeuler@email.com",
    "createdAt": "2017-06-12T20:23:57Z",
    "email": "leonard.euler@domo.com",
    "employeeNumber": 23532,
    "groups": [
        {
            "id": 1324037627,
            "name": "Default"
        }
    ],
    "id": 871428330,
    "image": "https://instance.domo.com/avatar/thumb/domo/871428330",
    "location": "American Fork",
    "name": "Leonard Euler",
    "phone": "884-361-1078",
    "role": "Admin",
    "title": "Software Engineer",
    "updatedAt": "2017-06-12T20:23:57Z"
}

Create a user

Creates a new user in your Domo instance.

Definition

POST https://api.domo.com/v1/users

Arguments

Property Name Type Required Description
name string Required User's full name
email string Required User's primary email used in profile
role string Required The role of the user created (available roles are: 'Admin', 'Privileged', 'Participant')
sendInvite boolean - Send an email invite to created user
title string - User's job title
alternateEmail string - User's secondary email in profile
phone string - Primary phone number of user
location string - Free text that can be used to define office location (e.g. City, State, Country)
timezone date-time - Time zone used to display to user the system times throughout Domo application
locale string - Locale used to display to user the system settings throughout Domo application
employeeNumber string - Employee number within company

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
POST https://api.domo.com/v1/users?sendInvite=true
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

{
"title": "Software Engineer",
"email": "leonhard.euler@domo.com",
"alternateEmail": "leonhardeuler@email.com",
"role": "Admin",
"phone": "888-361-1078",
"name": "Leonhard Euler",
"location": "American Fork",
"timezone": "",
"locale": "",
"employeeNumber": 23432
}

Returns

Returns a user object when successful. The returned object will have user attributes based on the information that was provided when user was created. The two exceptions of attributes not returned are the user's timezone and locale.

Sample Response

HTTP/1.1 201 Created
Location: https://api.{instance}.domo.com/v1/users/855462682
Content-Type: application/json
Content-Length: 110

{
    "alternateEmail": "leonhardeuler@email.com",
    "createdAt": "2017-06-12T20:16:59Z",
    "email": "leonhard.euler@domo.com",
    "employeeNumber": 23432,
    "groups": [
        {
            "id": 1324037627,
            "name": "Default"
        }
    ],
    "id": 959463190,
    "image": "https://instance.domo.com/avatar/thumb/domo/959463190",
    "location": "American Fork",
    "name": "Leonhard Euler",
    "phone": "888-361-1078",
    "role": "Admin",
    "title": "Software Engineer",
    "updatedAt": "2017-06-12T20:16:59Z"
}

Update a user

Updates the specified user by providing values to parameters passed. Any parameter left out of the request will cause the specific user’s attribute to remain unchanged.

Known limitation
Currently all user fields are required

Definition

PUT https://api.domo.com/v1/users/{id}

Arguments

Property Name Type Required Description
id string Required The ID of the user
name string - User's full name
email string - User's primary email used in profile
role string - The role of the user created (available roles are: 'Admin', 'Privileged', 'Participant')
title string - User's job title
alternateEmail string - User's secondary email in profile
phone string - Primary phone number of user
location string - Free text that can be used to define office location (e.g. City, State, Country)
timezone date-time - Time zone used to display to user the system times throughout Domo application
locale string - Locale used to display to user the system settings throughout Domo application
employeeNumber string - Employee number within company

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
PUT https://api.domo.com/v1/users/345
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

{
  "email": "leonhard.euler@domo.com",
  "role": "Admin",
  "name": "Leonhard Euler"
}

Returns

Returns a 200 response code when successful.

Sample Response

HTTP/1.1 200 OK

Delete a user

Permanently deletes a user from your Domo instance.

Warning
This is destructive and cannot be reversed.

Definition

DELETE https://api.domo.com/v1/users/{id}

Arguments

Property Name Type Required Description
id string Required The ID of the user to delete

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
DELETE https://api.domo.com/v1/users/430
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Returns

Returns a 204 response code when successful or error based on whether the user ID being valid.

Sample Response

HTTP/1.1 204 No Content

List users

Get a list of all users in your Domo instance.

Definition

GET https://api.domo.com/v1/users

Arguments

Property Name Type Required Description
limit long optional The amount of users to return in the list. The default is 50 and the maximum is 500.
offset long optional The offset of the user ID to begin list of users within the response.

Sample Request

See it in your language

See this sample request in Java, Python, and Node.
GET https://api.domo.com/v1/users?limit=100&offset=300
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

Returns

Returns all user objects that meet argument criteria from original request.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json

[ {
  "id": 535460005,
  "title": "Supreme Ninja Master",
  "email": "hattori.hanzo@domo.com",
  "role": "Admin",
  "phone": "801-787-8456",
  "name": "Hattori Hanzo"
}, 
{
  "id": 1845705061,
  "title": "Game Theory",
  "email": "john.nash@domo.com",
  "role": "Admin",
  "name": "John Forbes Nash, Jr."
}, 
{
  "id": 55541092,
  "title": "Electric Mayhem",
  "email": "doctor.teeth@domo.com",
  "role": "Privileged",
  "name": "Dr. Teeth"
} ]