manage columns (hide or show, check if hidden) using API

I try to find for a column, using API how to:

  1. check if the column is hidden

  2. change it to hidden or the opposite

Hey, Im not an expert in this short answer: there isn’t a column.is_hidden field in the monday.com API. “Hidden” is a per-view setting (e.g., the Table view), so you read and update the view’s settings_str JSON.

How to check if a column is hidden

  1. Get the board’s Table view and its settings_str:

query ($boardId: [Int]) {
boards(ids: $boardId) {
id
views {
id
name
type # look for type: “table”
settings_str
}
}
}

  1. Parse settings_str (JSON). A column is considered hidden if its ID appears in one of the visibility fields. Depending on your account/version, you’ll typically see one of these shapes:
  • hidden_columns: an array of column IDs to hide

  • columns_visibility: an object map of columnId → true/false

  • columns[columnId].hidden: true/false

Example check (pseudocode):
const s = JSON.parse(settings_str || “{}”);
const isHidden =
(Array.isArray(s.hidden_columns) && s.hidden_columns.includes(columnId)) ||
(s.columns_visibility && s.columns_visibility[columnId] === false) ||
(s.columns && s.columns[columnId]?.hidden === true);

How to hide/unhide a column

  1. Read the current settings_str (as above) and parse it.

  2. Modify only the relevant visibility field, keeping all other settings intact. For example:

  • To hide: add the columnId to hidden_columns (or set columns_visibility[columnId] = false).

  • To unhide: remove the columnId from hidden_columns (or set columns_visibility[columnId] = true).

  1. Send the updated JSON back using update_board_view:

mutation ($boardId: Int!, $viewId: Int!, $settings_str: String!) {
update_board_view(
board_id: $boardId,
view_id: $viewId,
view_data: { settings_str: $settings_str }
) {
id
settings_str
}
}

Notes and tips

  • Hiding is per view. If the board has multiple views, you must update the specific view where you want the column hidden/unhidden (commonly the view with type “table” and name like “Main Table”).

  • Always fetch and merge the existing settings_str to avoid overwriting other users’ settings (column order, widths, filters, etc.).

  • Some columns may be required/behave specially in certain views.

  • The exact shape of settings_str is not formally documented and can vary; inspect your current settings_str to see which visibility field your account uses.