Class Webhook
Represents a webhook configuration that triggers HTTP requests on specified events.
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public class Webhook : EntityBase, IRememberBeingDirty, ICanBeDirty, IWebhook, IEntity, IDeepCloneable
Constructors
View SourceWebhook(string, bool?, Guid[]?, string[]?, IDictionary<string, string>?)
Initializes a new instance of the Webhook class.
Declaration
public Webhook(string url, bool? enabled = null, Guid[]? entityKeys = null, string[]? events = null, IDictionary<string, string>? headers = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | The URL to send webhook requests to. |
| bool? | enabled | Indicates whether the webhook is enabled. Defaults to |
| Guid[] | entityKeys | The content type keys that trigger this webhook. |
| string[] | events | The event aliases that trigger this webhook. |
| IDictionary<string, string> | headers | Custom HTTP headers to include in webhook requests. |
Properties
View SourceContentTypeKeys
Gets or sets the content type keys that filter which content triggers this webhook.
Declaration
public Guid[] ContentTypeKeys { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid[] |
Remarks
If empty, the webhook triggers for all content types.
Description
Gets or sets the description of the webhook.
Declaration
public string? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Enabled
Gets or sets a value indicating whether the webhook is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Events
Gets or sets the event aliases that trigger this webhook.
Declaration
public string[] Events { get; set; }
Property Value
| Type | Description |
|---|---|
| string[] |
Headers
Gets or sets the custom HTTP headers to include in webhook requests.
Declaration
public IDictionary<string, string> Headers { get; set; }
Property Value
| Type | Description |
|---|---|
| IDictionary<string, string> |
Name
Gets or sets the display name of the webhook.
Declaration
public string? Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Url
Gets or sets the URL to send webhook requests to.
Declaration
public string Url { get; set; }
Property Value
| Type | Description |
|---|---|
| string |