BrewForge Docs

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`).

POST
/api/v1/actions/save_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).

AuthorizationBearer <token>

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 brews
  • brews:write: Create, update, delete brews and notes
  • inventory:read: List inventory items
  • inventory:write: Create, update, delete inventory items
  • equipment:read: List equipment profiles
  • equipment:write: Create, update, delete equipment profiles
  • styles:read: List style profiles
  • styles:write: Create, update, delete style profiles
  • profiles:read: List mash, fermentation, and water profiles
  • custom-fields:read: List custom field definitions
  • custom-fields:write: Create, update, delete custom field definitions
  • profiles:write: Create, update, delete mash, fermentation, and water profiles
  • cellar:read: View cellar, packaged stock, tap lists, and labels
  • cellar:write: Manage cellar, packaging, stock, tap lists, and labels
  • settings:read: View preferences, imports, calculators, and your data export
  • settings:write: Change preferences and undo imports
  • community:read: View community, feedback, tickets, inbox, and account overview
  • community:write: Post, vote, and reply in community, feedback, and tickets

In: header

Scope: styles:write

Request Body

application/json

style?string

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.

from_library?string

Create an own copy of this BJCP 2021 library style: style number or exact name, e.g. "21A" or "American IPA".

name?string

Style name. Required for a brand-new style. Example: "House Pale Ale".

Length1 <= length <= 100
number?|

Style number, e.g. "21A" (optional).

category?|

Category, e.g. "IPA" (optional).

description?|

Description text (optional).

og_min_sg?|

Minimum original gravity in SG, e.g. 1.050.

og_max_sg?|

Maximum original gravity in SG, e.g. 1.065.

fg_min_sg?|

Minimum final gravity in SG, e.g. 1.008.

fg_max_sg?|

Maximum final gravity in SG, e.g. 1.014.

ibu_min?|

Minimum bitterness in IBU, e.g. 40.

ibu_max?|

Maximum bitterness in IBU, e.g. 70.

color_min?|

Minimum color in color_unit (SRM by default), e.g. 6.

color_max?|

Maximum color in color_unit (SRM by default), e.g. 14.

color_unit?string

Unit of color_min / color_max: "srm" (default) or "ebc".

Value in"srm" | "ebc"
abv_min_pct?|

Minimum alcohol in % ABV, e.g. 5.5.

abv_max_pct?|

Maximum alcohol in % ABV, e.g. 7.5.

[key: string]?never

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": {}
  }
}