Webhooks
Outgoing webhooks are available for Lock and Unlock events from our system. Upon initial setup of your application you may provide UniKey with a desired destination webhook URL and, if approved by the User, will receive event notifications via POST to that url.
Webhook Body
Properties
Name |
Type |
Description |
lock_id |
UUID |
The ID of the Lock |
type |
String |
The Lock Event type (see: Lock Event Types) |
performer |
User |
The User who performed the Lock Event (if applicable) |
timestamp |
DateTime |
When this Lock Event occurred |
value |
Float |
A reported value corresponding with the given event, for example battery level on a 0-1 scale (if applicable). |
metadata |
Metadata |
Useful information about the webhook event |
Lock Event Types
Name |
Description |
lock |
The Lock was locked |
unlock |
The Lock was unlocked |
battery |
The Lock battery status has changed |
Webhook Example
{
"lock_id": "b385e960-35cf-4af4-84bb-1285f20ca3bd",
"type": "lock",
"timestamp": "8/4/2016 2:23:57 PM",
"value": 0.0,
"performer": {
"id": "d80e201a-c99b-491f-b9f3-940d624751da",
"name": "Saul Goodman"
},
"metadata": {
"application_id": "c71be57f-a62a-443e-9fbb-074dfd38e299"
}
}
Metadata Body
Properties
Name |
Type |
Description |
application_id |
UUID |
The ID of the application receiving the webhook |
{
"metadata": {
"application_id": "c71be57f-a62a-443e-9fbb-074dfd38e299"
}
}