Skip to content

Webhook mechanism

François Dupont edited this page Jun 4, 2026 · 6 revisions

Webhook mechanism

A webhook mechanism is available to avoid query the API to see if there's new data

Capture d’écran 2024-12-03 à 16 03 51

You can setup the URLs where to receive the events in the Nolio API admin.

There are currently 2 webhooks

  • One of for events in the achieved Calendar (Training, Note, Competition)
  • One for new metrics

If you leave it blank, no webhook will be triggered.

Here's example event you will receive

For events:

{
  "notif_type": "new_event",
  "object_type": "Training",
  "object_id": 32263,
  "user_id": 10,
  "date_object": "2024-12-02",
  "livemode": true
}

For metrics:

{
  "notif_type": "updated_metric",
  "object_type": "Metrics",
  "object_id": 10499,
  "user_id": 100,
  "date_object": "2024-12-03",
  "metric_type": "nombredepas",
  "livemode": true
}

Notif type can be

  • new_event
  • updated_event
  • deleted_event
  • new_metric
  • updated_metric
  • deleted_metric

livemode & test deliveries

Every payload carries "livemode":

  • true — a real event (all production webhooks).
  • false — a test delivery sent from the Send test button on your app's Webhooks page in the portal. Test deliveries also use "object_id": 0 (a sentinel that never resolves). Never treat a livemode: false payload as a real event — ignore it, or use it only to confirm your endpoint receives the request and reads the X-Nolio-Key.

livemode is an additive field (2026-06): it removes nothing, existing integrations can ignore it.

There is a webhook code on the app that is generated by default, and you can change it in the admin. Capture d’écran 2024-12-03 à 16 10 47

This code in set up as a HTTP Header in the request we will send, to verify it's coming from Nolio.

The code is set up in http-x-nolio-key header. Use it to discard calls you receive that do not contains the good code.

Clone this wiki locally