Links

API version 2

REST API
API version 1 is deprecated and will be discountinued, please convert to version 2.
Breaking changes in version 2 of the API includes:
  • A new method of paging the GET requests that lists multiple elements. The parameter "offset" is replaced with "start_after". Use the "_id" in the last element of the previous request to get to the next set of elements.
  • The default ordering of elements has changed to use the "_id" field instead of the "name" field.
  • GET batches no longer have a default value for the "status" parameter
  • Version 2 has an increased rate limit
  • Measured values can now be updated for a batch PATCH

Disclaimer

Please keep yourself updated on the API documentation as important messages and changes will be listed above this disclaimer.
Data returned from the API will be in metric units. Requests are ordered by the "_id" field.

Authentication

The authorization header must consist of your userid:apikey (base64 encoded).
Example:
UserId: xyz123 API-key: 1234567890123456789012345678901234567890abcd Base 64 encode: "xyz123:1234567890123456789012345678901234567890abcd"
curl -H "authorization: Basic eHl6MTIzOjEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTBhYmNk" \
https://api.brewfather.app/v2/batches
In Postman, you can configure Basic Authorization by clicking the Authorization tab, selecting Basic Auth from the drop-down selector, and then typing the username (userid from above) and password (api-key form above) on the right of the colon on each row.
The API supports HTTPS traffic only (for security reasons).

Generate API-Key

In the Settings page, you can click GENERATE in the API-section to create your API-key. You can currently only have one API-key per account.

Scopes

Scopes control what the API-key can access. Currently, you can choose:
  • Read Recipes
  • Read Batches
  • Edit Batches
  • Read Inventory
  • Edit Inventory
When you generate your API-key you can select different scopes that the API-key can access, when new scopes are added you might need to generate a new key with the new scopes to allow access to the new scopes.

Rate Limit

Currently, you can do a maximum of 300 calls per hour per API-key.
Rate limits can be changed at any time, build your integration to handle http code 429 Too Many Requests, response will include a Retry-After header.

Batches

get
https://api.brewfather.app
/v2/batches
Get Batches
get
https://api.brewfather.app
/v2/batches/:id
Get Batch
patch
https://api.brewfather.app
/v2/batches/:id
Update Batch
get
https://api.brewfather.app
/v2/batches/:batch_id/readings/last
Get Batch Last Reading
get
https://api.brewfather.app
/v2/batches/:batch_id/readings
Get Batch All Readings
get
https://api.brewfather.app
/v2/batches/:batch_id/brewtracker
Get Batch Brew Tracker

Recipes

get
https://api.brewfather.app
/v2/recipes
Get Recipes
get
https://api.brewfather.app
/v2/recipes/:id
Get Recipe

Inventory

get
https://api.brewfather.app
/v2/inventory/fermentables
Get Fermentables
get
https://api.brewfather.app
/v2/inventory/fermentables/:id
Get Fermentable
patch
https://api.brewfather.app
/v2/inventory/fermentables/:id
Update Fermentable
get
https://api.brewfather.app
/v2/inventory/hops
Get Hops
get
https://api.brewfather.app
/v2/inventory/hops/:id
Get Hop
patch
https://api.brewfather.app
/v2/inventory/hops/:id
Update Hop
get
https://api.brewfather.app
/v2/inventory/miscs
Get Miscs
get
https://api.brewfather.app
/v2/inventory/miscs/:id
Get Misc
patch
https://api.brewfather.app
/v2/inventory/miscs/:id
Update Misc
get
https://api.brewfather.app
/v2/inventory/yeasts
Get Yeasts
get
https://api.brewfather.app
/v2/inventory/yeasts/:id
Get Yeast
patch
https://api.brewfather.app
/v2/inventory/yeasts/:id
Update Yeast