Thanks to visit codestin.com
Credit goes to developer.monday.com

Workspaces

Learn how to query and update monday workspaces using the platform API

monday.com workspaces are used by teams to manage their accounts by departments, teams, or projects. They contain boards, dashboards, and folders to help you stay organized.

Queries

Get workspaces

  • Required scope: workspaces:read
  • Returns an array containing metadata about one or a collection of workspaces
  • Can be queried directly at the root or nested within a boards query (returns the workspace ID, only requires the boards:read scope)
query {
  workspaces(ids: 1234567) {
    id
    name
    kind
    description
  }
}

Querying the main workspace

Every account has a main workspace, but you typically can't query its details via the API.

However, users will eventually be able to query main workspace details as we complete a multi-product migration over the next few months. This capability will be released gradually, so you may not have access yet. All users will have this capability by the end of the migration.

Here's the expected behavior for both pre-and post-migration:

Pre-migration

If you query the workspaces on your account, the main workspace will not appear in the results because it has a null or -1 ID. You can, however, filter for boards in the main workspace by passing null as the workspace_id.

query {
  boards (workspace_ids: [null], limit:50) {
    name
  }
}

Post-migration

If you query the workspaces on your account, the main workspace will appear in the results with a real id. You can then use that ID to query the main workspace.

Arguments

ArgumentTypeDescriptionEnum Values
ids[ID!]The specific workspace(s) to return.
kindWorkspaceKindThe kind of workspaces to return.closed
open
template
limitIntThe number of workspaces to return. The default is 25.
membership_kindWorkspaceMembershipKindThe type of membership relationship the user has with the workspace.all (returns all workspaces visible to the user)
member (returns only workspaces the user is a member of)
order_byWorkspacesOrderByThe order in which to retrieve your workspaces.created_at
pageIntThe page number to get. Starts at 1.
stateStateThe state of the workspaces you want to filter by. The default is active.active all
archived
deleted
query_paramsWorkspacesQueryInputFilter workspaces by account product kind. Only available in versions 2026-04 and later.account_product_kind:
core
crm
forms
marketing
project_management
service
software
whiteboard

Fields

FieldsTypeDescriptionEnum Values
account_productAccountProductThe account's product that contains the workspace.
created_atDateThe workspace's creation date.
descriptionStringThe workspace's description.
idIDThe workspace's unique identifier.
is_default_workspaceBooleanWhether the workspace is the default workspace of the product or account. Not all accounts can query the main workspace (see more here).
kindWorkspaceKindThe workspace's kind.closed
open
template
nameString!The workspace's name.
owners_subscribers[User]The workspace's owners. The default is 25. Requires users:read scope.
settingsWorkspaceSettingsThe workspace's settings.
stateStateThe workspace's state. The default is active.active
all
archived
deleted
team_owners_subscribers[Team!]The workspace's team owners. The default is 25. Requires teams:read scope.
teams_subscribers[Team]The teams subscribed to the workspace. The default is 25. Requires teams:read scope.
users_subscribers[User]The users subscribed to the workspace. The default is 25. Requires users:read scope.

Mutations

  • Required scope: workspaces:write

Create workspace

Creates a new workspace. Returns Workspace.

mutation {
  create_workspace(
    name:"New Cool Workspace"
    kind: open
    description: "This is a cool description"
    account_product_id: 505616
	) {
    id
    description
  }
}

Arguments

ArgumentsTypeDescriptionEnum Values
account_product_idIDThe unique identifier of the account’s product in which to create the new workspace.
descriptionStringThe new workspace's description.
kindWorkspaceKind!The new workspace's kind.closed open
nameString!The new workspace's name.

Update workspace

Updates a workspace. Returns Workspace.

mutation {
  update_workspace(
    id: 1234567
    attributes: {
      account_product_id: 98765
      name:"Marketing team"
      description: "This workspace is for the marketing team." 
    }
	) {
    id
  }
}

Arguments

ArgumentsTypeDescription
attributesUpdateWorkspaceAttributesInput!The workspace's attributes to update.
idIDThe workspace's unique identifier.

Add teams to workspace

Adds teams to a workspace. Returns [Team].

mutation {
  add_teams_to_workspace(
    workspace_id: 1234567
    team_ids: [
      12345678
      87654321
      56789012
    ]
	) {
    id
  }
}

Arguments

ArgumentsTypeDescriptionEnum Values
kindWorkspaceSubscriberKindThe subscriber's kind.owner
subscriber
team_ids[ID!]!The teams' unique identifiers.
workspace_idID!The workspace's unique identifier.

Add users to workspace

Adds users to a workspace. Returns [User].

mutation {
  add_users_to_workspace(
    workspace_id: 1234567
    user_ids: [
      12345678
      87654321
      56789012
    ]
    kind: subscriber
	) {
    id
  }
}

Arguments

ArgumentsTypeDescriptionEnum Values
kindWorkspaceSubscriberKindThe subscriber's kind.owner
subscriber
user_ids[ID!]!The users' unique identifiers.
workspace_idID!The workspace's unique identifier.

Delete workspace

Deletes a workspace. Returns Workspace.

mutation {
  delete_workspace(workspace_id: 1234567) {
    id
  }
}

Arguments

ArgumentsTypeDescription
workspace_idID!The workspace's unique identifier.

Delete teams from workspace

Deletes teams from a workspace. Returns [Team].

mutation {
  delete_teams_from_workspace(
    workspace_id: 1234567
    team_ids: [
      12345678
      87654321
      56789012
    ]
	) {
    id
  }
}

Arguments

ArgumentsTypeDescription
team_ids[ID!]!The teams' unique identifiers.
workspace_idID!The workspace's unique identifier.

Delete users from workspace

Deletes users from a workspace. Returns [User].

mutation {
  delete_users_from_workspace(
    workspace_id: 1234567
    user_ids: [
      12345678
      87654321
      56789012
    ]
	) {
    id
  }
}

Arguments

ArgumentsTypeDescription
user_ids[ID!]!The users' unique identifiers.
workspace_idID!The workspace's unique identifier.