Notifying when a staff member is deactivated
The event is triggered when an admin sets a staff member as inactive
Webhook authorization: using a business or directory token.
Subscribing to the Staff Deleted webhook:
curl --location --request POST '/platform/v1/webhook/subscribe' \
--header 'Authorization: "Bearer API_TOKEN"'\
--header 'Content-Type: application/json' \
--data-raw '{
"event": "staff/deactivated",
"target_url": "URL"
}'
Staff Deleted Payload Example:
{
"entity_name": "staff",
"event_type": "deactivated",
"data": {
"business_id": "6c023d6f0wp7a1le",
"staff_id": "7rc1xaas41k432ky",
"first_name": null,
"last_name": null,
"display_name": "staff [inactive]",
"phone": null,
"email": "[email protected]",
"role": "user",
"created_at": "2024-04-17T05:37:26.000-06:00"
}
}