Flambe docs

Attach a source

A recipe can cite more than one source — the cookbook it came from and the creator's post about it, say. This attaches an additional one. Pass `make_primary` to promote it to the headline attribution.

POST
/api/recipes/{id}/sources

A recipe can cite more than one source — the cookbook it came from and the creator's post about it, say. This attaches an additional one. Pass make_primary to promote it to the headline attribution.

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

Path Parameters

id*string

Recipe identifier.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/recipes/497f6eca-6276-4993-bfeb-53cbbbba6f08/sources" \  -H "Content-Type: application/json" \  -d '{}'
{  "attachment_id": "4c76e620-6daa-46e6-9da1-9ac96abab601",  "recipe": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "user_id": "string",    "title": "Brown Butter Chocolate Chip Cookies",    "subtitle": "string",    "description": "string",    "notes": "",    "tags": [      "dessert",      "cookies"    ],    "ingredients": [      {        "name": "all-purpose flour",        "quantity": 2.5,        "unit": "cups",        "preparation": "sifted",        "isOptional": false      }    ],    "components": [      {        "title": "Brown butter frosting",        "description": "string",        "notes": "string",        "ingredients": [          {            "name": "all-purpose flour",            "quantity": 2.5,            "unit": "cups",            "preparation": "sifted",            "isOptional": false          }        ],        "instructions": [          "string"        ]      }    ],    "instructions": [      "string"    ],    "media": [      {        "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",        "url": "http://example.com",        "blur_hash": "string",        "width": 0,        "height": 0,        "kind": "image"      }    ],    "blur_hash": "string",    "prep_time": 20,    "cook_time": 12,    "servings": 24,    "difficulty": "easy",    "rating": 0,    "source_section": "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"  }}