Cues

A cue is a scheduled task. Recurring or one-time, webhook or worker.

What is a cue?

A cue is a registered schedule that tells CueAPI when to fire and where to deliver the payload. Think of it as an API-managed cron job with delivery guarantees, retry logic, and execution history.

Every cue has:

FieldDescription
idUnique identifier (format: cue_xxxxxxxxxxxx)
nameHuman-readable name you choose
statusactive, paused, completed, or failed
scheduleWhen to fire (cron or one-time)
callbackWhere to deliver (URL for webhook transport)
transportwebhook (push) or worker (pull)
payloadJSON body sent with each execution
next_runNext scheduled fire time
run_countHow many times this cue has fired successfully

Recurring vs. one-time

Recurring

Fires on a cron schedule. Stays active after each fire. Calculates the next run time automatically.

json
{
  "schedule": {
    "type": "recurring",
    "cron": "0 9 * * 1-5",
    "timezone": "America/New_York"
  }
}

One-time

Fires once at the specified time. Status changes to completed on success or failed after exhausting retries.

json
{
  "schedule": {
    "type": "once",
    "at": "2026-03-15T14:00:00Z"
  }
}

Cue lifecycle

created (active) → fires → active (recurring) or completed (one-time)
                          → failed (one-time, retries exhausted)

active ↔ paused (via PATCH)

active → deleted (via DELETE)
  • active — scheduled and will fire at next_run
  • paused — schedule suspended, next_run cleared, can be resumed
  • completed — one-time cue fired successfully
  • failed — one-time cue exhausted all retry attempts

Pause and resume

Pausing a cue stops it from firing. Resuming recalculates the next run time from now.

bash
# Pause
curl -X PATCH https://api.cueapi.ai/v1/cues/{cue_id} \
  -H "Authorization: Bearer cue_sk_..." \
  -d '{"status": "paused"}'
 
# Resume
curl -X PATCH https://api.cueapi.ai/v1/cues/{cue_id} \
  -H "Authorization: Bearer cue_sk_..." \
  -d '{"status": "active"}'

Plan limits

Each plan has a maximum number of active cues:

PlanMax active cues
Free10
Pro100
Scale500

Creating a cue beyond your limit returns 403 cue_limit_exceeded. Upgrade your plan or delete unused cues.