Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/source/webhooks/bell-button-pressed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Body
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| event | string | event name: "bell-button-pressed" |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| id | string | unique id of the webhook, used for deduplication |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| timestamp | datetime | exact time when the webhook was sent to the receiver |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| userIdentity | string | receiver of the webhook (user identity) |
Expand All @@ -39,8 +41,9 @@ Examples

.. code-block:: js

{
{
"event": "bell-button-pressed",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2024-12-13T07:36:36.9049417+00:00",
Comment thread
kamil-lucyszyn-tedee marked this conversation as resolved.
"userIdentity": "<user-identity>",
"data": {
Expand Down
5 changes: 4 additions & 1 deletion docs/source/webhooks/device-battery-level-changed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Body
+------------------------+---------------------------------------------------+-----------------------------------------------------------+
| event | string | event name: "device-battery-level-changed" |
+------------------------+---------------------------------------------------+-----------------------------------------------------------+
| id | string | unique id of the webhook, used for deduplication |
+------------------------+---------------------------------------------------+-----------------------------------------------------------+
| timestamp | datetime | exact time when the webhook was sent to the receiver |
+------------------------+---------------------------------------------------+-----------------------------------------------------------+
| userIdentity | string | receiver of the webhook (user identity) |
Expand Down Expand Up @@ -43,8 +45,9 @@ Examples

.. code-block:: js

{
{
"event": "device-battery-level-changed",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2022-11-09T14:15:30.244Z",
"userIdentity": "<user-identity>",
"data": {
Expand Down
5 changes: 4 additions & 1 deletion docs/source/webhooks/device-connection-changed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Body
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| event | string | event name: "device-connection-changed" |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| id | string | unique id of the webhook, used for deduplication |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| timestamp | datetime | exact time when the webhook was sent to the receiver |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| userIdentity | string | receiver of the webhook (user identity) |
Expand Down Expand Up @@ -43,8 +45,9 @@ Examples

.. code-block:: js

{
{
"event": "device-connection-changed",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2022-11-09T14:15:30.244Z",
"userIdentity": "<user-identity>",
"data": {
Expand Down
5 changes: 4 additions & 1 deletion docs/source/webhooks/device-settings-changed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Body
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| event | string | event name: "device-settings-changed" |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| id | string | unique id of the webhook, used for deduplication |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| timestamp | datetime | exact time when the webhook was sent to the receiver |
+------------------------+------------------------------------------------+-----------------------------------------------------------+
| userIdentity | string | receiver of the webhook (user identity) |
Expand Down Expand Up @@ -46,8 +48,9 @@ Examples

.. code-block:: js

{
{
"event": "device-settings-changed",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2022-11-09T14:15:30.244Z",
"userIdentity": "<user-identity>",
"data": {
Expand Down
5 changes: 4 additions & 1 deletion docs/source/webhooks/lock-status-changed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Body
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| event | string | event name: "lock-status-changed" |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| id | string | unique id of the webhook, used for deduplication |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| timestamp | datetime | exact time when the webhook was sent to the receiver |
+------------------------+---------------------------------------------+-----------------------------------------------------------+
| userIdentity | string | receiver of the webhook (user identity) |
Expand Down Expand Up @@ -46,8 +48,9 @@ Examples

.. code-block:: js

{
{
"event": "lock-status-changed",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2022-11-09T14:15:30.244Z",
"userIdentity": "<user-identity>",
"data": {
Expand Down
8 changes: 7 additions & 1 deletion docs/source/webhooks/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ Once the webhook URL for your integration is registered, the Tedee system will s

We send webhooks for all connected users separately, which allows you to receive device changes for each user independently.

**Example**: Imagine there is the Tedee lock that has been opened. Suppose the Tedee lock has more than one user - for example, an owner and admin, where both of them are connected to your integration.
**Example**: Imagine there is the Tedee lock that has been opened. Suppose the Tedee lock has more than one user - for example, an owner and admin, where both of them are connected to your integration.
In that case, two webhook notifications will be received on your webhook URL. The 'Data' object in the webhook notifications is identical, but user identities differ.

**Deduplication**

Every webhook payload contains a unique ``id`` field. The same value is also sent as the ``Idempotency-Key`` HTTP request header on the POST request.
If a delivery is retried (for example after a network issue or a non-2xx response from your endpoint), the retry carries the same ``id`` and the same ``Idempotency-Key`` header value as the original attempt.
Use either of these to detect and discard duplicate deliveries on your side.

**Available webhooks**

- `Device battery level changed <device-battery-level-changed.html>`_
Expand Down