v1
latestOpenAPI 3.1.02026-07-2670105729.6 KBAutomations
Create a trigger
Creates a custom trigger event definition — the contract automations subscribe to. Body carries { title, description?, payloadSchema }; the server mints triggerEventId and hardcodes provider: "brew_api". Integration triggers (clerk, stripe, shopify, …) are provisioned by the corresponding integration only.
payloadSchema.fields MUST declare { key: "email", type: "string", required: true } so downstream automations can resolve a recipient. Returns 201 with the bare trigger row.
post/v1/automations/triggers
Headers
Idempotency-Keystring
Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.
Request body
Response
Created. The bare trigger row.