With this guide, you can easily set up a webhook from your Calendly account to send event updates to our endpoint.
Step 1: Get Your Personal Access Token
1. Log into Calendly: Open Calendly and log into your account.
2. Access Integrations: Go to the "Integrations" section from your profile settings.
3. Create Personal Access Token: Under the "API & Webhooks" section, click on "Get a token" and generate a Personal Access Token (save it securely, you'll need it in the next steps).
Step 2: Create the Webhook
To create a webhook, follow the steps below using a terminal or API tool like Postman.
1. Open Terminal or Postman: You will need to send a POST request to create a webhook.
2. Use the Following cURL Command: Replace the relevant placeholders (like `<YOUR_PERSONAL_ACCESS_TOKEN>` and `<YOUR_ORGANIZATION_ID>`).
curl -X POST https://api.calendly.com/webhook_subscriptions \
-H "Authorization: Bearer <YOUR_PERSONAL_ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://app.coho.ai/api/raw-data/custom-email-as-id?tenantId=<YOUR_TENANT_ID>&userEmailKey=payload.email&dataSourceContext=calendly",
"events": ["invitee.created"],
"organization": "https://api.calendly.com/organizations/<YOUR_ORGANIZATION_ID>",
"scope": "organization"
}'
Details:
- url
: The endpoint where the webhook will send data (our endpoint).
- events
: The type of events you want to receive (e.g., "invitee.created" and "invitee.canceled").
- organization
: The organization URL (you can find this from your Calendly organization settings).
- scope
: Ensure this is set to `"organization"` to get organization-wide events.
Step 3: Verify Webhook Creation
1. You should receive a 201 HTTP status code, indicating the webhook was created successfully.
2. Test by creating or canceling an invite in Calendly, and the webhook should send data to our specified endpoint.
This guide will help you easily create and test the webhook subscription from Calendly to our server. If you run into any issues, feel free to reach out!