Cookbook

Update an existing recipe

patch/api/cookbook/recipes/{id}

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/cookbook/recipes/{id}
  • Auth
    HTTP bearer

Path parameters

idnumber required

Request body

titlestring
descriptionstring
mealTypestring
caloriesnumber
proteinnumber
carbsnumber
fatnumber
fibernumber
ingredientsobject
instructionsobject
journeyStagestring
servingsnumber
prepTimestring
cookTimestring
isCommunityboolean
ai_notestring

Personalized AI coaching note (not shown in community feed)

nutritionstring[]

Full nutrition breakdown. Merged into macros so all entries are preserved.

Example request

{
  "title": "Protein-Packed Chicken Bowl",
  "description": "A healthy post-surgery meal",
  "mealType": "dinner",
  "calories": 350,
  "protein": 35,
  "carbs": 40,
  "fat": 12,
  "fiber": 5,
  "journeyStage": "early-post-op",
  "servings": 2,
  "prepTime": "15 min",
  "cookTime": "30 min",
  "isCommunity": true,
  "nutrition": [
    {
      "name": "Sugar",
      "value": 1,
      "unit": "g"
    },
    {
      "name": "Sodium",
      "value": 150,
      "unit": "mg"
    }
  ]
}

Response

unknown required

Example response

{
  "success": true,
  "message": "Recipe updated successfully",
  "recipe": {
    "id": 1,
    "user_id": 5,
    "title": "High-Protein Chicken Bowl (Updated)",
    "meal_type": "lunch",
    "calories": 420,
    "protein": 48,
    "carbs": 30,
    "fat": 12,
    "imageUrl": "https://cdn.example.com/signed-url",
    "created_at": "2026-02-01T00:00:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 34 revisions of this API.