Type vs. source
A trigger carries two independent dimensions. They are not the same field, and they filter separately:
Type answers which entry point created this run and is always populated. Source answers which upstream system or workflow the caller attributed it to and is nullable — the platform never infers it. A nightly cron and a manual UI click can both carry
source: "ui" while differing in type; a webhook and an API call can share type semantics while differing in source.
The
type and source values are denormalized onto every batch (trigger_type, trigger_source) and execution, so a runs feed can filter or group by either dimension without a second lookup against the trigger.The read-only surface
Triggers are created only as a side effect of a run — there is noPOST, PUT, or PATCH. The /triggers surface is read-only:
Every route is tenant-scoped: a missing or cross-tenant trigger returns
404 (never 403). The nested /batches route verifies you own the parent trigger before listing its children.
Today a trigger maps to exactly one batch (1:1). The nested
GET /triggers/{id}/batches route is shaped as a list so it stays forward-compatible with future record-partitioning, where one trigger may fan out into several batches.raw_request is admin-only and detail-only
Every trigger stores the raw inbound payload that caused it — the webhook body, the event envelope, or the API trigger request. This blob can hold PII, HMAC signatures, and arbitrary caller data, so it is doubly gated:
- Detail-only.
raw_requestis returned only onGET /triggers/{trigger_id}. It is omitted entirely from every list response — it never appears inGET /triggersorGET /triggers/{id}/batchesitems. - Admin-only. Even on the detail route,
raw_requestis included only for an admin principal (anX-API-Keyis admin-equivalent, or a Clerk JWT with the admin role). Non-admin callers get the trigger’stype,source, timestamps, and back-references — but not the raw blob.
Next steps
Batches and executions
How a trigger becomes a batch and its executions.
How GetDialed works
The core objects — definitions, triggers, batches, and executions.