- Keep your app’s database in sync with GetProfile
- Trigger custom workflows in real-time
- Monitor profile updates or billing events instantly
How It Works
When an event occurs (like a profile update), GetProfile makes an HTTP POST request to the webhook URL you configured for your tenant. This request includes a JSON payload describing the event. Your server should respond with a 200 OK status to acknowledge receipt.Example Webhook Event
Here’s an example of a profile.updated event:Available Events
Event | Description |
---|---|
profile.updated | Sent when a profile’s data changes |
Configuring Webhooks
- In your GetProfile dashboard, navigate to
Webhooks
. - Click “Create webhook” button, enter the URL of your webhook endpoint (e.g., https://yourapp.com/webhooks/getprofile).
- Save the configuration.
Handling Webhook Requests
Your webhook endpoint should:- Accept
POST
requests withContent-Type: application/json
. - Parse the JSON payload.
- Validate the request using the
Authorization
header. - Respond with 200 OK quickly.
- Process the event asynchronously if needed.
Example in Node.js Express
Security Best Practices
- Only accept requests from trusted sources.
- Validate the
Authorization
header before processing the event. - Use HTTPS for your endpoint.
- Respond quickly (under 5 seconds) to avoid retries.