You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update webhooks code samples to replace IPublishedSnapshotAccessor with IPublishedContentCache, IPublishedMediaCache, IPublishedMemberCache and IPublishedContentTypeCache dependencies.
Umbraco developers will need to inject `IPublishedContentCache`, `IPublishedMediaCache`, `IPublishedMemberCache` and `IPublishedContentTypeCache` dependencies individually, instead of injecting the `IPublishedSnapshotAccessor` as would have been done previously.
185
+
{% endhint %}
186
+
184
187
To replace the default Umbraco webhook with your custom implementation:
185
188
186
189
```csharp
@@ -196,20 +199,24 @@ public class MyComposer : IComposer
196
199
## Webhook Settings
197
200
198
201
Webhook settings are configured in `appsettings.*.json` under `Umbraco::CMS`:
Webhooks provide real-time, event-driven communication within Umbraco. They enable external services to react to content changes instantly by sending HTTP requests when specific events occur. This allows you to integrate with third-party services, automate workflows, and synchronize data effortlessly.
8
8
9
9
## Getting Started
10
-
11
10
To manage webhooks, navigate to **Settings > Webhooks** in the Umbraco backoffice.
@@ -17,13 +16,10 @@ To create a webhook, click **Create**. This opens the webhook creation screen wh
17
16

18
17
19
18
## Configuring a Webhook
20
-
21
19
### URL
22
-
23
20
The `Url` is the endpoint where the webhook will send an HTTP request when the selected event is triggered. Ensure this endpoint is publicly accessible and capable of handling incoming requests.
24
21
25
22
### Events
26
-
27
23
Webhooks are triggered by specific events in Umbraco. By default, the following events are available:
28
24
29
25
| Event Name | Description |
@@ -35,37 +31,31 @@ Webhooks are triggered by specific events in Umbraco. By default, the following
35
31
| Media Saved | Fires when a media item is saved. |
36
32
37
33
### Content Type Filtering
38
-
39
34
For **Content** or **Media** events, you can specify whether the webhook should trigger for all content types or only specific ones. This is useful when you only need webhooks for certain document types, such as blog posts or products.
40
35
41
36
### Custom Headers
42
-
43
37
You can define custom HTTP headers that will be included in the webhook request. Common use cases include:
Umbraco webhooks come with predefined settings and behaviors.
52
45
53
46
### JSON Payload
54
-
55
47
Each webhook event sends a JSON payload. The following types of payloads are available by default.
56
48
57
49
#### Legacy
58
-
59
50
This is the current default but will be removed in a future version. Legacy payloads follow the format used before version 16. They are inconsistent and may include data that should not be exposed or has been superseded (e.g., use of `int` instead of `Guid`).
60
-
#### Minimal
61
51
52
+
#### Minimal
62
53
This will become the default in version 17 and later. Minimal payloads include only essential information to identify the resource. For most events, this means a unique identifier. Some events may include additional data. For example, a document publish event also includes the list of published cultures.
63
-
#### Extended
64
54
55
+
#### Extended
65
56
Extended payloads include all relevant information for an event, where available. However, sensitive data, such as usernames, member names, or email addresses, is excluded for privacy and security reasons. If an extended payload is not available for an event, the system falls back to the minimal payload.
66
57
67
58
### Configuring Payload Types
68
-
69
59
Payload type can be configured in the following ways:
70
60
71
61
- Changing the appsetting `Umbraco:CMS:Webhook:PayloadType`. Be aware that the system that uses this value runs before any composers. If you manipulate the `WebhookEventCollectionBuilder` in any way, then those methods will not automatically pick up this app setting.
Umbraco developers will need to inject `IPublishedContentCache`, `IPublishedMediaCache`, `IPublishedMemberCache` and `IPublishedContentTypeCache` dependencies individually, instead of injecting the `IPublishedSnapshotAccessor` as would have been done previously.
202
+
{% endhint %}
203
+
211
204
To replace the default Umbraco webhook with your custom implementation:
212
205
213
206
```csharp
@@ -224,19 +217,24 @@ public class MyComposer : IComposer
224
217
225
218
Webhook settings are configured in `appsettings.*.json` under `Umbraco::CMS`:
0 commit comments