Learn how to read, create, update, and delete monday.com board views using the platform API
monday.com board views allow you to visualize your board data differently through colors, shapes, and graphs.
Queries
Get views
- Returns an array containing metadata about a collection of board views
- Must be nested inside a
boardsquery
query {
boards(
ids: [1234567890]
) {
views {
type
settings_str
view_specific_data_str
name
id
}
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = `query ($board: [ID!]) { boards (ids: $board) { views { id name type } } }`
const variables = {
board: 1234567
}
const response = await mondayApiClient.request(query, variables);Arguments
| Argument | Type | Description |
|---|---|---|
| ids | [ID!] | The specific board IDs to return views for. |
| type | String | The specific type of views to return. |
Fields
| Field | Type | Description | Enum Values |
|---|---|---|---|
| access_level | BoardViewAccessLevel! | The user's board view access level. | editview |
| filter | JSON | The view's filter metadata. | |
| filter_team_id | Int | The team ID the view is filtered by. | |
| filter_user_id | Int | The user ID the view is filtered by. | |
| id | ID! | The view's unique identifier. | |
| name | String! | The view's name. | |
| settings | JSON | The view's settings. The structure varies by view type. | |
| settings_str | String! | The view's settings. | |
| sort | JSON | The view's sort metadata. | |
| source_view_id | ID | The unique identifier of the original view this was duplicated from (if applicable). | |
| tags | [String!] | The view's tags. | |
| type | String! | The view's type. | |
| view_specific_data_str | String! | Specific board view data (only supported for forms). |
Mutations
Required scope:boards:write
Create view
Creates a new board view. Returns BoardView.
mutation {
create_view(
board_id: 1234567890
type: APP
name: "My app view"
settings: {
app_feature_id: 54321
}
) {
id
name
}
}{
"data": {
"create_view": {
"id": "9876543210",
"name": "My app view"
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Arguments
| Argument | Type | Description | Enum Values |
|---|---|---|---|
| board_id | ID! | The board's unique identifier. | |
| filter | ItemsQueryGroup | The view's filters. | |
| filter_user_id | ID | The user ID to filter by. | |
| filter_team_id | ID | The team ID to filter by. | |
| name | String | The view's name. | |
| settings | JSON | The view's type-specific configuration settings. Query get_view_schema_by_type to see available properties. | |
| sort | [ItemsQueryOrderBy!] | The view's sort order. | |
| tags | [String!] | The view's tags. | |
| type | ViewKind! | The type of view to create. | APPDASHBOARDFORMTABLE |
Create view table
Creates a new table board view. Returns BoardView.
mutation {
create_view_table(
board_id: 1234567890
name: "My new table view"
) {
id
name
}
} {
"data": {
"create_view_table": {
"id": "9876543210",
"name": "My new table view"
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Arguments
| Argument | Type | Description |
|---|---|---|
| board_id | ID! | The board's unique identifier. |
| filter | ItemsQueryGroup | The table view's filters. |
| filter_user_id | ID | The user ID to filter by. |
| filter_team_id | ID | The team ID to filter by. |
| name | String | The table view's name. |
| settings | TableViewSettingsInput | The table view's configuration settings. |
| sort | [ItemsQueryOrderBy!] | The table view's sort order. |
| tags | [String!] | The table view's tags. |
Update view
Updates a board view. Returns BoardView.
mutation {
update_view(
board_id: 1234567890
view_id: 54321
sort: {
column_id: "name"
direction: asc
}
type:TABLE
) {
id
sort
}
}{
"data": {
"update_view": {
"id": "54321",
"sort": [
{
"column_id": "name",
"direction": "ASC"
}
]
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Arguments
| Argument | Type | Description | Enum Values |
|---|---|---|---|
| board_id | ID! | The board's unique identifier. | |
| filter | ItemsQueryGroup | The view's filters. | |
| filter_user_id | ID | The user ID to filter by. | |
| filter_team_id | ID | The team ID to filter by. | |
| name | String | The view's name. | |
| settings | JSON | The view's type-specific configuration settings. Query get_view_schema_by_type to see available properties. | |
| sort | [ItemsQueryOrderBy!] | The view's sort order. | |
| tags | [String!] | The view's tags. | |
| type | ViewKind! | The view's type. | APPDASHBOARDFORMTABLE |
| view_id | ID! | The view's unique identifier. |
Update view table
Updates a table board view. Returns BoardView.
mutation {
update_view_table(
board_id: 1234567890
view_id: 54321
settings: {
columns:{
column_properties:{
column_id:"date",
visible: false
}
}
}
) {
id
sort
}
}Arguments
| Argument | Type | Description |
|---|---|---|
| board_id | ID! | The board's unique identifier. |
| filter | ItemsQueryGroup | The table view's filters. |
| filter_user_id | ID | The user ID to filter by. |
| filter_team_id | ID | The team ID to filter by. |
| name | String | The table view's name. |
| settings | TableViewSettingsInput | The table view's configuration settings. |
| sort | [ItemsQueryOrderBy!] | The table view's sort order. |
| tags | [String!] | The table view's tags. |
| view_id | ID! | The view's unique identifier. |
Delete view
Deletes a board view. Returns BoardView.
mutation {
delete_view(
board_id: 1234567890
view_id: 54321
) {
name
}
}{
"data": {
"delete_view": {
"name": "Deleted Form"
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Arguments
| Argument | Type | Description |
|---|---|---|
| board_id | ID! | The board's unique identifier. |
| view_id | ID! | The view's unique identifier. |
