Site
A list of available Duda Webhook Events.
Site
Configuring WebhooksYou can configure and manage webhooks programmatically using the Webhooks REST methods. You do not need to contact support to enable webhooks—use the Create Webhook endpoint to subscribe to any of the events listed below.
All webhooks related to site events are listed below.
Publish
A notification is sent when a site is published. A publish can be triggered inside the Duda editor or via the publish API endpoint. Event type: PUBLISH
{
"data": {
"republish": false,
"first_publish": true
},
"resource_data": {
"site_name": "sw1d3f9f18eb4c82a472402505a731a1",
"external_id": "my-external-id"
},
"source": {
"type": "EDITOR",
"account_name": "[email protected]"
},
"event_type": "PUBLISH",
"event_timestamp": 1532467846492,
"resource_type": "site"
}| Name | Type | Description |
|---|---|---|
| data.republish | boolean | Boolean stating if this was a republish of an already published site |
| data.first_publish | boolean | Boolean stating if this was the first publish of a site |
| source.type | string | The location of the source for the publish event. Possible values are EDITOR or API |
| source.account_name | string | If a publish was triggered through the editor, then this contains the account who initiated the publish |
| resource_type | string | Always set to site for the publish event |
If a site is published after it was unpublished, then both
republishandfirst_publishare false
Unpublish
A notification is sent when a site is unpublished. An unpubilsh can be triggered inside the Duda editor or via the unpublish API endpoint. Event type: UNPUBLISH
{
"data": 1532482228987,
"resource_data": {
"site_name": "sw1d3f9f18eb4c82a472402505a731a1",
"external_id": "my-external-id"
},
"source": {
"type": "EDITOR",
"account_name": "[email protected]"
},
"event_type": "UNPUBLISH",
"event_timestamp": 1532471227566,
}| Name | Type | Description |
|---|---|---|
| source.type | string | The location of the source for the unpublish event. Possible values are EDITOR or API |
| source.account_name | string | If an unpublish was triggered through the editor, then this contains the account who initiated the unpublish |
Form Submission
A notification is sent when a new form submissions takes place on a site. Event type: CONTACT_FORM_SENT_V2
{
"data": {
"utm_campaign": "MY_CAMPAIGN",
"utm_source": "MY_SOURCE",
"utm_medium": "MY_MEDIUM",
"utm_term": "MY_TERM",
"utm_content": "MY_CONTENT",
"additionalParams": {
"utm_<custom>": "custom",
"utm_<custom>": "custom 2"
},
"fieldsData": [
{
"field_label": "Name",
"field_value": "sdfsdf",
"field_type": "text",
"field_key": "",
"field_id": "dmform-00"
},
{
"field_label": "Message",
"field_value": "sdfsdf",
"field_type": "message",
"field_key": "",
"field_id": "dmform-01"
},
{
"field_label": "Title",
"field_value": "Contact Us",
"field_type": "form_title",
"field_key": "",
"field_id": null
}
],
"recipients": [
"[email protected]"
],
"emailSubject": "Subject set in form widget",
"emailSender": "Sender set in form widget",
"pageName": "Page Name"
},
"source": null,
"resource_data": {
"site_name": "974d714008f440529ea58094ccf9a97c",
"external_id": "my-ext-id"
},
"event_timestamp": 1569338502786,
"event_type": "CONTACT_FORM_SENT_V2"
}| Name | Type | Description |
|---|---|---|
| data.utm_campaign | string | Value of the utm_campaign query parameter when the form was submitted |
| data.utm_source | string | Value of the utm_source query parameter when the form was submitted |
| data.utm_medium | string | Value of the utm_medium query parameter when the form was submitted |
| data.utm_term | string | Value of the utm_term query parameter when the form was submitted |
| data.utm_content | string | Value of the utm_content query parameter when the form was submitted |
| data.additionalParams | object | Object containing any additional query params not listed above that begin with utm_. Query parameters that don't match this pattern will not be included. |
| data.fieldsData | array | Array of all fields from the submitted form |
| data.recipients | array | Array of emails designated as recipient of form data |
| data.emailSubject | string | Subject set in form widget |
| data.emailSender | string | Sender set in form widget |
| data.pageName | string | Page name of page on which the form was placed |
Site Creation
A notification is sent when a site is created. A site creation can be triggered inside the Duda editor or via the API. Event type: SITE_CREATED
{
"resource_data": {
"site_name": "dfdd3f9f18eb4c82a472402505a731a1",
"external_id": "my-external-id"
},
"source": {
"type": "EDITOR",
"account_name": "[email protected]"
},
"event_type": "SITE_CREATED",
"event_timestamp": 1532467846492,
"resource_type": "site"
}| Name | Type | Description |
|---|---|---|
| source.type | string | The location of the source for the unpublish event. Possible values are EDITOR or API |
| source.account_name | string | This contains the account who initiated the site creation. |
| resource_type | Always set to site for the site creation event |
Domain Update
A notification is sent when the domain of a site is updated. A domain change can be triggered inside the Duda editor or via the update site API endpoint. Event type: DOMAIN_UPDATED
{
"data": {
"domain": null,
"sub_domain": "example-time.multiscreensite.com",
"alternate_domains": []
},
"resource_data": {
"site_name": "sw1d3f9f18eb4c82a472402505a731a1",
"external_id": "my-external-id"
},
"source": {
"type": "EDITOR",
"account_name": "[email protected]"
},
"event_type": "DOMAIN_UPDATED",
"event_timestamp": 1532471131957,
"resource_type": "site"
}| Name | Type | Description |
|---|---|---|
| data.domain | string | The current domain for the site. The value can be null |
| data.sub_domain | string | The current subdomain (default domain) for the site. |
| data.alternate_domains | array | List of optional alternate domains defined for this site |
| source.type | string | The location of the source for the publish event. Possible values are EDITOR or API |
| source.account_name | string | If a publish was triggered through the editor, then this contains the account who initiated the publish |
| resource_type | string | Always set to site for the domain update event |
Certificate Created
A notification is sent when the SSL certificate for a site is generated. The same created event will also fire when the status is updated to COMPLETE. Event type: CERTIFICATE_CREATED
Certificate RegenerationA webhook event is not triggered when the certificate is generated. Duda will renew/regenerate a new certificate every 3 months, but no event will be triggered when this occurs.
{
"data": {
id: "12345abc",
domains: ["www.domain.com","domain.com"],
deployment_status: "DEPLOYED",
created: 1532467846492
},
"resource_data": {
"site_name": "8a8eda"
},
"event_type": "CERTIFICATE_CREATED",
"event_timestamp": 1683201225981
}
| Name | Type | Description |
|---|---|---|
| data.id | string | The id of the certificate generated. |
| data.domains | array | List of domains assigned to the generated certificate. This should include alternate domains and the www value, as well. |
| data.deployment_status | string | Status of the generated certificate. Can be: PENDING, DEPLOYED, or FAILED. |
Certificate Deleted
A notification is sent when the SSL certificate for a site is deleted. Event type: CERTIFICATE_DELETED
{
"data": {
id: "12345abc",
domains: ["www.domain.com","domain.com"],
created: 1532467846492,
},
"resource_data": {
"site_name": "8a8eda"
},
"event_type": "CERTIFICATE_DELETED",
"event_timestamp": 1683201225981
}| Name | Type | Description |
|---|---|---|
| data.id | string | The id of the certificate deleted. |
| data.domains | array | List of domains associated with the deleted certificate. |
Site Plan Changed
A notification is sent when the plan ID of a site has been changed. Event type: SITE_PLAN_CHANGED
{
"data": {
"newPlanId":804,
"siteAlias":"2dbf8579",
"previousPlanId":802
},
"source": {
"type":"EDITOR",
"account_name":"[email protected]"
},
"resource_data": {
"site_name":"2dbf8579"
},
"event_timestamp":1686861354729,
"event_type":"SITE_PLAN_CHANGED"
}
| Name | Type | Description |
|---|---|---|
| data.newPlanId | int | The ID of the new Plan assigned to the site. |
| data.siteAlias | string | Duda's unique identifier for the Site. |
| data.previousPlanId | int | The ID of the plan the site was previously assigned to. |
| source.type | string | The location of the source for the plan changed event. Possible values are EDITOR or API |
| source.account_name | string | This contains the account who initiated the plan change. |
Backup Restored
A notification is sent when a backup is restored for a site. Event type: SITE_RESTORED
{
"data": 1686862504428,
"source": {
"type": "EDITOR",
"account_name": "[email protected]"
},
"resource_data": {
"site_name": "2dbf8579"
},
"event_timestamp": 1686862504455,
"event_type": "SITE_RESTORED"
}| Name | Type | Description |
|---|---|---|
| data | timestamp | The date the back up was restored in Unix format |
| source.type | string | The location of the source for the backup restored event. Possible values are EDITOR or API |
| source.account_name | string | This contains the account who initiated the backup restore. |
Site Reset
A notification is sent when a site is reset. Event type: SITE_RESET
{
"data": {
"old_template_id": 1000056,
"new_template_id": 1000041
},
"source": {
"type": "API"
},
"resource_data": {
"site_name": "474b4e63"
},
"event_timestamp": 1732225203882,
"event_type": "SITE_RESET"
}| Name | Type | Description |
|---|---|---|
| data.old_template_id | string | The id of the template the site was originally using |
| data.new_template_id | string | The id of the template the site is now using |
| resource_date.site_name | string | The site id of the site. |
Switch Template
A notification is sent when a site's template is switched. Event type: SITE_TEMPLATE_SWITCHED
{
"data": {
"old_template_id": 1000056,
"new_template_id": 1000041
},
"source": {
"type": "API"
},
"resource_data": {
"site_name": "474b4e63"
},
"event_timestamp": 1732225345577,
"event_type": "SITE_TEMPLATE_SWITCHED"
}| Name | Type | Description |
|---|---|---|
| data.old_template_id | string | The id of the template the site was originally using |
| data.new_template_id | string | The id of the template the site is now using |
| resource_data.site_name | string | The site id of the site. |
Updated 10 days ago