Webhook integration
Configure webhooks in absentify to receive notifications when specific events occur.
Webhooks in absentify allow you to call a script on your server whenever specific events occur in the absentify system. Acting as event listeners or push notifications, webhooks let you build integrations that respond to certain events, such as creating or updating requests, or managing users. When a subscribed event is triggered, absentify sends an HTTP POST request with relevant data to the specified webhook URL. This enables you to update external systems, send alerts, or automate actions based on changes in absentify.
Configuring webhooks
To set up webhooks, go to the Settings
page in absentify.
-
Log in and navigate to integrations
Log in as an administrator, then click onSettings
in the header, and selectIntegrations
. -
Set the webhook URL
Click onConfigure URL
and enter the URL where you want to receive event data. -
Choose event type
From the dropdown menu, select the event type you want to subscribe to:- All Events
- Request Created
- Request Status Changed
- User Created
- User Updated
-
Save the configuration
ClickAdd
to complete the integration and start receiving notifications for the selected event types.
Webhook payload structure
When absentify triggers a webhook, it sends a JSON payload. The structure depends on the event type, with the event_type
field indicating the specific event that triggered the webhook:
Request events (Request Created, Request Status Changed)
User events (User Created, User Updated)
Key fields in user events:
event_type
: The specific event that triggered the webhook (user_created
oruser_updated
)body.id
: Unique identifier for the userbody.status
: Current status of the user (e.g.,ACTIVE
,ARCHIVED
)body.is_admin
: Whether the user has administrative privilegesbody.has_billing_access
: Whether the user has access to billing informationbody.employment_start_date
/body.employment_end_date
: Employment period datesbody.public_holiday
: The public holiday configuration assigned to the userbody.departments
: Array of departments the user belongs to
Event types
- Request Created: Triggered when a new absence request is created
- Request Status Changed: Triggered when the status of an absence request changes (e.g., approved, denied, pending)
- User Created: Triggered when a new user is added to the system
- User Updated: Triggered when user information is modified (e.g., profile updates, role changes)
Use these payloads to synchronize with other systems or trigger automated workflows based on request and user information in absentify.