Recipes

Query and manage your brewery's recipes via the Brewgenix REST API.

Get Recipe

Returns a single recipe by its ID, including style information.

GET /api/v1/{account}/recipes/{id}

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-..." \
  -H "Authorization: Bearer bgx_<your-key>"

Example Response

{
  "id": "e5f6a7b8-...",
  "name": "West Coast IPA",
  "description": "Clean, bitter, and aromatic.",
  "author": "Head Brewer",
  "batch_volume": 20,
  "boil_time_minutes": 60,
  "fermentables": [...],
  "hops": [...],
  "yeasts": [...],
  "miscellaneous": [],
  "styles": { "id": "...", "name": "American IPA" },
  "created_at": "2025-01-15T10:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z"
}

Error Responses

StatusDescription
401Missing or invalid API key.
404Recipe not found.
500Internal server error.

List Recipes

Returns a paginated list of recipes in your brewery account.

GET /api/v1/{account}/recipes

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based).
limitinteger20Number of results per page. Maximum 100.
qstring-Search query. Filters by recipe name.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl "https://brewgenix.app/api/v1/my-brewery/recipes?q=IPA" \
  -H "Authorization: Bearer bgx_<your-key>"

Example Response

{
  "data": [
    {
      "id": "e5f6a7b8-...",
      "name": "West Coast IPA",
      "batch_volume": 20,
      "boil_time_minutes": 60,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ],
  "count": 1,
  "page": 1,
  "pageSize": 20,
  "pageCount": 1
}

Error Responses

StatusDescription
401Missing or invalid API key.
400Invalid query parameters.
500Internal server error.

Create Recipe

Creates a new recipe in your brewery account.

POST /api/v1/{account}/recipes

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Request Body

FieldTypeRequiredDescription
namestringYesRecipe name.
batch_volumenumberNoTarget batch volume in litres. Defaults to 20.
boil_time_minutesintegerNoBoil duration in minutes. Defaults to 60.
descriptionstringNoRecipe description or notes.
authorstringNoRecipe author.
style_idstringNoUUID of the beer style to associate with this recipe.
fermentablesarrayNoArray of fermentable usage objects. Defaults to [].
hopsarrayNoArray of hop usage objects. Defaults to [].
yeastsarrayNoArray of yeast usage objects. Defaults to [].
miscellaneousarrayNoArray of miscellaneous ingredient usage objects. Defaults to [].

Example Request

curl -X POST "https://brewgenix.app/api/v1/my-brewery/recipes" \
  -H "Authorization: Bearer bgx_<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "West Coast IPA",
    "batch_volume": 20,
    "boil_time_minutes": 60,
    "description": "Clean, bitter, and aromatic.",
    "author": "Head Brewer"
  }'

Example Response

{
  "id": "e5f6a7b8-...",
  "name": "West Coast IPA",
  "description": "Clean, bitter, and aromatic.",
  "author": "Head Brewer",
  "batch_volume": 20,
  "boil_time_minutes": 60,
  "fermentables": [],
  "hops": [],
  "yeasts": [],
  "miscellaneous": [],
  "created_at": "2026-02-24T10:00:00Z",
  "updated_at": "2026-02-24T10:00:00Z"
}

Error Responses

StatusDescription
401Missing or invalid API key.
400Request body is not valid JSON.
422Validation failed (e.g. missing required field).
500Internal server error.

Update Recipe

Updates an existing recipe. Only the fields provided in the request body are updated (PATCH semantics).

PATCH /api/v1/{account}/recipes/{id}

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Request Body

All fields are optional. Provide only the fields you want to update.

FieldTypeDescription
namestringRecipe name.
batch_volumenumberTarget batch volume in litres.
boil_time_minutesintegerBoil duration in minutes.
descriptionstringRecipe description or notes.
authorstringRecipe author.
style_idstringUUID of the beer style to associate with this recipe.
fermentablesarrayReplaces the entire fermentables array.
hopsarrayReplaces the entire hops array.
yeastsarrayReplaces the entire yeasts array.
miscellaneousarrayReplaces the entire miscellaneous ingredients array.

Example Request

curl -X PATCH "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-..." \
  -H "Authorization: Bearer bgx_<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "West Coast IPA v2",
    "boil_time_minutes": 90,
    "description": "Extended boil for more bitterness."
  }'

Example Response

{
  "id": "e5f6a7b8-...",
  "name": "West Coast IPA v2",
  "description": "Extended boil for more bitterness.",
  "author": "Head Brewer",
  "batch_volume": 20,
  "boil_time_minutes": 90,
  "updated_at": "2026-02-24T11:00:00Z"
}

Error Responses

StatusDescription
401Missing or invalid API key.
400Request body is not valid JSON.
404Recipe not found.
422Validation failed (e.g. invalid field value).
500Internal server error.

Delete Recipe

Soft-deletes a recipe. The record is marked as deleted and will no longer appear in list or get requests.

DELETE /api/v1/{account}/recipes/{id}

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl -X DELETE "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-..." \
  -H "Authorization: Bearer bgx_<your-key>"

Response

Returns 204 No Content on success with an empty body.

Error Responses

StatusDescription
401Missing or invalid API key.
404Recipe not found.
500Internal server error.

List Recipe Versions

Returns a paginated list of saved versions for a recipe, sorted newest first.

GET /api/v1/{account}/recipes/{id}/versions

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based).
limitinteger10Number of results per page. Maximum 100.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-.../versions?page=1&limit=10" \
  -H "Authorization: Bearer bgx_<your-key>"

Example Response

{
  "data": [
    {
      "id": "a1b2c3d4-...",
      "recipe_id": "e5f6a7b8-...",
      "version_number": 3,
      "description": "Competition entry - locked for reference",
      "is_locked": true,
      "name": "West Coast IPA",
      "batch_volume": 20,
      "boil_time_minutes": 60,
      "created_at": "2026-03-01T14:00:00Z"
    }
  ],
  "count": 3,
  "page": 1,
  "pageSize": 10,
  "pageCount": 1
}

Error Responses

StatusDescription
401Missing or invalid API key.
422Invalid query parameters.
500Internal server error.

Get Recipe Version

Returns a single version snapshot by its ID.

GET /api/v1/{account}/recipes/{id}/versions/{versionId}

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.
versionIdstringThe version UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-.../versions/a1b2c3d4-..." \
  -H "Authorization: Bearer bgx_<your-key>"

Example Response

{
  "id": "a1b2c3d4-...",
  "recipe_id": "e5f6a7b8-...",
  "account_id": "...",
  "version_number": 3,
  "description": "Competition entry - locked for reference",
  "is_locked": true,
  "name": "West Coast IPA",
  "author": "Head Brewer",
  "batch_volume": 20,
  "boil_time_minutes": 60,
  "fermentables": [...],
  "hops": [...],
  "yeasts": [...],
  "miscellaneous": [],
  "mash_profile": null,
  "fermentation_profile": null,
  "water_profile": null,
  "created_at": "2026-03-01T14:00:00Z"
}

Error Responses

StatusDescription
401Missing or invalid API key.
404Version not found.
500Internal server error.

Create Recipe Version

Creates a new version snapshot of the current recipe state. The snapshot captures all recipe fields at the moment of the call. Use is_locked: true to make the version immutable (locked versions cannot be deleted).

POST /api/v1/{account}/recipes/{id}/versions

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Request Body

FieldTypeRequiredDescription
descriptionstringNoA short label for this version (max 500 characters).
is_lockedbooleanNoIf true, the version is locked and cannot be deleted. Defaults to false.

Example Request

curl -X POST "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-.../versions" \
  -H "Authorization: Bearer bgx_<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Competition entry v3",
    "is_locked": true
  }'

Example Response

{
  "id": "a1b2c3d4-...",
  "recipe_id": "e5f6a7b8-...",
  "version_number": 4,
  "description": "Competition entry v3",
  "is_locked": true,
  "name": "West Coast IPA",
  "batch_volume": 20,
  "boil_time_minutes": 60,
  "created_at": "2026-03-01T15:00:00Z"
}

Error Responses

StatusDescription
401Missing or invalid API key.
400Request body is not valid JSON.
404Recipe not found.
422Validation failed (e.g. description exceeds 500 chars).
500Internal server error.

Delete Recipe Version

Deletes a non-locked recipe version. Locked versions cannot be deleted and will return 409 Conflict.

DELETE /api/v1/{account}/recipes/{id}/versions/{versionId}

Path Parameters

ParameterTypeDescription
accountstringYour brewery account slug (visible in the app URL).
idstringThe recipe UUID.
versionIdstringThe version UUID.

Authentication

Requires a valid API key passed as a Bearer token. See Authentication.

Example Request

curl -X DELETE "https://brewgenix.app/api/v1/my-brewery/recipes/e5f6a7b8-.../versions/a1b2c3d4-..." \
  -H "Authorization: Bearer bgx_<your-key>"

Response

Returns 204 No Content on success with an empty body.

Error Responses

StatusDescription
401Missing or invalid API key.
404Version not found.
409Version is locked and cannot be deleted.
500Internal server error.