🚧

Custom Plans Only

In order to access this feature, schedule a time to speak with a member of our Partner Team about upgrading your account to a Custom plan.

A webhook delivers data to your application as it happens. Unlike our Partner APIs where you would need to poll for data very frequently in order to get it real-time.

Webhooks are HTTP callbacks which can be used to send notifications when specific events occur in Duda or on a site. Then, your application performs whatever logic you feel necessary - read/write from a database, integrate with another API, or perform a computation. This allows external systems to react to changes to do things such as post new blog posts on social media or open a support ticket to respond to a site comment.

Requirements

To work with this guide, you’ll need to make sure you have the following items ready:

  • An endpoint on a secure (HTTPS) server to consume webhook.
  • A list of the webhook events you would like to receive.

Once you have all requirements ready, submit a request for access to our support team.

Receiving Webhook Notifications

Webhook notifications are sent as HTTP POST requests. The notification data is sent as JSON in the POST body.

Duda uses an exponential backoff policy with 30 seconds intervals and a max of 3 retries. The first retry will be after 30 seconds, the second 90 seconds after the initial attempt, and the third and last, 210 seconds after the initial attempt.

JSON Format

Below is an example JSON data structure for a webhook. Each event includes specific information relevant to that event.

{
  "event_type": "",
  "event_timestamp": "",
  "resource_type": "",
  "data": { ... },
  "resource_data": { ... },
  "source": { ... }
}

Name

Included

Description

event_type

always

describes the type of event

event_timestamp

always

epoch timestamp of the event occurrence in milliseconds

resource_type

not always

describes what event relates to

data

not always

additional data related to an event

resource_data

always

data on the resource (ex. site_name, external_id)

source

not always

where the event was triggered (ex. API, EDITOR)


What’s Next
Did this page help you?