Docs
Workdocs serve as a central place for teams to plan and execute work in a collaborative format. They are like virtual whiteboards that allow you to jot down notes, create charts, and populate items on a board from the text you type.
Docs allow teams to collaborate in real time without overwriting each other's work. Users can even implement built-in features like widgets, templates, and apps to enhance their docs. Check out this article to learn more about the workdocs product!
Docs queries
Required scope: docs:read
You can only use docs at the root of your query. It cannot be nested within another query. Querying docs will return a collection of docs.
query {
docs (ids: 123456789, limit: 1) {
id
object_id
settings
created_by {
id
name
}
}
let query = "query { docs (ids: 123456789, limit: 1) { id object_id created_by { id name }} settings }";
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YourSuperSecretAPIkey'
},
body: JSON.stringify({
query : query
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
Arguments
These arguments can reduce the number of docs returned.
Argument | Description |
---|---|
ids [Int] | The specific docs to return. |
limit Int | The number of docs to get. The default is 25. |
page Int | The page number to return. Starts at 1. |
order_by DocsOrderBy | The order in which to retrieve your boards: created_at or used_at. The default shows created_at with the newest docs listed first. This argument will not be applied if you query docs by specific ids . |
workspace_ids [Int] | A list of workspace ids that contain the docs. |
Fields
Fields are used to return specific properties in an object. The following fields will determine what information is returned from your docs query.
Field | Description | Supported arguments |
---|---|---|
blocks [DocumentBlock] | The document's content blocks. You can read more information about blocks here. | limit Int page Int |
created_at Date | The document's creation date. | |
created_by User | The document's creator. | |
id Int! | The document's unique identifier. | |
name String! | The document's name. | |
object_id Int! | The associated board or object's unique identifier. | |
doc_folder_id Int | The unique identifier of the folder that contains the doc. | |
workspace_id Int | The unique identifier of the workspace that contains the doc. Returns null for the main workspace. | |
workspace Workspace | The workspace that contains this document. Returns null for the main workspace. | |
url String | The document's direct URL. | |
relative_url String | The document's relative URL. | |
doc_kind BoardKind! | The document's kind: public, private, or share. | |
settings JSON | The document's settings. |
Settings field
The settings
field returns document-level settings. You can view a sample payload below, but keep in mind that the API will return payloads in a slightly different format using escaped JSON.
{
"fontSize": "small", // "small", "normal", or "large"
"hasTitle": true, // true or false
"coverPhoto": {
"isEnabled": true, // true or false
"imageUrl": "",
"fromTop": 0
},
"fontFamily": "Serif", // "Serif", "Mono", or "Default"
"isPageLayout": true, // true or false
"backgroundColor": "var(--color-sofia_pink-selected)",
"isFullWidthMode": false, // true or false
"backgroundPattern": null, // "sticky-note", "notepad", or "cubes-notepad"
"showTableOfContent": true // true or false
}
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