v1

latestOpenAPI 3.1.02026-07-2670105729.6 KB
Automations

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

titlestring required
descriptionstring

Response

Created. The bare trigger row.

triggerEventIdstring required
titlestring required
descriptionstring
provider'brew_api' | 'clerk' | 'stripe' | 'shopify' | 'stytch' | 'supabase' | 'workos' | 'revenuecat' | 'custom' required
providerEventKeystring
createdAtstring date-time required
updatedAtstring date-time required