API Docs

Create a Record

How to create a record in Blue using the API.

The Blue API allows you to create records in Blue and add data to custom fields at the same time.

Simple Example

To create a record in Blue with just a title and a list, you can use the following mutation:

mutation CreateRecord {
  createTodo(
    input: {
      todoListId:"TODOLISTID",
      title: "Test",
      position: 65535
    }
  ) {
    id
    title
    position
  }
}

Advanced Example

To create a record with a title, list, and custom fields, you can use the following mutation. Note that you will have to use the list custom fields query to get the custom field IDs first that you want to add to the record.

mutation CreateTodoWithCustomField {
  createTodo(
    input: {
      todoListId: "TODOLISTID"
      title: "Backlog"
      placement: TOP  // or BOTTOM
      customFields: [
        {
          customFieldId: "cm4m651p1000tov26g7pjz3mt"
          value: "2025-01-22"
        }
        {
          customFieldId: "cm4m651p1000tov26g7pjz3mt"
          value: "2025-01-21 03:45 PM, 2025-01-22 05:00 PM"
        }
        {
          customFieldId: "cm6671mfz0008n5weztls6vkw"
          value: "[email protected]"
        }
        {
          customFieldId: "cm6674tjc000kn5nsfrvr2kyg"
          value: "+1234567890"
        }
      ]
    }
  ) {
    id
    title
    position
  }
}

Here's a table explaining the input fields for creating a record:

FieldTypeDescription
todoListIdStringThe ID of the todo list where the record will be created
titleStringThe title of the record
positionIntegerThe position of the record in the list (default is 65535 for end of list)
placementStringThe placement of the record in the list (TOP or BOTTOM)
customFieldIdStringThe ID of the custom field to set a value for
valueStringThe value to set for the custom field

Note: The position and placement fields can be optionally included to specify the record's placement in the list.