Updates
monday.com updates contain additional notes and information added to items outside of their columns. The main form of communication within the platform takes place in the updates section.
Updates queries
Required scope: updates:read
You can use updates at the root of your query or nest them within another query. Querying updates directly returns all updates across an account.
You can also nest updates within a board query to return all updates from a specific board.
query {
updates (limit: 100) {
body
id
created_at
creator {
name
id
}
}
}
let query = "query {updates (limit: 100) { body id created_at creator { name 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
The following arguments can reduce the number of updates returned.
Argument | Description |
---|---|
limit Int | The number of updates to get, the default is 25. |
page Int | Page number to get, starting at 1. |
Fields
Fields are used to return specific properties in an object. The following fields will determine what information is returned from your updates queries.
Field | Description | Supported fields |
---|---|---|
assets [Asset] | The update's assets/files. | |
body String! | The update's HTML-formatted body. | |
created_at Date | The update's creation date. | |
creator User | The update's creator. | |
creator_id String | The unique identifier of the user who created the update. | |
id ID! | The update's identifier. | |
item_id String | The update's item ID. | |
replies [Reply] | The update's replies. | id Int creator_id Int creator JSON created_at Date text_body String updated_at Date body String |
text_body String | The update's text body. | |
updated_at Date | The update's last edit date. |
NOTE
At this time, querying updates will return them in descending order, from the most recently created update to the "oldest" update. The maximum amount of updates that can be retrieved via API is 10,000.
Updates mutations
Required scope: updates:write
Create an update
The create_update()
mutation allows one to add an update to an item. After the mutation runs, you can query back the update data as shown in the querying updates section above.
mutation {
create_update (item_id: 20178755, body: "This update will be added to the item") {
id
}
}
let query = "mutation {create_update (item_id: 1215034944, body: \"This update will be added to the item\") { 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)));
You can find the Postman request to create an update here.
Arguments for create an update
The following arguments define the new update's characteristics.
Argument | Description |
---|---|
body String! | The update's text. |
item_id Int | The item's unique identifier. |
parent_id Int | The parent update identifier. This can be used to create a reply to an update. |
Delete an update
The delete_update()
mutation allows you to delete an update of an item. After the mutation runs you can query back the remaining updates data as shown in the querying updates section above.
mutation {
delete_update (id: 20178755) {
id
}
}
let query = "mutation { delete_update (id: 988712387) { 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 for delete an update
The following argument determines which update to delete.
Argument | Description |
---|---|
id Int! | The update's unique identifier. |
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 5 days ago