🪝Create Webhooks
Get notified when there are changes/updates to accounts, calendars, and events.
You can use webhooks for 2-way syncing of calendar events. All you need to do is provide Pyas with a webhook URL and select the events you would like to receive notifications for.
Note: Using webhooks for 2-way syncing is only supported for Google and Microsoft at this time.
How it Works
You provide a webhook URL.
You choose which triggers/notifications you want to receive from Pyas.
Pyas sends the notifications in a POST request to the webhook URL that you provided.
You receive and handle the notifications on your end.
Pyas will send notifications for the following triggers:
Accounts - these are for your users' connected accounts in Pyas.
account.connected
account.inactive
account.deleted
Calendars - these triggers currently work for Google only.
calendars.created
calendars.deleted
Calendar Events - these triggers work for Google and Microsoft.
events.created
events.updated
events.deleted
The Webhook Request
Method
POST
Headers
Each request has the following headers:
Body
The request body for Calendar Events notifications will have an events array and looks like this:
The request body for Calendar notifications will have an array of calendar ids and looks like this:
The request body for Account notifications is empty.
Create a new Webhook
Login to your Pyas account and click on the Apps tab on the left menu.
Select the app that you want to set the webhook for.
From the app screen, click on the Webhooks tab.
Click on the Create Webhook button.
Add your webhook URL. This is a URL that should be setup on your server to receive the webhook notifications from Pyas.
Select the triggers that you want. These are events/notifications that Pyas will send to your server.
Click the Create button.
That's it!
Last updated