Search the docs
Menu
Updated Edit on GitHub

Webhooks

Copy as Markdown

A webhook sends the events you pick to an address of yours, as a JSON POST signed with a secret only the server and your receiver know. A script, a ticket system or an automation tool can then act on an alert, a new device or a help request. Webhooks are under Settings, Integrations, in the section Webhooks, above the notification channels. The tab needs Change server settings, which Super admin and Server admin accounts have by default.

The Integrations tab with three webhooks, one of them switched off by the server, and six notification channels, full size

Add a webhook

Click Add webhook and fill in:

  • Name: what the webhook is for, at most 80 characters.
  • Address: where the events go, starting with https:// or http://. Addresses in your own network work; see Addresses the server refuses.
  • Events: the events this webhook gets, ticked one by one or a group at a time; see Events.
  • Which devices: All devices, One organization or One device group; see Scope.
  • Custom headers: sent with every delivery; see Custom headers.
  • On: off, the server sends nothing and drops the events meant for the webhook.

Click Add webhook. The server makes the signing secret and shows it once, under Webhook added: copy its signing secret. Copy it into your receiver now; the console can't show it again.

The row's menu has Change, Send a test, Delivery log, New secret, Switch off or Switch on, and Delete. Changes apply to the next event.

What a delivery looks like

Each event is one POST with this JSON body:

{
  "version": 1,
  "delivery_id": "dlv_efc1643f-2847-4b68-a339-b94fbe5f629d",
  "event": {
    "id": "evt_9628bdb3-3e38-4255-8b0e-932f3bd1734d",
    "type": "alert.raised",
    "occurred_at": "2026-11-30T01:02:12.082Z",
    "organization_id": "5ece1b8c-7d7d-4698-a791-8dd054c20b27",
    "device": { "id": "900100031", "name": "reception-03" },
    "subject": "Computer offline",
    "link": "https://desk.example.com/devices?open=900100031",
    "data": {
      "message": "Computer offline: offline_duration = 763560 (gt 600)",
      "metric": "offline_duration",
      "rule_id": "3",
      "rule_name": "Computer offline",
      "severity": "critical",
      "triggered_at": "2026-11-30T01:02:11.928Z",
      "value": 763560
    }
  },
  "server": { "name": "Fernhill IT", "url": "https://desk.example.com" }
}
Field What it holds
version The version of this format, 1 today. New fields come without a new version; a field that is removed or renamed raises it.
delivery_id The delivery. Every attempt of one delivery has the same ID; Redeliver makes a new one.
event.id The event. It stays the same when a delivery is redelivered, so use it to drop duplicates.
event.type One of the event types.
event.occurred_at When it happened: RFC 3339 in UTC with milliseconds, as every time in the API.
event.organization_id, event.device The organization and device it belongs to, when there is one.
event.device.fields The device's values of its device fields, by key, when it has any. Restricted fields are left out, and a webhook of an organization gets only the server's fields and its own organization's. The values are read when the delivery goes out. Syslog targets with Format JSON get them too; chat messages and CEF lines don't.
event.subject What it is about in a few words: the rule's name, the ticket's title.
event.link The alert, device, ticket or page in the console. It is there only when the server knows the console's public address, the one its mails link to (PANEL_PUBLIC_URL, see Addresses and ports).
event.data The details of that type of event.
server The server's name, as Settings, Branding sets it, and its address.

The request carries these headers:

Header Value
Content-Type application/json
User-Agent NeoDesk-Webhooks/1
X-NeoDesk-Event The event type, such as alert.raised
X-NeoDesk-Delivery The delivery ID
X-NeoDesk-Timestamp When the request was signed, in Unix seconds
X-NeoDesk-Signature sha256= and the signature in hex

Answer with any 2xx status to confirm the delivery. The server waits 15 seconds for the answer and keeps its first 1 kB for the delivery log.

Check the signature

The signature is an HMAC-SHA256, keyed with the webhook's signing secret, over the timestamp header, a dot and the raw body. Compute it the same way, compare in constant time, and refuse a timestamp more than a few minutes away, so an old request can't be sent again. In Python:

import hashlib
import hmac
import time


def is_from_neodesk(secret: str, timestamp: str, signature: str, body: bytes) -> bool:
    """timestamp and signature are the X-NeoDesk-Timestamp and X-NeoDesk-Signature headers,
    body the request body exactly as it arrived."""
    if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > 300:
        return False
    mac = hmac.new(secret.encode(), timestamp.encode() + b"." + body, hashlib.sha256)
    return hmac.compare_digest(signature, "sha256=" + mac.hexdigest())

Check the body before you parse it: JSON parsed and written out again may differ in a byte and fail the check.

A new secret

New secret in the row's menu, or in Change under Signing and state, makes a new signing secret and shows it once. The old one stops working at once, and the deliveries from then on are signed with the new one, so put it into your receiver right away. Make a new one when the secret got lost or may have leaked.

Events

Group Event Type
Alerts Alert raised alert.raised
Alert acknowledged alert.acknowledged
Quiet hours summary alert.summary
Devices Device online device.online
Device offline device.offline
Device deleted device.deleted
Device ID changed device.id_changed
Device asks to join device.join_requested
Help requests Help request opened help_request.opened
Help request closed help_request.closed
Tickets Ticket created ticket.created
Ticket changed ticket.changed
Ticket commented ticket.commented
Ticket closed ticket.closed
Remote sessions Remote session started session.started
Remote session ended session.ended
Quick support Quick support feedback quick_support.feedback
Chat Person waiting in chat chat.waiting
Workflows Workflow alert workflow.alert
Workflow message workflow.message
Maintenance Maintenance window started maintenance.started
Maintenance window ended maintenance.ended

Send a test sends webhook.test, which no webhook can subscribe to. Quiet hours summary comes when a rule's quiet hours end and lists the alerts they recorded; it also goes to the rule's channels. Maintenance window started and ended come with each run of a maintenance window. The end's held_alerts counts the alerts the run held; alerts held in the grace time after it aren't in it. The Held alerts column on the Maintenance tab counts both, so it can be higher. Workflow alert and Workflow message come from the steps Send alert and Send message of a fleet workflow. Person waiting in chat comes at the same time as the mail when someone waits, so only while that mail is on.

neodesk integrations events lists the types the server knows.

Scope

Which devices sends the events of all devices, or only those of One organization or One device group. With a scope, events that belong to no device or organization, such as a new ticket without a device, are not sent. A device group scope also needs a device, so workflow alerts and messages, which belong to an organization but to no single device, don't reach it.

Custom headers

Add a header adds a name and a value that go with every delivery, for a receiver that wants a token such as Authorization. A webhook takes up to 20. The values are secrets: they are stored encrypted and show as ******** in Change; leave them as they are to keep them. Headers that NeoDesk or the connection sets, such as Content-Type, User-Agent, Host and the X-NeoDesk- headers, can't be custom headers.

Test and delivery log

Send a test sends a webhook.test event at once, also to a webhook that is switched off, and shows what the receiver answered. A test is tried once and doesn't count towards switching the webhook off.

Delivery log lists the newest 50 deliveries with their status, event, attempts, HTTP status, time and duration, kept for 30 days. A click on a row shows the body as sent, the receiver's answer, the error and the next attempt, and Redeliver sends it again within a few seconds.

The delivery log of a webhook with a delivered test and a failed delivery of Ticket created, answered with 410, full size

Retries and switching off

A delivery that fails is tried again, up to 12 times in all, after 30 seconds, then twice as long each time, up to 6 hours between attempts. A Retry-After header in the answer can ask for a longer wait, up to 6 hours. Deliveries that keep failing end after about 15 hours.

The server switches a webhook off after 20 failed attempts in a row that span at least 6 hours, or at once when the receiver answers 410 Gone. A notice at the top of the tab names it, the deliveries still waiting are cancelled, and the audit log has an entry. Fix the receiver and click Switch on in the row's menu. When deliveries fail on the channels page has the details; webhooks and channels share them.

Addresses the server refuses

The server refuses loopback addresses, link-local addresses, multicast and the cloud metadata addresses such as 169.254.169.254, and checks the address it connects to, so a redirect or a name that resolves to one of them is refused too. Private addresses, such as a receiver at 10.0.0.20, work.

From the command line

neodesk integrations has the same actions: create, list, show, update, delete, test, deliveries, delivery, redeliver and rotate-secret. For example, a webhook for alerts and devices going offline:

neodesk integrations create -f kind=webhook -f name=Ops -f url=<address> -F 'events=["alert.raised","device.offline"]'

Put your receiver's address in place of <address>. The answer holds the signing secret, the only time it is shown. See the command reference.

Type to search pages, sections, commands and settings.