Jobs & Schedules

Fliq has two primitives: Jobs for one-time executions and Schedules for recurring ones. The API shape is nearly identical.

Jobs — one-time executions

A job fires exactly once at the time you specify. Use jobs when a specific event in your system triggers a future action: charge a card on a start date, send a follow-up email 48 hours after signup, expire a trial.

Fields

POST /v1/jobs
{
  "url":           string,   // required — the endpoint Fliq will call
  "http_method":   string,   // optional — GET | POST | PUT | PATCH | DELETE (default: POST)
  "scheduled_at":  string,   // required — ISO 8601 UTC timestamp
  "headers":       object,   // optional — forwarded verbatim to your endpoint
  "body":          string,   // optional — raw string body
  "max_retries":   number,   // optional — 0–3 on Free, 0–10 on Growth (default: 0)
  "idempotency_key": string  // optional — prevents duplicate jobs on retry of this API call
}
scheduled_at must be in the future. Minimum lead time is a few seconds to allow for propagation.

Job lifecycle

  • scheduled — waiting to fire
  • running — HTTP request in flight
  • success — endpoint returned 2xx
  • failed — all retries exhausted without a 2xx
  • cancelled — cancelled before firing

Schedules — recurring executions

A schedule creates a new execution at each interval defined by a cron expression. It runs indefinitely until you delete it.

Fields

POST /v1/schedules
{
  "url":          string,   // required
  "http_method":  string,   // optional (default: POST)
  "cron":         string,   // required — 5-part cron expression (UTC)
  "headers":      object,   // optional
  "body":         string,   // optional
  "max_retries":  number    // optional
}

Cron syntax

Fliq uses standard 5-part cron expressions. All times are UTC.

┌─ minute (0–59)
│  ┌─ hour (0–23)
│  │  ┌─ day of month (1–31)
│  │  │  ┌─ month (1–12)
│  │  │  │  ┌─ day of week (0–7, 0 and 7 = Sunday)
│  │  │  │  │
*  *  *  *  *

Common expressions

0 9 * * 1-5     Every weekday at 9 AM UTC
*/15 * * * *    Every 15 minutes
0 0 1 * *       First day of every month at midnight
0 8 * * 1       Every Monday at 8 AM UTC

Idempotency

If your server retries the API call before receiving a response, you could end up with duplicate jobs. Pass an idempotency_key (any unique string — a UUID works) to guarantee the job is only created once, even if the request is sent multiple times.