API referenceMeal plans
Create a meal plan
Authorization
bearerAuth AuthorizationBearer <token>
A Clerk session JWT. Obtain one with a Clerk frontend SDK
(session.getToken()) or, for server-to-server use, with a Clerk
machine token. The token's sub claim is the Flambe user id that scopes
every request.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/mealplans" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_id": "string", "name": "Week of Sep 14", "description": "string", "end_date": "2019-08-24", "meals": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Dinner", "start_time": "18:00", "end_time": "19:30", "days_of_week": [ 0 ], "items": [ { "recipe_id": "fa7d15d4-7670-4586-a94b-5079ed028135", "name": "string", "portion": 0, "nutrition": { "calories": 0, "protein_g": 0, "fat_g": 0, "carbs_g": 0, "fiber_g": 0, "sugar_g": 0, "sodium_mg": 0, "per": "serving", "computed_at": "2019-08-24T14:15:22Z", "ingredients_hash": "string" } } ], "notes": "string", "nutrition": { "calories": 0, "protein_g": 0, "fat_g": 0, "carbs_g": 0, "fiber_g": 0, "sugar_g": 0, "sodium_mg": 0, "per": "serving", "computed_at": "2019-08-24T14:15:22Z", "ingredients_hash": "string" } } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}