BrewForge Docs

Package beer into kegs, bottles or cans

Records packaging day: beer from a brew (its tank, or straight from the brew) or from a vessel goes into kegs (litres each) and bottles/cans (counts), with loss in litres. Example: 'kegged the pale ale today: 19 L into Corny 1, 6 bottles of 0.5 L, half a litre lost' → {"brew":"Pale Ale","kegs":[{"keg":"Corny 1","volume_l":19}],"containers":[{"container":"0.5 L bottles","count":6}],"loss_l":0.5}. Call get_packaging_context first to see the litres available, the free kegs and the container names. Each keg becomes a serving stay holding its litres; bottles/cans add to stock; the source tank is emptied (source_empty) and the brew gets its packaging date. If packaged litres plus loss do not match what is available it still packages, and warnings says so (tell the user; pass available_l when the tank held more than shown). An overfilled keg is refused. Needs the plan feature `cellar`. Scope: `cellar:write` (or `write`).

POST
/api/v1/actions/package_beer

Records packaging day: beer from a brew (its tank, or straight from the brew) or from a vessel goes into kegs (litres each) and bottles/cans (counts), with loss in litres. Example: 'kegged the pale ale today: 19 L into Corny 1, 6 bottles of 0.5 L, half a litre lost' → {"brew":"Pale Ale","kegs":[{"keg":"Corny 1","volume_l":19}],"containers":[{"container":"0.5 L bottles","count":6}],"loss_l":0.5}. Call get_packaging_context first to see the litres available, the free kegs and the container names. Each keg becomes a serving stay holding its litres; bottles/cans add to stock; the source tank is emptied (source_empty) and the brew gets its packaging date. If packaged litres plus loss do not match what is available it still packages, and warnings says so (tell the user; pass available_l when the tank held more than shown). An overfilled keg is refused.

Needs the plan feature cellar. 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

brew?string

Package this brew (from the tank it is in, or straight from the brew if it is in no vessel). The brew: its id, its batch number (e.g. 12 or "#12") or its exact name (e.g. "Citra Pale Ale"). Case does not matter.

from_vessel?string

Instead of brew: the vessel (or stay id) the beer comes out of, e.g. "Brite tank" or a keg "Corny 2" to move beer from a keg into bottles.

kegs?array<>

Kegs filled; each keg once.

Itemsitems <= 50
containers?array<>

Bottles/cans filled, by container type.

Itemsitems <= 50
loss_l?number

Litres lost (trub, spills, left in lines), e.g. 0.5. Default 0.

Range0 <= value
available_l?number

Litres actually in the source, when get_packaging_context showed estimate: true or no volume. Ignored when the tank has a measured volume.

Range0 <= value
source_empty?boolean

true = the source is empty afterwards (tank stay ends). Default: true for a tank or brew, false when repackaging from a keg (kegs are ended with end_stay).

today?string

The brewer's local date today, YYYY-MM-DD (e.g. "2026-11-11"). Optional: defaults to today in UTC. Pass it when the brewer's day differs from UTC (late evening in America, early morning in Asia).

Match^\d{4}-\d{2}-\d{2}$
[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/package_beer" \  -H "Content-Type: application/json" \  -d '{}'
{
  "packaged": true,
  "beer": "string",
  "changes": [
    "string"
  ],
  "source_free_from": "string",
  "warnings": [
    "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": {}
  }
}