BrewForge Docs

Attach a device to a brew or change its settings

Attach a device to a brew so its readings are logged there (brew: the brew), detach it (brew: null), rename it, or set its gravity calibration offset (added to every gravity it sends; -0.05 to +0.05 SG). A device logs to one brew at a time; attaching it moves it (also off a keg) and moved_from names where it was. Send only what changes. Needs the plan feature `device_integrations`. Scope: `brews:write` (or `write`).

POST
/api/v1/actions/update_device

Attach a device to a brew so its readings are logged there (brew: the brew), detach it (brew: null), rename it, or set its gravity calibration offset (added to every gravity it sends; -0.05 to +0.05 SG). A device logs to one brew at a time; attaching it moves it (also off a keg) and moved_from names where it was. Send only what changes.

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

Request Body

application/json

device*string

The device: its id or its exact name (e.g. "iSpindel blue"). Case does not matter.

brew?|

Brew to log to: id, batch number (e.g. "#12") or exact name; null detaches the device.

name?string

New name.

Length1 <= length <= 80
gravity_offset_sg?number

Calibration offset in SG, e.g. -0.002 when it reads 2 points high.

[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/update_device" \  -H "Content-Type: application/json" \  -d '{    "device": "string"  }'
{
  "device": {
    "id": "string",
    "name": "string",
    "type": "string",
    "brew": {
      "id": "string",
      "name": "string",
      "status": "string"
    },
    "logs_keg": true,
    "gravity_offset_sg": 0,
    "last_seen_at": "string",
    "last_gravity_sg": 0,
    "last_temp_c": 0,
    "last_battery": 0
  },
  "changed": [
    "string"
  ],
  "moved_from": "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": {}
  }
}