Create a Workspace

Creating workspaces using the Blue API.


Create a New Workspace

To create a new workspace, you can use the following mutation:

mutation {
  createProject(
    input: {
      name: "YOUR PROJECT NEW NAME"
      companyId: "YOUR ORGANIZATION ID OR SLUG"
      description: "Project description"
      color: "#3B82F6"
      icon: "briefcase"
      category: GENERAL
    }
  ) {
    id
    name
    slug
    description
    color
    icon
    category
  }
}

Remember to include the required headers in your request:

  • X-Bloo-Token-ID: Your API token ID
  • X-Bloo-Token-Secret: Your API token secret
  • X-Bloo-Company-ID: Your organization ID
  • Content-Type: application/json

Response Example

Upon success, the mutation will return the newly created workspace details:

{
  "data": {
    "createProject": {
      "id": "newly-created-project-id",
      "name": "YOUR PROJECT NEW NAME",
      "slug": "your-project-new-name",
      "description": "Project description",
      "color": "#3B82F6",
      "icon": "briefcase",
      "category": "GENERAL"
    }
  }
}

Create from a Template

To create a workspace from an existing template, you can add an optional templateId to the mutation.

mutation {
  createProject(
    input: {
      templateId: "YOUR TEMPLATE ID OR SLUG"
      name: "YOUR PROJECT NEW NAME"
      companyId: "YOUR ORGANIZATION ID OR SLUG"
    }
  ) {
    id
  }
}

Creating a workspace from a template will not create the workspace instantly. Instead, your workspace creation will be queued.

Advanced Example with Template

Here’s a complete example showing all available options when creating from a template:

mutation {
  createProject(
    input: {
      templateId: "marketing-template"
      name: "Q1 Marketing Campaign"
      companyId: "acme-corp"
      description: "Marketing initiatives for Q1 2024"
      color: "#10B981"
      icon: "megaphone"
      category: MARKETING
      coverConfig: { enabled: true, fit: COVER, imageSelectionType: FIRST, source: DESCRIPTION }
    }
  ) {
    id
    name
    slug
    description
    color
    icon
    category
  }
}

The coverConfig parameter currently only works when creating a workspace from a template. For workspaces created from scratch, you’ll need to use the editProject mutation after creation to configure todo cover images.

Check Creation Status

To check the status of your workspace creation in the queue, you can use the following query:

query {
  copyProjectStatus {
    newProjectName
    isTemplate
    isActive
    queuePosition
    totalQueues
  }
}

This query will return the status of your workspace creation in the queue.

Input Parameters

CreateProjectInput

ParameterTypeRequiredDescription
nameString✅ YesThe workspace name. URLs will be stripped from the name.
companyIdString✅ YesThe ID or slug of the organization where the workspace will be created.
descriptionStringNoA description of the workspace.
colorStringNoWorkspace color in hex format (e.g., “#3B82F6”).
iconStringNoIcon identifier for the workspace (e.g., “briefcase”, “rocket”).
categoryProjectCategoryNoWorkspace category. Defaults to GENERAL if not specified.
templateIdStringNoID of an existing workspace to use as a template.
coverConfigTodoCoverConfigInputNoConfiguration for todo cover images (currently only works with template-based creation).

ProjectCategory Values

ValueDescription
CRMCustomer Relationship Management workspaces
CROSS_FUNCTIONALCross-functional team workspaces
CUSTOMER_SUCCESSCustomer success initiatives
DESIGNDesign and creative workspaces
ENGINEERINGEngineering and development workspaces
GENERALGeneral workspaces (default)
HRHuman Resources workspaces
ITInformation Technology workspaces
MARKETINGMarketing campaigns and initiatives
OPERATIONSOperations and logistics workspaces
PRODUCTProduct management workspaces
SALESSales and business development workspaces

TodoCoverConfigInput

If you want to configure how todo cover images work in your workspace, you can provide the coverConfig parameter:

ParameterTypeRequiredDescription
enabledBoolean✅ YesWhether cover images are enabled for todos
fitImageFit✅ YesHow images should fit in the cover area
imageSelectionTypeImageSelectionType✅ YesWhich image to select from available options
sourceImageSource✅ YesWhere to pull images from
sourceIdStringNoSpecific source identifier (e.g., custom field ID)

ImageFit Values: COVER, CONTAIN, FILL, SCALE_DOWN

ImageSelectionType Values: FIRST (first image), LAST (last image)

ImageSource Values: DESCRIPTION (from todo description), COMMENTS (from comments), CUSTOM_FIELD (from a custom field)

Response Fields

The createProject mutation returns a Workspace object with the following available fields:

FieldTypeDescription
idID!Unique identifier for the workspace
nameString!Workspace name
slugString!URL-friendly workspace identifier
descriptionStringWorkspace description
colorStringWorkspace color in hex format
iconStringIcon identifier
categoryProjectCategoryWorkspace category enum value
companyIdString!ID of the organization
createdAtDateTime!Creation timestamp
updatedAtDateTime!Last update timestamp
archivedBoolean!Whether the workspace is archived
isTemplateBoolean!Whether this is a template workspace

Note: You can request any combination of these fields in your response.

Important Notes

  • You must have OWNER, ADMIN, or MEMBER level access to the organization to create workspaces
  • When creating from a template, the template cannot have more than 250,000 todos
  • The creating user is automatically assigned as the workspace OWNER
  • Workspace names are automatically trimmed of whitespace
  • The coverConfig parameter is currently only functional when creating from a template

Error Responses

Organization Not Found

{
  "errors": [
    {
      "message": "Organization not found",
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ]
}

Template Not Found

{
  "errors": [
    {
      "message": "Template not found",
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ]
}

Template Too Large

{
  "errors": [
    {
      "message": "Template cannot have more than 250000 todos",
      "extensions": {
        "code": "VALIDATION_ERROR"
      }
    }
  ]
}

Permission Denied

{
  "errors": [
    {
      "message": "You do not have permission to create projects in this organization",
      "extensions": {
        "code": "FORBIDDEN"
      }
    }
  ]
}