BrewForge Docs

Import a recipe (BeerXML or MMuM)

Import recipes from file content: BeerXML (<RECIPES>... from BeerSmith, Brewfather, Little Bock etc., one or more recipes) or MMuM JSON (Maische Malz und Mehr / Kleiner Brauhelfer). Each recipe becomes a new idea in the recipe book that keeps the source program's numbers; call convert_imported_brew before editing one with update_recipe. Pass the file's text as content; format is detected when omitted. MMuM files without batch volume or brewhouse yield need batch_volume_l / efficiency_pct (the error says which). Needs the plan feature `import_export`. Scope: `brews:write` (or `write`).

POST
/api/v1/actions/import_recipe

Import recipes from file content: BeerXML (... from BeerSmith, Brewfather, Little Bock etc., one or more recipes) or MMuM JSON (Maische Malz und Mehr / Kleiner Brauhelfer). Each recipe becomes a new idea in the recipe book that keeps the source program's numbers; call convert_imported_brew before editing one with update_recipe. Pass the file's text as content; format is detected when omitted. MMuM files without batch volume or brewhouse yield need batch_volume_l / efficiency_pct (the error says which).

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

content*string

The complete file content as text (XML for BeerXML, JSON for MMuM).

Length1 <= length <= 5000000
format?string

"beerxml" or "mmum"; detected from the content when omitted.

Value in"beerxml" | "mmum"
batch_volume_l?number

MMuM only: cast-out volume in liters when the file has none, e.g. 20.

Range0 < value <= 10000
efficiency_pct?number

MMuM only: brewhouse yield (Sudhausausbeute) in % when the file has none, e.g. 70.

Range1 <= value <= 100
[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/import_recipe" \  -H "Content-Type: application/json" \  -d '{    "content": "string"  }'
{
  "imported": 0,
  "brews": [
    {
      "id": "string",
      "name": "string",
      "style": "string",
      "batch_volume_l": 0,
      "og_sg": 0
    }
  ],
  "errors": [
    "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": {}
  }
}