Hi! I am creating the webhook in <permit.io>, I ne...
# permit-saas
m
Hi! I am creating the webhook in permit.io, I need a help with that. Can anyone please help me with that
a
Hi @Mithies Ponnusamy, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
I can help you set up webhooks in Permit.io! Webhooks allow you to receive notifications when meaningful events occur in your Permit Elements, such as user creation or approval requests (1) . Setting Up Your Webhook 1. Create Your Endpoint First, create an endpoint on your server that can receive POST requests . Your endpoint should: • Accept POST requests with JSON payloads • Return a 200 HTTP status code to acknowledge receipt • Use HTTPS for security 2. Configure the Webhook in Permit You can configure webhooks when setting up your Permit Elements . During the element configuration, you'll be able to: • Enter your webhook URL endpoint • Add a secret for validating incoming data 3. Webhook Payload Examples Here are the webhook schemas for different event types : ​*User Management - Create User:*​
Copy code
{
  email: str,
  tenant_key: str,
  role: str,
  permission_level: str,
  type: ElementsWebhookType = "create_user"
}
​*Access Request Webhook:*​
Copy code
{
  requesting_user_id: str,
  access_request_details: {
    tenant: str
    resource: str
    resource_instance: str
    action: str
  },
  reason: str | None,
  status: RequestStatus,
  reviewer_user_id: str | None,
  reviewer_comment: str | None
}
The webhook configuration is available through Permit Elements and can be customized for different event types like user creation, role assignments, and approval flows (1) (2) .
To learn more, see the sources I considered: [[1] Configure Webhooks](https://docs.permit.io/embeddable-uis/webhooks) [[2] Permit Elements](https://docs.permit.io/embeddable-uis/overview)