BrewForge Docs

Create, edit or copy a label template

Creates or changes a bottle/cap label template. Omit template to create (name; size default 19×19 mm round with the beer name and style). Pass template (id or name) to change only the given fields; elements replaces all elements. duplicate: true copies the template (name = the copy's name). Sizes in mm (5-100); text elements use placeholders like {{name}} that print each brew's values (see get_labels). Needs the plan feature `labels`. Scope: `cellar:write` (or `write`).

POST
/api/v1/actions/save_label_template

Creates or changes a bottle/cap label template. Omit template to create (name; size default 19×19 mm round with the beer name and style). Pass template (id or name) to change only the given fields; elements replaces all elements. duplicate: true copies the template (name = the copy's name). Sizes in mm (5-100); text elements use placeholders like {{name}} that print each brew's values (see get_labels).

Needs the plan feature labels. Scope: cellar: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: cellar:write

Request Body

application/json

template?string

Change (or with duplicate, copy) this template: id or exact name. Omit to create.

duplicate?boolean

true = copy template instead of changing it.

name?string

Name, e.g. "Crown cap 26 mm". Required to create.

Length1 <= length <= 100
width_mm?number

Label width in mm, e.g. 26.

Range5 <= value <= 100
height_mm?number

Label height in mm.

Range5 <= value <= 100
shape?string

round (caps) or rectangle.

Value in"round" | "rectangle"
elements?array<>

All elements of the label, e.g. [{"id":"1","content":"{{name}}","x":13,"y":10,"font_size_pt":9,"bold":true}].

Itemsitems <= 50
[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_label_template" \  -H "Content-Type: application/json" \  -d '{}'
{
  "created": true,
  "template": {
    "id": "string",
    "name": "string",
    "width_mm": 0,
    "height_mm": 0,
    "shape": "string",
    "elements": [
      {
        "type": "text",
        "id": "string",
        "content": "string",
        "x": 100,
        "y": 100,
        "font_family": "string",
        "font_size_pt": 4,
        "bold": true,
        "align": "left",
        "width_mm": 1,
        "height_mm": 1
      }
    ]
  }
}
{
  "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": {}
  }
}