Skip to content

Recipe Endpoints

Manage recipes programmatically using the BetterMenu Recipe API.

Create a new recipe with ingredients and instructions.

POST /v1/recipes
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"name": "Classic Margherita Pizza",
"description": "A traditional Italian pizza with fresh mozzarella, tomatoes, and basil",
"servings": 4,
"prepTime": 20,
"cookTime": 15,
"ingredients": [
{
"ingredientId": "ing_123",
"quantity": 500,
"unit": "g",
"notes": "Pizza dough"
},
{
"ingredientId": "ing_456",
"quantity": 200,
"unit": "g",
"notes": "Fresh mozzarella"
},
{
"ingredientId": "ing_789",
"quantity": 150,
"unit": "g",
"notes": "Tomato sauce"
}
],
"instructions": [
"Preheat oven to 475°F (245°C)",
"Roll out the pizza dough on a floured surface",
"Spread tomato sauce evenly over the dough",
"Add fresh mozzarella cheese",
"Bake for 12-15 minutes until crust is golden",
"Garnish with fresh basil leaves"
],
"tags": ["italian", "vegetarian", "pizza"]
}
{
"id": "recipe_abc123",
"accountId": "acc_xyz789",
"name": "Classic Margherita Pizza",
"description": "A traditional Italian pizza with fresh mozzarella, tomatoes, and basil",
"servings": 4,
"prepTime": 20,
"cookTime": 15,
"totalTime": 35,
"ingredients": [
{
"id": "ri_001",
"ingredientId": "ing_123",
"ingredient": {
"id": "ing_123",
"name": "Pizza Dough",
"category": "bakery"
},
"quantity": 500,
"unit": "g",
"notes": "Pizza dough"
}
],
"instructions": [
"Preheat oven to 475°F (245°C)",
"Roll out the pizza dough on a floured surface",
"Spread tomato sauce evenly over the dough",
"Add fresh mozzarella cheese",
"Bake for 12-15 minutes until crust is golden",
"Garnish with fresh basil leaves"
],
"nutritionFacts": {
"servingSize": "1 slice",
"servingsPerRecipe": 4,
"calories": 285,
"totalFat": 12,
"saturatedFat": 6,
"cholesterol": 30,
"sodium": 650,
"totalCarbohydrates": 32,
"dietaryFiber": 2,
"sugars": 3,
"protein": 12
},
"allergens": ["wheat", "milk"],
"tags": ["italian", "vegetarian", "pizza"],
"createdAt": "2025-10-06T22:20:00Z",
"updatedAt": "2025-10-06T22:20:00Z"
}
CodeDescription
201Recipe created successfully
400Bad request - Invalid input
401Unauthorized - Invalid API key
422Unprocessable entity - Validation failed
429Too many requests - Rate limit exceeded
500Internal server error

Retrieve a specific recipe by ID.

GET /v1/recipes/{recipeId}

Returns the recipe object with all details including ingredients and nutrition facts.

Update an existing recipe.

PATCH /v1/recipes/{recipeId}

Include only the fields you want to update.

{
"name": "Updated Recipe Name",
"servings": 6
}

Delete a recipe permanently.

DELETE /v1/recipes/{recipeId}
{
"id": "recipe_abc123",
"deleted": true
}

Get a paginated list of all recipes.

GET /v1/recipes
ParameterTypeDescription
limitintegerNumber of recipes per page (default: 20, max: 100)
offsetintegerNumber of recipes to skip
searchstringSearch recipes by name or description
tagsstringFilter by tags (comma-separated)
sortBystringSort field: name, createdAt, updatedAt
orderstringSort order: asc or desc
GET /v1/recipes?limit=10&search=pizza&tags=italian,vegetarian&sortBy=createdAt&order=desc
{
"data": [
{
"id": "recipe_abc123",
"name": "Classic Margherita Pizza",
"description": "A traditional Italian pizza...",
"servings": 4,
"totalTime": 35,
"tags": ["italian", "vegetarian", "pizza"],
"createdAt": "2025-10-06T22:20:00Z"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 42,
"hasMore": true
}
}

All endpoints return consistent error responses:

{
"error": {
"code": "validation_error",
"message": "Invalid request parameters",
"details": [
{
"field": "servings",
"message": "Must be a positive integer"
}
]
}
}