Update a keg: litres left, pour, empty, sensor
Changes a keg that is on tap or ready (a current serving stay). action: set_volume = the real litres left (volume_l); pour = take litres out (pour_l, default 0.5; it lowers the litres left now: pours have no date or history, so an earlier pour is simply recorded now); free = the keg is empty and free from today; link_brew = a keg of a hand-typed beer belongs to one of the brewer's brews (brew); attach_sensor / detach_sensor = a keg scale or volume sensor (device) takes over / stops measuring the volume. Kegs with a sensor attached cannot be set by hand. Returns the keg and an undo_token (undo_stock_change). Filling kegs is package_beer; list kegs with get_beer_stock. Needs the plan feature `cellar`. Scope: `cellar:write` (or `write`).
Changes a keg that is on tap or ready (a current serving stay). action: set_volume = the real litres left (volume_l); pour = take litres out (pour_l, default 0.5; it lowers the litres left now: pours have no date or history, so an earlier pour is simply recorded now); free = the keg is empty and free from today; link_brew = a keg of a hand-typed beer belongs to one of the brewer's brews (brew); attach_sensor / detach_sensor = a keg scale or volume sensor (device) takes over / stops measuring the volume. Kegs with a sensor attached cannot be set by hand. Returns the keg and an undo_token (undo_stock_change). Filling kegs is package_beer; list kegs with get_beer_stock.
Needs the plan feature cellar. Scope: cellar: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: cellar:write
Request Body
application/json
The keg: its name (e.g. "Corny 2"), the beer in it (brew name or batch number), or stay_id from get_beer_stock.
What to do: set_volume, pour, free, link_brew, attach_sensor or detach_sensor.
"set_volume" | "pour" | "free" | "link_brew" | "attach_sensor" | "detach_sensor"set_volume: litres left now, e.g. 12.5.
0 <= valuepour: litres poured, e.g. 0.5 for a pint (default 0.5). Recorded now; pours cannot be backdated.
0 < valuelink_brew: the brew this beer is. 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.
attach_sensor / detach_sensor: device id or exact name, e.g. "Keg scale 1" (see get_beer_stock keg_sensors).
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).
^\d{4}-\d{2}-\d{2}$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/update_keg" \ -H "Content-Type: application/json" \ -d '{ "keg": "string", "action": "set_volume" }'{
"keg": {
"id": "string",
"vessel": "string",
"vessel_id": "string",
"beer": "string",
"brew_id": "string",
"role": "string",
"name": "string",
"start_date": "string",
"end_date": "string",
"volume_l": 0,
"status": "planned",
"notes": "string",
"pints_left": 0
},
"undo_token": "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": {}
}
}