Create or change an own style
Create or change one of the brewer's own beer styles (the BJCP library itself is read-only). Three ways: (1) style given: change that own style, only the fields you send; (2) from_library: copy a BJCP 2021 style (e.g. "21A") as an own style, then apply the fields you send; (3) neither: create a new style (name required). Ranges: og/fg in SG (e.g. og_min_sg 1.056), ibu, color in SRM (or EBC with color_unit "ebc"), abv in %. null clears a value. Returns the saved style with its ranges. Scope: `styles:write` (or `write`).
Create or change one of the brewer's own beer styles (the BJCP library itself is read-only). Three ways: (1) style given: change that own style, only the fields you send; (2) from_library: copy a BJCP 2021 style (e.g. "21A") as an own style, then apply the fields you send; (3) neither: create a new style (name required). Ranges: og/fg in SG (e.g. og_min_sg 1.056), ibu, color in SRM (or EBC with color_unit "ebc"), abv in %. null clears a value. Returns the saved style with its ranges.
Scope: styles: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: styles:write
Request Body
application/json
Change this own style. One of the brewer's own styles: its id or its exact name (e.g. "My Hazy IPA"). Case does not matter. Use find_styles { source: "mine" } to see them. Omit to create one.
Create an own copy of this BJCP 2021 library style: style number or exact name, e.g. "21A" or "American IPA".
Style name. Required for a brand-new style. Example: "House Pale Ale".
1 <= length <= 100Style number, e.g. "21A" (optional).
Category, e.g. "IPA" (optional).
Description text (optional).
Minimum original gravity in SG, e.g. 1.050.
Maximum original gravity in SG, e.g. 1.065.
Minimum final gravity in SG, e.g. 1.008.
Maximum final gravity in SG, e.g. 1.014.
Minimum bitterness in IBU, e.g. 40.
Maximum bitterness in IBU, e.g. 70.
Minimum color in color_unit (SRM by default), e.g. 6.
Maximum color in color_unit (SRM by default), e.g. 14.
Unit of color_min / color_max: "srm" (default) or "ebc".
"srm" | "ebc"Minimum alcohol in % ABV, e.g. 5.5.
Maximum alcohol in % ABV, e.g. 7.5.
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_style" \ -H "Content-Type: application/json" \ -d '{}'{
"saved": "created",
"style": {
"id": "string",
"source": "library",
"name": "string",
"number": "string",
"category": "string",
"guidelines": "string",
"og_sg": [
0,
0
],
"fg_sg": [
0,
0
],
"ibu": [
0,
0
],
"color_ebc": [
0,
0
],
"color_srm": [
0,
0
],
"abv_pct": [
0,
0
],
"description": "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": {}
}
}