Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Start a timer, or give it more time

PUT
/api/cooking/sessions/{sessionId}/timers/{timerId}
curl --request PUT \
--url http://localhost:3000/api/cooking/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/timers/example \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "label": "Simmer the sauce", "seconds": 600 }'

Cook view calls this when a timer starts, sending timer.started, and when it gets +1 minute, sending timer.extended, even after it’s gone off: it runs again. seconds is how many are left; the server works out when it ends and sends timer.finished then itself. A new timer needs the session to be open, but one it has can get more time after it ends, as timers keep ringing in the app after cook view is left. With an API key, it needs the plan: write permission.

sessionId
required
string format: uuid
timerId
required

The timer’s id, which cook view picks when it starts one.

string
/^[A-Za-z0-9_-]{1,64}$/

The timer’s id, which cook view picks when it starts one.

Media typeapplication/json
object
label
required

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

string
>= 1 characters <= 200 characters
seconds
required

How many seconds are left. The server works out when it ends, so a device whose clock is off doesn’t move it.

integer
>= 1 <= 86400

Example

{
"label": "Simmer the sauce",
"seconds": 600
}

The timer, with when it ends.

Media typeapplication/json
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": "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 cooking session of yours, or, for a new timer, it’s ended.

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."
}
}
}

The session has 20 timers running already.

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.