Trigger a workflow by API
Send an event with POST /events and let the business's automations do the rest.
Scope: events:write. The business needs automations (Growth and up; Scale includes it).
1. The business creates a rule
In the dashboard under Automations, the owner creates a rule or flow that starts on an event type, for example order.paid: "when an order is paid, prepare a thank-you message and create a task".
Event types the automations accept: booking.created, booking.cancelled, booking.upcoming, booking.ended, order.created, order.paid, order.shipped, order.delivered, return.requested, appointment.booked, appointment.upcoming, appointment.cancelled, trial.started, trial.ending, subscription.cancelled, ticket.created, contact.created and custom (with your own name in data.event).
2. You send the event
curl -X POST "https://hevia.app/api/v1/events" \
-H "Authorization: Bearer $HEVIA_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"order.paid","id":"order-1042","contact":{"name":"Anna Example","email":"anna@example.com","lang":"de"},"data":{"order_number":"1042","amount":"129.00"}}'idis your id of the event. The sametype+idruns once; sending it again answers200with"duplicate": true.data: up to 40 flat fields (string, number or boolean); keys of letters, digits,_ . -. Use them in conditions and placeholders.contact.consent: trueonly when the person agreed to messages beyond the service itself.
3. Read the answer
{ "data": { "id": "…", "duplicate": false, "runs": [{ "ruleId": "…", "status": "scheduled" }] } }runs lists every rule that matched, with a status such as scheduled, skipped (automations paused) or already (this event ran before).
Messages that automations prepare wait for approval unless the owner chose automatic sending. Automatic messages never go out at night; they wait for 8 o'clock in the business's time zone.