Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Start cooking

POST
/api/cooking/sessions
curl --request POST \
--url http://localhost:3000/api/cooking/sessions \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "recipe": "lemon-chicken", "meal": "0199e8b0-5a10-7a01-8b00-00000000001b", "servings": 4 }'

Cook view calls this when someone leaves Get ready, or opens it on a recipe with nothing to get ready. Sends cooking.started. Each device cooking is a session of its own, and only its cook can change or end it. With an API key, it needs the plan: write permission.

Media typeapplication/json
object
recipe
required

The recipe being cooked, by its id or slug.

string
>= 1 characters
with

The recipe cooked with it as a pairing, by id or slug.

string | null
>= 1 characters
meal

The planned meal it’s cooked for: its entry in the plan.

string | null format: uuid
servings

How many servings it’s making, as cook view shows them. Null for a recipe that doesn’t say.

number | null
> 0 <= 1000

Example

{
"recipe": "lemon-chicken",
"meal": "0199e8b0-5a10-7a01-8b00-00000000001b",
"servings": 4
}

Cooking started.

Media typeapplication/json
object
id
required
string
cook
required

Who’s cooking. Null if they’ve left Merran.

object
id
required
string
name
required
string
recipe
required
object
id
required
string
slug
required
string
title
required
string
url
required

Its page in Merran. Null when the server has no public address (MERRAN_PUBLIC_URL).

string | null
with
required

The recipe cooked with it as a pairing, if any.

object
id
required
string
slug
required
string
title
required
string
url
required

Its page in Merran. Null when the server has no public address (MERRAN_PUBLIC_URL).

string | null
meal
required

The planned meal it’s cooked for, if any.

object
entryId
required

The meal’s entry in the plan.

string
date
required

Its day, as YYYY-MM-DD. For a meal in the week’s pool, the first day of that week.

string
meal
required
string
Allowed values: breakfast lunch dinner snack
pool
required

Whether it’s in the week’s pool, waiting for a day, rather than planned for one.

boolean
title
required

The recipe’s name, or the note for a meal that’s only a note.

string
recipe
required

The recipe. Null for a meal that’s only a note, or one whose recipe is in Recently deleted.

object
id
required
string
slug
required
string
title
required
string
url
required

Its page in Merran. Null when the server has no public address (MERRAN_PUBLIC_URL).

string | null
side
required

The side dish, if it has one. Null while it’s in Recently deleted, as the plan leaves it out.

object
id
required
string
slug
required
string
title
required
string
url
required

Its page in Merran. Null when the server has no public address (MERRAN_PUBLIC_URL).

string | null
servings
required
number | null
startedAt
required
string
heardAt
required

When cook view last said it’s still cooking.

string
leaving
required

Cook view was left with a timer still running, or its page went away a moment ago: it ends when the timers are done, or in a minute.

boolean
endedAt
required
string | null
outcome
required
string | null
Allowed values: made stopped timed_out
timers
required

Its running timers, the soonest first.

Array<object>
object
id
required

The timer’s id, which cook view picked when it started.

string
label
required

What it’s for, like “Simmer the sauce” or “10 minutes”.

string
seconds
required

How long it runs, in seconds: its length when started, with each minute added.

integer
>= 1
endsAt
required

When it goes off, by the server’s clock: cook view says how many seconds are left, not when.

string

Example

{
"id": "0199e8b0-5a10-7a01-8b00-000000000037",
"cook": {
"id": "0199e8b0-5a10-7a01-8b00-000000000001",
"name": "Sam Rivera"
},
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000006",
"slug": "lemon-chicken",
"title": "Lemon Chicken",
"url": "https://merran.example.com/recipes/lemon-chicken"
},
"with": null,
"meal": null,
"servings": 4,
"startedAt": "2026-10-15T18:30:00.000Z",
"heardAt": "2026-10-15T18:30:00.000Z",
"leaving": false,
"endedAt": null,
"outcome": null,
"timers": [
{
"id": "t-4f2a",
"label": "Simmer the sauce",
"seconds": 600,
"endsAt": "2026-10-15T18:40:00.000Z"
}
]
}

Not signed in.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

No such recipe, or no such meal on the plan.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string

Example

{
"error": {
"code": "not_found",
"message": "There's nothing here.",
"fields": {
"name": "Give it a name."
}
}
}

© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.