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
Request
- Base URLhttps://brew.new/api
- Auth
- HTTP bearer
- or API key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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.
Changes
No recorded changes to this operation across all 1 revision of this API.