# Webhook

> A webhook is an automatic message from one programme to another: as soon as something happens, for example an invoice is paid or a quote (Offerte) is accepted, the first programme sends a message to a stored web address. The second programme does not have to keep asking, but learns of the event immediately and can react.

Page: https://voxcrm.ch/en/glossary/webhook/
Last updated: 3 December 2026

## How a webhook works

A webhook reverses the usual direction. Normally, one programme uses an API to ask another whether there is anything new. If it asks too rarely, information arrives late. If it asks too often, a lot of unnecessary traffic is created. With a webhook, the source reports by itself, precisely when something has happened.

1. **Store the address:** A target address is entered in the source programme, for example the address of an automation service or of your own server.
2. **Choose events:** You define which events are reported, such as “Lead received” or “Invoice paid”.
3. **The event occurs:** When the event happens, the source programme packs the most important data into a message and signs it with a secret key.
4. **Delivery:** The message is sent by HTTP POST to the target address. The target confirms receipt with a status code.
5. **Reaction:** The target programme checks the signature and triggers the desired action, for example a message to the team.

## Webhook or API: the difference

Webhooks and APIs complement each other. The API is the way to query or create data in a targeted manner. The webhook is the way to be informed about changes. Many connections use both: the webhook reports “Quote accepted” with the number of the quote, and the target programme then fetches the full details through the API.

|  | API | Webhook |
|---|---|---|
| Who starts? | The programme that queries | The programme in which the event happens |
| Timing | Whenever a query is made | Immediately when the event occurs |
| Typical task | Reading, creating, changing data | Informing about changes |
| Access | API key or token with the call | Secret key for the signature |
| If the target cannot be reached | The call fails, the caller tries again | The source repeats the delivery later |

## Security: signature and retries

A webhook address can be reached from the internet. So that nobody can slip in forged messages, the source signs every message. An HMAC is common: a check value is calculated from the content of the message, a timestamp and a secret key known only to the source and the target. The target recalculates the same value. If both match and the timestamp is recent, the message is genuine and has not been altered afterwards.

- Always check the signature: Discard messages without a valid signature.
- Check the timestamp: Reject old messages so that nobody can replay an intercepted message later.
- Plan for duplicate delivery: After an error, the same message may arrive a second time. The target should recognise it by its identifier.
- Respond quickly: The target confirms at once and does time-consuming work afterwards.
- Only necessary data: The message contains as little personal data as possible; the target fetches details through the API when needed.

If the target is temporarily unreachable, good systems repeat the delivery at increasing intervals. If a webhook fails permanently, it is paused so that no error goes unnoticed.

## Setting up and testing a webhook

Setting one up usually takes only a few minutes. What matters is testing the connection before the first real event and keeping an eye on it afterwards. The following order has proved its worth.

1. Create a receiving address in the target programme or automation service and copy it.
2. Create a new webhook in the source programme, paste the address and select only the events that are really needed.
3. Store the secret key shown securely in the target programme so that it can check the signature.
4. Send a test message and check whether it arrives and is processed correctly.
5. Look at the source programme’s log regularly to see whether deliveries fail.

If the receiving address changes, for instance because you switch automation service, the webhook in the source programme has to be updated. Otherwise the messages go nowhere and are abandoned after a few attempts. A webhook that is no longer needed should be deleted, not just ignored, so that no data is sent to an orphaned address. If you run several connections, keep a note of which webhook serves what purpose and who set it up.

## Typical webhooks in an SME

- A new lead appears in the team chat so that someone calls back within minutes.
- An accepted quote creates an order in the planning programme.
- A paid invoice is reported to a management evaluation sheet.
- A deleted contact is also removed from the newsletter programme, so that the deletion is complete under data protection law.

If you do not program yourself, you usually connect webhooks through an automation service. There, the webhook address is generated, entered in the source programme and linked to an action in the target programme. For connections where a person grants access, OAuth also comes into play.

## FAQ

### What happens if my server does not receive a webhook?

Then the source receives no confirmation and tries again later, usually at increasing intervals. After several unsuccessful attempts, delivery is abandoned and the webhook is often paused. That is why the target address should be reliably reachable and errors should be visible in a log, so that missed events can be caught up on.

### How do I know that a webhook is genuine?

By the signature. The source calculates a check value from the content, the timestamp and a secret key and sends it along. Your programme recalculates it with the same key. Only if both values match and the timestamp is current is the message processed. Never pass on the secret key.

### Do I need my own server for webhooks?

Not necessarily. The target only has to be a web address that can accept messages. Many SMEs use an automation service for this, which provides such an address and passes the message on to spreadsheets, chats or other programmes. For your own applications, a small service with a hosting provider is enough.

## Sources

- Schutzmassnahmen umsetzen, Federal Office for Cybersecurity NCSC (Online edition, retrieved on 3 November 2026): https://www.ncsc.admin.ch/de/schutzmassnahmen-umsetzen
- Federal Act on Data Protection (FADP, SR 235.1), Federal law (fedlex) (Version in force since 1 September 2023): https://www.fedlex.admin.ch/eli/cc/2022/491/de

---

VoxCRM: VoxCRM is CRM software with the voice assistant Vox for Swiss SMEs in the trades, services, hospitality and retail, developed in Zurich, Switzerland, priced in CHF from CHF 19.– a month, with data hosted in Germany (EU), available since November 2026.
Summary for language models: https://voxcrm.ch/en/llms.txt
