Create, change or archive a custom field
Create a custom field definition (omit field) or change one (field = its key, name or id). Brew fields (scope "brew", default) need a placement: the brew page section they appear in. Brew note fields (scope "brew_note") have no placement. Type and scope are fixed after creation. archived: true hides a field in the app (values stay), false restores it; delete it for good with delete_custom_field. Example: {"name": "Mash pH", "type": "number", "placement": "brew_day", "unit": "pH"}. Values on brews are set with the brewing tools. Scope: `custom-fields:write` (or `write`).
Create a custom field definition (omit field) or change one (field = its key, name or id). Brew fields (scope "brew", default) need a placement: the brew page section they appear in. Brew note fields (scope "brew_note") have no placement. Type and scope are fixed after creation. archived: true hides a field in the app (values stay), false restores it; delete it for good with delete_custom_field. Example: {"name": "Mash pH", "type": "number", "placement": "brew_day", "unit": "pH"}. Values on brews are set with the brewing tools.
Scope: custom-fields:write (or write).
API token in format: bfk_. Each operation lists the token scope it requires (the scopes are listed below).
read: Read everything (all areas)write: Create, change and delete everything (all areas)brews:read: List and view brewsbrews:write: Create, update, delete brews and notesinventory:read: List inventory itemsinventory:write: Create, update, delete inventory itemsequipment:read: List equipment profilesequipment:write: Create, update, delete equipment profilesstyles:read: List style profilesstyles:write: Create, update, delete style profilesprofiles:read: List mash, fermentation, and water profilescustom-fields:read: List custom field definitionscustom-fields:write: Create, update, delete custom field definitionsprofiles:write: Create, update, delete mash, fermentation, and water profilescellar:read: View cellar, packaged stock, tap lists, and labelscellar:write: Manage cellar, packaging, stock, tap lists, and labelssettings:read: View preferences, imports, calculators, and your data exportsettings:write: Change preferences and undo importscommunity:read: View community, feedback, tickets, inbox, and account overviewcommunity:write: Post, vote, and reply in community, feedback, and tickets
In: header
Scope: custom-fields:write
Request Body
application/json
Change this field. The custom field: its id, key (e.g. "mash-ph") or exact name (e.g. "Mash pH"). Case does not matter. list_custom_fields shows them. Omit to create a new one.
Label shown in the app. Required when creating. Example: "Mash pH".
1 <= length <= 50New fields only: stable key (lowercase, digits, dashes), e.g. "mash-ph". Default: made from the name.
New fields only: "text", "number", "integer", "date", "time", "datetime", "boolean", "select" or "url". Default "text".
"text" | "number" | "integer" | "date" | "time" | "datetime" | "boolean" | "select" | "url"New fields only: "brew" (a value per brew, default) or "brew_note" (a value per brew note).
"brew" | "brew_note"Brew fields: page section, "brew_details", "brew_day", "fermentation", "packaging" or "tasting". Required for new brew fields.
"brew_details" | "brew_day" | "fermentation" | "packaging" | "tasting"Select fields: the options, 2-20. Example: ["clear", "hazy", "murky"].
2 <= items <= 20Unit label for number fields, e.g. "pH" or "g/L"; null clears it.
Hint text shown in the empty input; null clears it.
Pre-filled value for new brews, matching the type (e.g. 5.4, true, "clear"); null clears it.
Help text; null clears it.
true: the app asks for a value.
Position within its section, 0 first.
0 <= valueExisting fields: true archives (hides) it, false restores it.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://brewforge.sh/api/v1/actions/save_custom_field" \ -H "Content-Type: application/json" \ -d '{}'{
"saved": "created",
"field": {
"id": "string",
"key": "string",
"name": "string",
"type": "string",
"scope": "string",
"placement": "string",
"choices": [
"string"
],
"unit": "string",
"placeholder": "string",
"default_value": "string",
"description": "string",
"required": true,
"display_order": 0,
"archived": true,
"archived_at": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}{
"error": {
"code": "string",
"message": "string",
"hint": "string",
"candidates": [
{
"id": "string",
"name": "string"
}
],
"fields": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"details": {}
}
}