Flambe docs

Create a timer

Schedules a timer to fire at `dueAt`. Because the schedule lives on the server, it still fires if the app is backgrounded or the device restarts. Pass `idempotencyKey` to make retries safe — a second call with the same key returns the original timer rather than creating a duplicate. Note that timer fields are `camelCase`, unlike the rest of the API.

POST
/api/timers

Schedules a timer to fire at dueAt. Because the schedule lives on the server, it still fires if the app is backgrounded or the device restarts.

Pass idempotencyKey to make retries safe — a second call with the same key returns the original timer rather than creating a duplicate.

Note that timer fields are camelCase, unlike the rest of the API.

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.

A server-backed timer. Because it lives on the server it still fires when the app is backgrounded or the device restarts.

Timer fields are camelCase, unlike the rest of the API.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/timers" \  -H "Content-Type: application/json" \  -d '{    "title": "Rest the dough",    "dueAt": "2026-09-10T19:00:00.000Z",    "recipeId": "9b8a7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",    "idempotencyKey": "rest-dough-9b8a7c6d"  }'
{  "timerId": "c48c1954-3e81-466f-bee5-92209379c29b",  "title": "Rest the dough",  "dueAt": "2019-08-24T14:15:22Z",  "status": "scheduled",  "remainingMs": 0,  "payload": {},  "deliveryPrefs": {    "push": true,    "sound": "string"  },  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",  "recipeId": "31545f76-b27f-4c7c-9faf-229771396df1",  "contextType": "string",  "contextId": "string",  "idempotencyKey": "string",  "ttl": 0,  "createdAt": "2019-08-24T14:15:22Z"}