Site

A list of available Duda Webhook Events.

Site

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.

{
  "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"
}
NameTypeDescription
data.republishbooleanBoolean stating if this was a republish of an already published site
data.first_publishbooleanBoolean stating if this was the first publish of a site
source.typestringThe location of the source for the publish event. Possible values are EDITOR or API
source.account_namestringIf a publish was triggered through the editor, then this contains the account who initiated the publish
resource_typestringAlways set to site for the publish event

📘

If a site is published after it was unpublished, then both republish and first_publish are 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.

{
  "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,
}
NameTypeDescription
source.typestringThe location of the source for the unpublish event. Possible values are EDITOR or API
source.account_namestringIf 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.

{
 "data": {
   "utm_campaign": "MY_CAMPAIGN",  
   "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"
 },
 "source": null,
 "resource_data": {
   "site_name": "974d714008f440529ea58094ccf9a97c"
 },
 "event_timestamp": 1569338502786,
 "event_type": "CONTACT_FORM_SENT_V2" 
}
NameTypeDescription
fieldsDataarrayArray of all fields from the submitted form
utm_campaignstringIf the user has a utm_campaign cookie in their session, then it will be added to the webhook

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

{
    "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"
}
NameTypeDescription
source.typestringThe location of the source for the unpublish event. Possible values are EDITOR or API
source.account_namestringThis contains the account who initiated the site creation.
resource_typeAlways 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

{
  "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"
}
NameTypeDescription
data.domainstringThe current domain for the site. The value can be null
data.sub_domainstringThe current subdomain (default domain) for the site.
data.alternate_domainsarrayList of optional alternate domains defined for this site
source.typestringThe location of the source for the publish event. Possible values are EDITOR or API
source.account_namestringIf a publish was triggered through the editor, then this contains the account who initiated the publish
resource_typestringAlways set to site for the domain update event