Skip to main content

Field Mutations

The Field API provides mutations to manage custom fields for your posts.

Create Field

Create a new custom field.

Mutation Structure

mutation CreateField(
$boardId: String!
$id: String
$allowUrlPrefill: Boolean
$label: String!
$description: String
$isRequired: Boolean
$locations: [String!]
$options: [FieldOptionInput]
$type: FieldType!
$visibility: FieldVisibility
) {
createField(
boardId: $boardId
id: $id
allowUrlPrefill: $allowUrlPrefill
label: $label
description: $description
isRequired: $isRequired
locations: $locations
options: $options
type: $type
visibility: $visibility
) {
node {
id
label
type
isRequired
visibility
options {
id
name
color
}
}
}
}

Input Fields

FieldTypeDescription
boardIdString!ID of the board to create the field in
idStringOptional custom ID for the field
allowUrlPrefillBooleanWhether the field can be pre-filled via URL parameters
labelString!Display label for the field
descriptionStringOptional description of the field
isRequiredBooleanWhether the field is required
locations[String!]Where the field should be displayed
options[FieldOptionInput]Options for SELECTION and SELECTION_MULTI fields
typeFieldType!Type of the field
visibilityFieldVisibilityVisibility setting for the field

Update Field

Update an existing field.

Mutation Structure

mutation UpdateField(
$id: String!
$allowUrlPrefill: Boolean
$label: String
$description: String
$isRequired: Boolean
$locations: [String!]
$options: [FieldOptionInput]
$postId: String
$type: FieldType
$visibility: FieldVisibility
) {
updateField(
id: $id
allowUrlPrefill: $allowUrlPrefill
label: $label
description: $description
isRequired: $isRequired
locations: $locations
options: $options
postId: $postId
type: $type
visibility: $visibility
) {
node {
id
label
type
isRequired
visibility
options {
id
name
color
}
}
}
}

Input Fields

FieldTypeDescription
idString!ID of the field to update
allowUrlPrefillBooleanWhether the field can be pre-filled via URL parameters
labelStringNew display label for the field
descriptionStringNew description of the field
isRequiredBooleanWhether the field is required
locations[String!]New locations where the field should be displayed
options[FieldOptionInput]New options for SELECTION and SELECTION_MULTI fields
postIdStringOptional post ID for field updates in post context
typeFieldTypeNew type for the field
visibilityFieldVisibilityNew visibility setting for the field

Delete Field

Delete an existing field.

Mutation Structure

mutation DeleteField($id: String!) {
deleteField(id: $id) {
node {
id
}
}
}

Input Fields

FieldTypeDescription
idString!ID of the field to delete

Update Field Location

Update a field's location settings.

Mutation Structure

mutation UpdateFieldLocation(
$id: String!
$location: FieldLocation!
$isEnabled: Boolean!
) {
updateFieldLocation(
id: $id
location: $location
isEnabled: $isEnabled
) {
node {
id
locations
}
}
}

Input Fields

FieldTypeDescription
idString!ID of the field
locationFieldLocation!Location to update (NEW_POST, POST, or POST_LIST)
isEnabledBoolean!Whether the field should be enabled in this location

Error Handling

Authentication Errors

  • Invalid API Key: Returned when the API key is missing or invalid
  • Insufficient Permissions: Returned when the user lacks write access to the board
  • Write Access Required: Returned when using a read-only API key

Resource Errors

  • Field Not Found: Returned when updating/deleting a non-existent field
  • Board Not Found: Returned when the board ID is invalid

Example Error Response

{
"errors": [
{
"message": "Field not found",
"extensions": {
"code": "NOT_FOUND",
"field": "id"
}
}
]
}