Plek is built API-first, so other systems can work with your data: a CRM, a newsletter tool, Zapier or your own website. An API key lets another system ask Plek for information or make changes. A webhook works the other way round: Plek tells your system as soon as something happens, such as a new booking or a payment.
Create an API key
- Go to Settings > Team & integrations > API & webhooks.
- Under API keys, fill in a Name that says what uses it, e.g. "Zapier".
- Choose a Role. The key can do exactly what that role allows, so give it only what it needs, e.g. a role that can only read bookings.
- Click Create key.
- Copy the key right away and store it safely: it is shown only once. Click I've stored it.
- In the other system, send the key in the
X-Api-Keyheader (or as a Bearer token).
If your organisation has more than one location, you can limit the key to certain locations: tick that option and pick the locations before you create the key. The key then only sees those locations' sessions, bookings, customers and so on, exactly like a team member limited to locations. You can only limit a key to locations you can reach yourself; a key with an Admin role always covers every location.
The list shows when each key was Created and Last used. Click Revoke to stop a key: anything using it stops working immediately.
Add a webhook
- On the same page, under Webhooks, click Add webhook.
- Fill in the URL: a public https:// address of the system that should receive the events.
- Add a Description (optional) and tick the Events to send, for example:
- A booking is confirmed / cancelled
- A customer account is created
- A payment is received / (partly) refunded
- A session is cancelled, or its coaches change
- A late-cancellation or no-show fee is charged
- Venue hire events: requested, quoted, accepted, confirmed, declined, expired, cancelled
- Keep Active on and save.
- Copy the signing secret that is shown once and store it in the receiving system.
- Click Send a test event to check that your system receives it.
Follow up on deliveries
Open the Delivery log of a webhook to see Recent deliveries with their status (Pending, Delivered, Failed), the response and the number of attempts. Failed deliveries are retried for about half a day; Send again queues one again by hand.
Tips
- Every request is signed with the webhook's secret (the
Plek-Signatureheader). Check it before trusting the request, and usePlek-Event-Idto ignore duplicates. - Lost the secret, or someone saw it? Click New signing secret and update your receiving system.
- Webhooks never contain more than needed: no children's or medical details.
- Only Admins, or roles that may manage API keys & webhooks, see this page.
- To connect an AI assistant, use the normal sign-in described in "Connect an AI assistant" rather than an API key where you can.
Related articles
- Connect an AI assistant (Claude, ChatGPT)
- Roles and permissions
- Bookkeeping integrations: Billit and Yuki