Webhooks
When you configure an HTTP notification method, Angelcam sends a signed POST request to your URL whenever a notification rule fires.
Request body
Section titled “Request body”The body is a JSON object. All notifications include these common fields:
| Field | Description |
|---|---|
user_name |
Name of the user |
user_email |
Email of the user |
title |
Notification title |
short_message |
Short description |
long_message |
Long description |
Additional fields by notification type:
Incident notifications:
| Field | Description |
|---|---|
incident_id |
ID of the incident |
incident_category |
Category of the incident |
sensor_name |
Name of the triggering sensor |
incident_false_alarm |
true / false / null (unknown) |
Action notifications:
| Field | Description |
|---|---|
action |
Action that was performed |
invoker |
Who performed the action |
Camera status notifications:
| Field | Description |
|---|---|
camera_id |
Camera ID |
camera_name |
Camera name |
online |
true if online |
Arrow client status notifications:
| Field | Description |
|---|---|
arrow_client_id |
Arrow client ID |
angelbox_id |
Angelbox ID (if applicable) |
mac_address |
MAC address |
online |
true if online |
affected_cameras |
List of affected camera IDs |
Signature verification
Section titled “Signature verification”Each request includes an X-Angelcam-Signature header containing a JWT token signed with the key of the notification method. Angelcam generates that key when the method is created and returns it as signature_private_key; it cannot be set from a client.
The JWT claims:
| Claim | Description |
|---|---|
iat |
Issued at timestamp |
nbf |
Not before (60 seconds in the past) |
exp |
Expiration (120 seconds in the future) |
ver |
Token version (currently 1) |
csm |
Base64-encoded SHA-256 hash of the request body |
Verify the signature using your private key and confirm that csm matches the body hash to ensure the request is authentic and untampered.
Trying a webhook out
Section titled “Trying a webhook out”POST /rts/notifications/methods/{method_id}/test/ sends one request to the webhook right away,
signed and shaped like a real notification, and answers with the status code your server returned.
The test payload carries "test": true and a made-up camera, so you can keep it out of your
production handling:
{ "test": true, "user_name": "Jana Nováková", "user_email": "jana@example.com", "camera_id": "0", "camera_name": "Test camera", "online": false, "title": "Camera offline", "short_message": "Your camera Test camera went offline.", "long_message": "Your camera Test camera went offline."}Reaching a URL in a local network
Section titled “Reaching a URL in a local network”A webhook normally goes out from the Angelcam cloud, so its URL has to be reachable from the
internet. To call a server inside your own network, set arrow_client to the UUID of an Angelcam
Connector at that location and Angelcam routes the request through it. Notification rules for such
a webhook are accepted only in the space that owns the Connector.