The Blue API allows you to create records in Blue and add data to custom fields at the same time.
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
}
}
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:
Field | Type | Description |
---|---|---|
todoListId | String | The ID of the todo list where the record will be created |
title | String | The title of the record |
position | Integer | The position of the record in the list (default is 65535 for end of list) |
placement | String | The placement of the record in the list (TOP or BOTTOM) |
customFieldId | String | The ID of the custom field to set a value for |
value | String | The 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.