Creating projects using the Blue API.


Create a New Project

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

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

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 company ID
- `Content-Type: application/json`

Response Example

Upon success, the mutation will return the newly created project 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 project 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 COMPANY ID OR SLUG"
    }
  ) {
    id
  }
}
Creating a project from a template will not create the project instantly. Instead, your project 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
  }
}
icon: warning
The `coverConfig` parameter currently only works when creating a project from a template. For projects 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 project 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 project creation in the queue.

Input Parameters

CreateProjectInput

Parameter Type Required Description
name String ✅ Yes The project name. URLs will be stripped from the name.
companyId String ✅ Yes The ID or slug of the company where the project will be created.
description String No A description of the project.
color String No Project color in hex format (e.g., "#3B82F6").
icon String No Icon identifier for the project (e.g., "briefcase", "rocket").
category ProjectCategory No Project category. Defaults to GENERAL if not specified.
templateId String No ID of an existing project to use as a template.
coverConfig TodoCoverConfigInput No Configuration for todo cover images (currently only works with template-based creation).

ProjectCategory Values

Value Description
CRM Customer Relationship Management projects
CROSS_FUNCTIONAL Cross-functional team projects
CUSTOMER_SUCCESS Customer success initiatives
DESIGN Design and creative projects
ENGINEERING Engineering and development projects
GENERAL General projects (default)
HR Human Resources projects
IT Information Technology projects
MARKETING Marketing campaigns and initiatives
OPERATIONS Operations and logistics projects
PRODUCT Product management projects
SALES Sales and business development projects

TodoCoverConfigInput

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

Parameter Type Required Description
enabled Boolean ✅ Yes Whether cover images are enabled for todos
fit ImageFit ✅ Yes How images should fit in the cover area
imageSelectionType ImageSelectionType ✅ Yes Which image to select from available options
source ImageSource ✅ Yes Where to pull images from
sourceId String No Specific 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 Project object with the following available fields:

Field Type Description
id ID! Unique identifier for the project
name String! Project name
slug String! URL-friendly project identifier
description String Project description
color String Project color in hex format
icon String Icon identifier
category ProjectCategory Project category enum value
companyId String! ID of the company
createdAt DateTime! Creation timestamp
updatedAt DateTime! Last update timestamp
archived Boolean! Whether the project is archived
isTemplate Boolean! Whether this is a template project

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 company to create projects
  • When creating from a template, the template cannot have more than 250,000 todos
  • The creating user is automatically assigned as the project OWNER
  • Project names are automatically trimmed of whitespace
  • The coverConfig parameter is currently only functional when creating from a template

Error Responses

Company Not Found

{
  "errors": [{
    "message": "Company 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 company",
    "extensions": {
      "code": "FORBIDDEN"
    }
  }]
}

AI Assistant

Responses are generated using AI and may contain mistakes.

How can I help you?

Ask me anything about Blue or this documentation.

Enter to send • Shift+Enter for new line • ⌘I to open