To enjoy all our Developer Portal features, please switch to Microsoft Edge, Google Chrome or Mozilla Firefox browsers.

Adding a webhook

Subscribe to events on my account using webhooks

You want to stay informed live when a specific event happens on your Dailymotion account? You can now use our webhook feature to get notified.

Webhooks let you register a url that we can POST to anytime a specific event happens on your account. When the event occurs, for example when a successful encoding is ready in your account, Dailymotion creates an event object. This object contains all the relevant information, including the type of event and the data associated with that event. Dailymotion then sends a HTTP POST request with the event object to the URL you specified.

Configuring your webhook

You can set up the webhooks using the API. You will perform authenticated calls, so you have to request authentication for the user you want to set up webhooks for. Do not forget to request the manage_videos scope!

Then, setting up the webhooks is done in two steps:

  1. Add the callback url that you want to be requested when the events trigger the webhook. This is done by giving a value to the webhook_url field on your user object.
  2. Select the events you want to subscribe to and add them to the webhook_events field on the user object. You should pass the list of events as a comma separated string.
  • PHP
  • Javascript
  • Python
  • // we here use the password grant type for authentication, but you can use whatever is best for your use-case
    $api = new Dailymotion();
            'username' => $account,
            'password' => $password,
    // we perform the POST request on the authntified user with the chosen values
            'webhook_url' => '',
            'webhook_events' => 'video.created,video.deleted',
            'fields' => array('id', 'screenname', 'webhook_url', 'webhook_events')
  • DM.api(
            webhook_url: "",
            webhook_events: "video.created,video.deleted",
            fields: "id,screenname,webhook_url,webhook_events"
        function (response) {  
            // or do whatever you want
  • d = dailymotion.Dailymotion()
        info={'username': USERNAME, 'password': PASSWORD})'/me',
            'webhook_url': '',
            'webhook_events': 'video.created,video.deleted',
            'fields': 'id,screenname,webhook_url,webhook_events'

What events can you subscribe to?

At the time of writing, you can subscribe to the following events on your Dailymotion account:

  • video.created: Sent when the video is created (before publication and encoding).
  • video.deleted: Sent when the video is deleted.
  • video.published: Sent when the video is published.
  • video.format.processing: Sent while our video encoders is processing a video format (H264-512x384...)
  • video.format.ready: Sent when a the encoding of a video format is done.
  • video.format.error: Sent when an error occurred in the encoding process of a specific format.
  • video.format.deleted: Sent when a video format is deleted.

An up-to-date list of events is available in the api error message.

Receiving a webhook

Configuring your server to receive a new webhook is no different from creating any page on your website. Remember that your server is the server receiving the request. Webhook data is sent as JSON in the request’s body.

#### Answer format {#answer-format}

The payload returned by webhooks is formatted using JSON.

All events have the following keys at the root of the JSON body:

  • type: the type of the event
  • timestamp: a Unix timestamp with milliseconds precision (x1000)
  • data: JSON object with additional parameters related to the event

Below are some examples of classical payloads:

  • video.created
  • video.format.processing
  • video.format.ready
  • video.published
  • video.deleted
  • {
  • {
  • {
          "audio_format":"AAC LC",
  • {
  • {


We recommend using RequestBin to troubleshoot WebHooks.