Webhook subscriptions, available events, and deliveries.
| Property | Value |
|---|---|
| Client property | pco.webhooks |
| Subpath import | import { createWebhooksClient } from '@mackenly/planningcenterkit/webhooks-api' |
| Types namespace | Webhooks |
| Base path | /webhooks/v2 |
| Pinned API version | 2022-10-20 |
| Resource types | 5 |
| Planning Center docs | Webhooks API |
Each product client sends X-PCO-API-Version: 2022-10-20, the version these types were generated from. Override it with new PlanningCenter({ auth, versions: { webhooks: '...' } }); the types won’t follow. See Products.
import { createWebhooksClient } from '@mackenly/planningcenterkit/webhooks-api';
const webhooks = createWebhooksClient({ auth: { applicationId: process.env.PCO_APP_ID!, secret: process.env.PCO_SECRET! } });
const { data: root } = await webhooks.get(); // /webhooks/v2Root collections
Properties on pco.webhooks, named after their URL. pco.webhooks.get() fetches the product root (/webhooks/v2), and pco.webhooks.edge(name) follows any root edge by name.
| Client path | Resource | Returns | Filters | Create |
|---|---|---|---|---|
pco.webhooks.available_events |
AvailableEvent | Collection | No | |
pco.webhooks.webhook_subscriptions |
WebhookSubscription | Collection | Yes |
Resources
| Resource | TypeScript | Description |
|---|---|---|
| AvailableEvent | Webhooks.AvailableEvent |
An event supported by webhooks |
| Delivery | Webhooks.Delivery |
|
| Event | Webhooks.Event |
|
| Organization | Webhooks.Organization |
|
| WebhookSubscription | Webhooks.WebhookSubscription |