An event tells Inboxjot that a contact did something in your app. Events start automations and resume runs that wait for them. The events API needs a key with Full access.
Send an Event
curl -X POST https://api.inboxjot.com/v1/events \ -H "Authorization: Bearer $INBOXJOT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "order.completed", "email": "riti@example.com", "data": { "order_id": "1042", "total": "$42.00" } }'
| Field | Description |
|---|---|
| name | Required. Up to 100 letters, numbers, dots, colons, dashes or underscores. Starts with a letter or number. |
| Required. The contact who did it. | |
| data | Optional. A JSON object of up to 16 KB. |
The API answers 202 Accepted with the contact_id. Inboxjot sets the time of the event.
What Happens Next
- If no contact has the email, Inboxjot creates one as subscribed.
- Automations with an Event received trigger for this name start a run.
- Runs of the contact that wait for this event continue.
The automation editor lists the event names your app sent in the last 30 days.
Use Event Data
Emails in an automation started by an event can use its data. Each top-level field becomes a variable such as {{event.order_id}}. Data from an event that resumes a Wait for Event step is not added.