Teams
Teams are the most efficient way to manage groups of users in monday.com. Teams are comprised of one or multiple users, and every user can be a part of multiple teams (or none).
As a developer working with monday.com, it is important to familiarize yourself with the teams
API so you know how to access team data. This document will walk you through the available queries and mutations to read and modify the teams
object via the API.
Queries
Required scope: teams:read
Querying teams
will return metadata about one or several teams. This method accepts one argument and returns an array.
You can query teams
directly at the root, or you can nest it within a users
query to return the teams a specific user is part of. Please note that nesting your query will increase its complexity.
query {
teams {
name
picture_url
users {
created_at
phone
}
}
}
let query = "query { teams { name picture_url users { created_at phone } } }";
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)));
Arguments
You can use the following argument(s) to reduce the number of results returned in your teams
query.
Argument | Description |
---|---|
ids [Int] | The unique identifiers of the specific teams to return. |
Fields
You can use the following field(s) to specify what information your teams
query will return. Please note that some fields will have their own arguments.
Field | Description | Supported arguments |
---|---|---|
id Int! | The team's unique identifier. | |
name String! | The team's name. | |
picture_url String | The team's picture URL. | |
users [User] | The team's users. | emails [String] ids [Int] kind UserKind limit Int name String newest_first Boolean non_active Boolean page Int |
Mutations
Add teams to a board
Required scope: boards:write
The add_teams_to_board
mutation allows you to add teams to a board via the API. You can also specify what fields to query back when you run the mutation.
mutation {
add_teams_to_board (board_id: 1234567890, team_ids: [654321, 123456]) {
id
}
}
let query = 'mutation { add_teams_to_board (board_id: 1234567890, team_ids: [654321,123456]) { id } }';
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)));
Arguments
You can use the following argument(s) to define which teams to add to the board.
Argument | Description |
---|---|
board_id Int! | The board's unique identifier. |
team_ids [Int]! | The unique identifiers of the teams to add to the board. |
Add teams to a workspace
Required scope: workspaces:write
The add_teams_to_workspace
mutation allows you to add teams to a workspace via the API. You can also specify what fields to query back when you run the mutation.
mutation {
add_teams_to_workspace (workspace_id: 1234567, team_ids: [123456, 654321, 012345]) {
id
}
}
let query = 'mutation { add_teams_to_workspace (workspace_id: 1234567, team_ids: [123456, 654321, 012345]) { id } }';
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)));
Arguments
You can use the following argument(s) to define which teams to add to the workspace.
Arguments | Description |
---|---|
team_ids [Int!] | The unique identifiers of the teams to add to the workspace. |
workspace_id Int! | The workspace's unique identifier. |
Delete teams from a workspace
Required scope: workspaces:write
The delete_teams_from_workspace
mutation allows you to delete teams from a workspace via the API. You can also specify what fields to query back when you run the mutation.
mutation {
delete_teams_from_workspace (workspace_id: 1234567, team_ids: [123456, 654321, 012345]) {
id
}
}
let query = 'mutation { delete_teams_from_workspace (workspace_id: 1234567, team_ids: [123456, 654321, 012345]) { id } }';
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)));
Arguments
You can use the following argument(s) to define which teams to delete from the workspace.
Arguments | Description |
---|---|
team_ids [Int]! | The unique identifiers of the teams to delete from the workspace. |
workspace_id Int! | The workspace's unique identifier. |
Join our developer community!
We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎
Updated 29 days ago