Spring releases: charge every club member in one batch.See how →

GuideAdmin

API keys and webhooks

Create an API key so your website or another tool can add and update contacts, and a webhook to tell another system when a contact changes.

An API key lets your website’s signup form, or another tool a developer sets up, add and update contacts in OnCloudWine; a webhook tells another system when a contact is created, updated or deleted. You need to be an admin or the owner, and usually a developer, or a tool’s instructions, to tell you where the key goes or which web address to notify.

Try it in the scene: the demo winery creates a key for its website’s signup form and a webhook. Select the ringed control to take each step, or Reset to start again.

Settings

Your account, your winery, and everything OnCloudWine connects to.

Personal details

Preferences

The theme changes straight away on this device. Language is saved to your account.

Step 1: In Settings, select Developers under Winery.

Steps

  1. Select Settings at the bottom of the sidebar, then Developers under Winery.
  2. Under API keys, select Create API key.
  3. In Create API key, type a Name that says what uses the key (for example “Website signup form”), so you know which one to revoke later. Choose Expires on, a year from today unless you change it, or tick Never expires. Select Create key.
  4. Copy your new API key shows the key: copy it into the tool, or somewhere safe such as a password manager. This is the only time it is shown. Select I’ve saved the key. The key is listed with its expiry and when it was last used.
  5. Under Webhooks, select Create webhook.
  6. In Create webhook, type the Send to (web address) you were given, and under Send when keep the events to send: Contact created, Contact updated and Contact deleted are ticked to start with. Optionally type a Signing secret that the receiving system shares with you. Select Create webhook. “Webhook created” confirms it, and the webhook is listed with its events.

What each one does

What Direction What moves
API key Into OnCloudWine A tool holding the key can add and update contacts in your winery. Treat each key like a password.
Webhook Out of OnCloudWine Within seconds of a chosen event, OnCloudWine sends the contact’s details to the web address as an HTTP POST with a JSON body.

With a signing secret, each webhook message carries a signature in the X-Webhook-Signature-256 header, so the receiving system can check it really came from OnCloudWine. The secret is never shown again: when you edit the webhook, leave the field empty to remove it or type a new one to replace it.

Change or remove a key or a webhook

  • Edit on a key changes its name or when it stops working (Save key). The key itself does not change.
  • Revoke asks you to confirm in Revoke “Website signup form”? with Revoke key: anything using the key stops working immediately, and this cannot be undone. Create a new key if you lost one.
  • Edit on a webhook changes its address, events or secret (Save webhook). Delete asks you to confirm with Delete webhook: the address stops receiving contact events.

Good to know

  • Other team members see the keys and webhooks but not the buttons.
  • The Cache section on the same page has Clear cache: use it only if figures look out of date after a big import or a change made outside OnCloudWine. No data is deleted.