Users
Every monday.com user is a part of an account (i.e an organization) and could be a member or a guest in that account.
Users queries
Required scope: users:read
Querying users returns one or multiple users. You can place users at the root of your query or nest it within another query. Please note that nesting users in another query will increase its complexity.
query {
users (ids: 123456789) {
name
email
url
}
}
let query = "query { users (ids: 123456789) { name email url }";
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
query : query
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
You can find the Postman request to get user data here.
Arguments
The following arguments can reduce the number of users returned.
Argument | Description |
---|---|
ids [Int] | A list of users' unique identifiers. |
kind UserKind | The kind of users you want to search by: all, non_guests, guests, or non_pending. |
newest_first Boolean | Lists the most recently created boards at the top. |
limit Int | Number of users to get. |
emails [String] | A list of users' emails. |
page Int | The page number to return. Starts at 1. |
name String | A fuzzy search of users by name. |
non_active Boolean | Returns the account's non-active users. |
Fields
Fields are used to return specific properties in an object. The following fields will determine what information is returned from your users
query.
Field | Field description | Supported arguments |
---|---|---|
account Account! | The user's account. | |
birthday Date | The user's date of birth, as set in their profile and returned as YYYY-MM-DD. | |
country_code String | The user's country code. | |
created_at Date | When the user profile was created, returned as YYYY-MM-DD. | |
current_language String | The user's language. | |
email String! | The user's email. | |
enabled Boolean! | Will return true if the user is enabled. | |
encrypt_api_token String | This is the user's access token. It can be used for building the board's email address. | |
id Int! | The user's unique identifier. | |
is_admin Boolean | Will return true if the user is an Admin; | |
is_guest Boolean | Will return true if the user is a guest. | |
is_pending Boolean | Will return true if the user didn't confirm their email yet. | |
is_view_only Boolean | Will return true if the user is a Viewer. | |
is_verified Boolean | Will return "true" if the user confirmed their profile via the confirmation email. | |
join_date Date | The date the user joined the account and returned as YYYY-MM-DD. | |
last_activity Date | The last date and time the user was active. Returned as YYYY-MM-DDT00:00:00. | |
location String | The user's location. | |
mobile_phone String | The user's mobile phone number. | |
name String! | The user's name. | |
phone String | The user's phone number. | |
photo_original String | Returns the URL of the user's uploaded photo in its original size. | |
photo_small String | Returns the URL of the user's uploaded photo in a small size (150x150 px). | |
photo_thumb String | Returns the URL of the user's uploaded photo in thumbnail size (100x100 px). | |
photo_thumb_small String | Returns the URL of the user's uploaded photo a small thumbnail size (50x50 px). | |
photo_tiny String | Returns the URL of the user's uploaded photo in tiny size (30x30). | |
teams [Team] | The teams the user is a member in. | ids [Int] |
time_zone_identifier String | The user's timezone identifier. | |
title String | The user's title. | |
url String! | The user's profile URL. | |
utc_hours_diff Int | The user’s UTC hours difference. |
Users mutations
Add users to a board
Required scope: boards:write
This method allows you to add users to a board. You can define if the users will be added as regular subscribers or as owners of the board.
mutation {
add_users_to_board (board_id: 123456789, user_ids: [123456, 234567, 345678], kind: owner) {
id
}
}
Arguments for add users to a board
The following arguments define the users added to the board.
Argument | Description |
---|---|
board_id Int! | The board's unique identifier. |
user_ids [Int]! | The user IDs to subscribe to the board. |
kind BoardSubscriberKind | The owner's kind: subscriber or owner. |
Add users to a workspace
Required scope: workspaces:write
This mutation allows you to add users to a workspace. You can define if users will be added as regular subscribers or as owners of the workspace.
mutation {
add_users_to_workspace (workspace_id: 12345678, user_ids: [123456, 654321, 012345], kind: subscriber) {
id
}
}
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YourSuperSecretAPIkey'
},
body: JSON.stringify({
query : "mutation { add_users_to_workspace (workspace_id: 12345678, user_ids: [123456, 654321, 012345], kind: subscriber) { id } }"
})
})
Arguments for add users to a workspace
The following arguments define which users to add to the workspace and their subscription type.
Arguments | Description |
---|---|
workspace_id Int! | The workspace's unique identifier. |
user_ids [Int!] | User IDs to subscribe to the workspace. |
kind WorkspaceSubscriberKind | Kind of subscribers to add: subscriber or owner. |
Delete users from a workspace
Required scope: workspaces:write
Allows you to delete users from a workspace.
mutation {
delete_users_from_workspace (workspace_id: 12345678, user_ids: [123456, 654321, 012345]) {
id
}
}
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YourSuperSecretAPIkey'
},
body: JSON.stringify({
query : "mutation { delete_users_from_workspace (workspace_id: 12345678, user_ids: [123456, 654321, 012345]) { id } }"
})
})
Arguments for delete users from a workspace
The following arguments define which users to remove from the workspace.
Arguments | Description |
---|---|
workspace_id Int! | The workspace's unique identifier. |
user_ids [Int!] | User IDs to delete from the workspace. |
Have questions?
Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.
Don’t forget to search before opening a new topic!
Updated 4 days ago