You can make a request to this endpoint by using a "confirmation_url". You can find this URL in the confirmation message. The confirmation message is returned in the response to a request to the webhook_subscribe endpoint. The confirmation message is returned to the provided "callback_url".
Once a subscription is confirmed, in case a notification message is triggered by an event, it will be delivered to the "callback_url" specified when subscribing to a webhook (webhook_subscribe).
The notification messages contain different fields depending on the event that triggered the notification message:
notification triggered by the addition of an Entry (Entry added)
notification triggered by a change of a Ledger Entry value (Entry value changed)
notification triggered by putting a given Sticker on a Twin (Sticker put)
notification triggered by removing a given Sticker from a Twin (Sticker removed)
notification triggered by a given Sticker expiring (Sticker expired)
List of Entries where an Entry update triggered the notification with details of the Entry update in form of key-value pairs.
Key
Value
new_value
Value of the Entry after the update.
old_value
Value of the Entry before the update. As the Entry was just created, the value is null.
changed_ts
Time at which the value of the Entry was changed. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
sent_ts
timestamp
Time at which the message was sent. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
Message type. For notification messages value should be "Notification".
trigger
string
Trigger of the notification event. If the notification event is trigger by a change to a value of an Entry, the value should be "ledger. entry.updated".
List of Entries where an Entry update triggered the notification with details of the Entry update in form of key-value pairs.
Key
Value
new_value
Value of the Entry after the update.
old_value
Value of the Entry before the update.
changed_ts
Time at which the value of the Entry was changed. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
sent_ts
timestamp
Time at which the message was sent. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
Trigger of the notification event. If the notification event is defined as the put_sticker operation ("publish": ["on_put"], the value should be "sticker.put".
type
string
Message type. For notification messages value should be "Notification".
Message type. For notification messages value should be "Notification".
trigger
string
Trigger of the notification event. If the notification event is defined as the remove_sticker operation ("publish": ["on_remove"], the value should be "sticker.remove".
Message type. For notification messages value should be "Notification".
trigger
string
Trigger of the notification event. If the notification event is to be triggered when the "validity_ts" of a Sticker is reached and the Sticker expires ("publish": ["on_expire"]), the value should be "sticker.expire". A notification message is triggered up to 60 second from the time a Sticker has expired.
Details of the event that triggered the notification message.
Attribute
Type
Description
color
string
User-defined category of the Sticker.
message
string
Message for the recipients of the Sticker.
validity_ts
timestamp
Time at which the Sticker expires. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
created_ts
timestamp
Time at which the Sticker was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
sent_ts
timestamp
Time at which the message was sent. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch(opens new window).
subscription
dictionary
Subscription details.
Attribute
Type
Description
topic
string
Name of the subscription topic. It must match the regular expression(opens new window)^[0-9A-Za-z\-]{3,48}$ In case of Sticker Notifications, the "topic" is always equal to the "color" of the given Sticker..