Create a Workspace

Create a new workspace in an organization, optionally seeded from a template, with the createWorkspace mutation.


Use the createWorkspace mutation to create a new workspace. Workspaces are Workspace objects in the API, and live inside an organization (Organization). The user whose token makes the request is automatically added to the new workspace as its OWNER.

Creating a workspace from scratch returns the new Workspace synchronously. Creating one from a template is queued and runs in the background — the mutation returns null, and you poll copyProjectStatus to track progress.

Request

The smallest call provides an organization and a name.

mutation CreateWorkspace {
  createWorkspace(input: { companyId: "company_123", name: "Q1 Marketing Campaign" }) {
    id
    slug
    name
  }
}

Include your authentication headers (header names are case-insensitive):

  • blue-token-id — your API token ID
  • blue-token-secret — your API token secret
  • blue-org-id — your organization ID or slug

companyId accepts either the organization’s ID or its slug.

Parameters

CreateWorkspaceInput

ParameterTypeRequiredDescription
companyIdString!YesID or slug of the organization where the workspace is created.
nameString!YesWorkspace name. Trimmed of surrounding whitespace, limited to 50 characters, and any URLs are stripped out.
descriptionStringNoA description of the workspace.
colorStringNoWorkspace color as a hex string (for example #3B82F6).
iconStringNoIcon identifier for the workspace (for example briefcase).
categoryProjectCategoryNoWorkspace category. Defaults to GENERAL.
templateIdStringNoID or slug of a template workspace to copy. Creation becomes asynchronous when set — see Create from a template.
folderIdStringNoID of a folder to place the new workspace inside. The folder must exist in the same organization.
coverConfigTodoCoverConfigInputNoRecord cover-image configuration. Only applied when creating from a template — see Cover image configuration.

ProjectCategory

ValueDescription
CRMCustomer relationship management
CROSS_FUNCTIONALCross-functional teams
CUSTOMER_SUCCESSCustomer success initiatives
DESIGNDesign and creative work
ENGINEERINGEngineering and development
GENERALGeneral workspaces (default)
HRHuman resources
ITInformation technology
MARKETINGMarketing campaigns and initiatives
OPERATIONSOperations and logistics
PRODUCTProduct management
SALESSales and business development

Response

The mutation returns the newly created Workspace. (The return type is nullable — see Create from a template for the case where it returns null.)

{
  "data": {
    "createWorkspace": {
      "id": "clm4n8qwx000008l0g4oxdqn7",
      "slug": "q1-marketing-campaign",
      "name": "Q1 Marketing Campaign"
    }
  }
}

Returns

createWorkspace returns a Workspace. Common fields:

FieldTypeDescription
idID!Unique identifier for the workspace.
slugString!URL-friendly workspace identifier, derived from the name.
nameString!Workspace name.
descriptionStringWorkspace description.
colorStringWorkspace color in hex format.
iconStringIcon identifier.
categoryProjectCategory!Workspace category.
organizationOrganization!The organization that owns the workspace. Select subfields such as { id slug name }.
folderFolderThe folder the workspace belongs to, if any.
archivedBooleanWhether the workspace is archived.
isTemplateBoolean!Whether this workspace is a template.
createdAtDateTime!Creation timestamp.
updatedAtDateTime!Last-update timestamp.

There is no companyId scalar on Workspace — the organization is exposed as the organization relation. Select organization { id slug name } when you need its identifiers.

Create from a template

Pass a templateId to seed the new workspace from an existing template. This copies the template’s lists, records, custom fields, automations, tags, files, and other content.

mutation CreateFromTemplate {
  createWorkspace(
    input: { companyId: "company_123", name: "Q1 Marketing Campaign", templateId: "project_123" }
  ) {
    id
  }
}
Template creation is asynchronous

When templateId is set, the mutation enqueues a background copy job and returns null — the workspace does not exist yet when the response comes back. Poll copyProjectStatus (below) to learn when it is ready, or subscribe to the copy-progress events in Realtime updates.

Track creation status

Use the copyProjectStatus query to check where your workspace sits in the copy queue.

query WorkspaceCopyStatus {
  copyProjectStatus {
    newProjectName
    isTemplate
    isActive
    queuePosition
    totalQueues
  }
}
{
  "data": {
    "copyProjectStatus": {
      "newProjectName": "Q1 Marketing Campaign",
      "isTemplate": true,
      "isActive": false,
      "queuePosition": 2,
      "totalQueues": 5
    }
  }
}

copyProjectStatus returns a CopyProjectStatus:

FieldTypeDescription
newProjectNameStringName of the workspace being created.
isTemplateBooleanWhether the source is a template.
isActiveBooleanWhether the copy job is currently running.
queuePositionIntPosition of this job in the copy queue.
totalQueuesIntTotal number of copy jobs queued.

Cover image configuration

The coverConfig input controls how record cover images are chosen in the new workspace. It is only applied when creating from a template; for workspaces created from scratch, configure cover images afterward with Rename / edit a workspace.

mutation CreateWithCoverConfig {
  createWorkspace(
    input: {
      companyId: "company_123"
      name: "Q1 Marketing Campaign"
      templateId: "project_123"
      description: "Marketing initiatives for Q1"
      color: "#10B981"
      icon: "megaphone"
      category: MARKETING
      coverConfig: { enabled: true, fit: COVER, imageSelectionType: FIRST, source: DESCRIPTION }
    }
  ) {
    id
  }
}

TodoCoverConfigInput

ParameterTypeRequiredDescription
enabledBoolean!YesWhether record cover images are enabled.
fitImageFit!YesHow the image fits the cover area.
imageSelectionTypeImageSelectionType!YesWhich image to use when several are available.
sourceImageSource!YesWhere to pull the cover image from.
sourceIdStringNoSource identifier (for example a custom field ID) when source is CUSTOM_FIELD.
  • ImageFitCOVER, CONTAIN, FILL, SCALE_DOWN
  • ImageSelectionTypeFIRST, LAST
  • ImageSourceDESCRIPTION, COMMENTS, CUSTOM_FIELD

Errors

CodeWhen
FORBIDDENThe caller is not OWNER, ADMIN, or MEMBER of the organization.
COMPANY_NOT_FOUNDNo organization matches the supplied companyId.
PROJECT_NOT_FOUNDThe templateId does not resolve to a template you can access.
CREATE_PROJECT_LIMITThe template contains more than 250,000 records and cannot be copied.
BAD_USER_INPUTname is missing or longer than 50 characters, or folderId does not match a folder in the organization.
{
  "errors": [
    {
      "message": "Company was not found.",
      "extensions": { "code": "COMPANY_NOT_FOUND" }
    }
  ]
}

A plan limit on the number of workspaces (or, for template copies, the number of records) is reported separately with an upgrade-oriented payload rather than one of the codes above.

Permissions

You must be an OWNER, ADMIN, or MEMBER of the organization to create a workspace. The creating user is added to the new workspace as its OWNER.