Event API
The Events API is a streamlined, easy way to build apps and bots that respond to activities in Alfred. All you need is a a secure place for us to send your events.
Tell us where to send your carefully selected event types and we'll deliver them securely with available data of the event context.
Events are sent via HTTP Post requests to a given Webhook end-point. We will send JSON-based payloads containing wrapped event types.
Event Loop
Many apps built using the Events API will follow the same abstract event-driven sequence:
A user creates a circumstance that triggers an event subscription to your application.
Your server receives a payload of JSON describing that event.
Your server acknowledges receipt of the event.
Your business logic decides what to do about that event.
Your server carries out that decision.
Request URL Configuration & Verification
Your Event Request URL must be confirmed before we start sending data.
URL VERIFICATION HANDSHAKE
The events sent to your Request URL contains sensitive information associated with data handled by Alfred. To ensure that events are being delivered to a server under your direct control, we must verify your ownership by issuing you a challenge request.
After you've provided your Webhook URL, we'll dispatch a HTTP POST request. We'll verify your SSL certificate and we'll send a application/json
POST body containing three fields:
RESPONDING TO THE CHALLENGE
Once you receive the event, complete the sequence by responding with HTTP 200 and the challenge attribute value.
Responses can be sent in plain text:
Or if you feel like showing off, respond with application/json
:
RECEIVING EVENTS
Your Request URL will receive a request for each event raised by a data processing pipeline. One request, one event.
All events will be wrapped in a JSON “envelope” with the following structure:
Last updated
Was this helpful?