Introduction
Webhooks are a way for web applications to communicate with each other in real-time. They are user-defined HTTP callbacks that are triggered by specific events. When an event occurs, the source site makes an HTTP POST request to the URL configured for the webhook.
To set up the webhook, you need to log into your Alex dashboard, go to the Settings page, and add the URL where you want to receive the webhook notifications under Integrations/Alex API.
Authentication
Every webhook request from Alex includes an X-API-KEY header containing your API key. Use this to verify that incoming requests are legitimately from Alex.
Always validate the X-API-KEY header on your webhook endpoint to prevent
unauthorized requests. Reject any request where the key does not match your
API key.
Webhook Events
Each webhook event has a specific payload that is sent to the URL configured for the webhook. The payload contains information about the event that triggered the webhook.
We now reference each completed interview using the reportId. This is
equivalent to the interviewId in the Get Interviews route.
The following are the events that trigger webhooks:
session.started
This event is sent when a candidate enters the room with Alex and starts. It also gets sent if the candidate is resuming a paused interview.
Example Payload:
session.paused
This event is sent when a candidate leaves an interview midway or it gets interrupted. The candidate left before the interview completed, so still has a chance to complete it.
Example Payload:
session.ended
This event is sent once the candidate finishes their conversation with Alex and the end of the interview is reached. At this point they can’t return to the interview and their report is being generated.
Example Payload:
session.rescheduled
This event is sent when a candidate reschedules their interview during the session. The interview is moved back to a scheduled state with the new date and time.
Example Payload:
session.completed
This event is triggered when an interview is completed.
Example Payload:
session.shortlisted
This event is sent once an interview is shortlisted by a user in the Alex dashboard.
Example Payload:
session.rejected
This event is sent once an interview is rejected by a user in the Alex dashboard.
Example Payload: