Start runs automatically
A trigger starts a durable run with nobody watching. Two kinds:
- A schedule fires on a cron expression or a fixed interval. A morning digest, an hourly reconciliation.
- A webhook gives you a URL. Your system POSTs to it and a run starts with your payload.
Both start exactly the run you would have started by hand, so everything in Run an agent asynchronously applies - including the publish gate, which a trigger does not bypass. An agent whose configuration has not passed its gate does not fire.
Triggers are in beta and enabled per workspace alongside durable runs.
A schedule
Set either schedule.cron or schedule.interval_seconds, not both. A cron takes an optional IANA timezone - Europe/Berlin keeps “9am” at 9am across a daylight-saving change, which UTC does not.
Read next_fire_at and last_fired_at back on the trigger to see whether it is actually firing. A schedule that has quietly stopped looks exactly like one that has not fired yet unless you check.
A webhook
Create it with type: "webhook", and the response carries two things you only get once:
fire_path- the URL your system POSTs to.secret- the fire token, returned once. Copy it now; it cannot be read back, only rotated by recreating the trigger.
Authenticate with the fire token as Authorization: Bearer <secret> - not your API key. The JSON body lands in the run as its payload variable, so the agent’s instruction can refer to it.
Send an Idempotency-Key (or Speechify-Delivery-Id) header. Delivery systems retry, and without a key a retry starts a second run that does the work twice.
Editing rather than recreating
Change the schedule, the instruction or the name in place. Recreating a webhook trigger mints a new fire token, which breaks whoever is calling the old URL - so retime and reword through a PATCH, and keep delete for triggers you actually want gone.
A PATCH replaces each nested object it carries, so send back the whole run object, not just the field you are changing.
Pause one without deleting it by patching enabled: false.
Next
- Run an agent asynchronously - what a triggered run can do, and how to follow it
- Webhooks - being told when a run finishes, rather than asking