Skip to content
Namens

Developers · Webhooks

Available

How does my software know that something changed?

With a webhook. Namens calls your address when something happens: the register changed, messages came in, an item got a deadline or a mandate changed state. Every webhook is signed, and none contains the content of a message.

The events
EventWhen
register.changedThe register changed for a number you follow, or for a company your organisation follows.
message.receivedA new message came in for a followed company. You get the description, not the content.
message.handledSomeone marked an item as handled.
deadline.setAn item got a deadline, or the deadline changed.
mandate.changedThe state of a mandate changed: none, requested, waiting, active or refused.

How is a webhook built?

  • Three headers: the id of the event, the timestamp and the signature.
  • The content is JSON, with the type of event and the data.
  • The same id never comes back with different content: you can safely deduplicate on it.

What does my address have to do?

  1. Check the signature with your secret.
  2. Answer with a 2xx within a few seconds.
  3. Do the real work afterwards, not during the call.

An organisation can set up 5 addresses, each with its own secret and its own choice of events.

mandate.changed
{
    "type": "mandate.changed",
    "data": {
        "company": {
            "enterprise_number": "0100000169",
            "name": "Bakkerij De Korenaar"
        },
        "source": "ebox",
        "before": "waiting",
        "after": "active"
    }
}
The headers
webhook-id: <event id>
webhook-timestamp: <timestamp>
webhook-signature: v1,<signature>

Frequently asked questions

Is the content of a message in a webhook?

No, never. A webhook describes the item: company, source, sender, type and dates. Fetching the content is a separate, explicit call.

How do I know a webhook really comes from Namens?

Every webhook is signed as the Standard Webhooks convention describes: a signature over the id, the timestamp and the content, with a secret only you and we know. Ready-made libraries exist for this.

What if my address does not answer for a while?

Then we try again, each time with a longer pause: after 1 min, 5 min, 30 min, 2 hours, 12 hours. An address that only failed for 3 days is switched off.

Can I also request the same myself?

Yes. What a webhook reports you also find with an ordinary call: the changes in the register, the inbox, the deadlines. So you miss nothing if a webhook got lost.

Where do I start?

Available
  1. Create an account. You start in the simulator, with sample companies and sample messages.
  2. Create a test key in the simulator. It answers with the sample companies and never asks anything of the real register.
  3. Build and test against the test key. A real key then works the same way, on real data.

All pages for developers

The reference is made from the same list as the API itself. If it says something different from here, the reference is right.