---
updatedAt: 2026-07-27T10:39:18.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/v0/llms.txt
---

# Upload videos

Uploading a video on your Dailymotion account can be done programmatically using our API.

<Callout icon="🚀" theme="default">
  ### API v2 now available

  Visit the <Anchor target="_blank" href="https://developers.dailymotion.com/v2/reference/introduction">API v2 documentation</Anchor> or follow the <Anchor target="_blank" href="https://developers.dailymotion.com/v2/docs/migrating-from-legacy-api-to-api-v2">migration guide</Anchor> to upgrade.
</Callout>

<br />

<br />

In this article, we’ll go through the complete **upload workflow via the API**, with detailed steps and code samples to help you getting started.

<Callout icon="👍" theme="okay">
  ### Note for Organizations:

  All API calls and code samples in this guide can be used to upload content on child channels.
</Callout>

<br />

***

# Overview

Uploading content on Dailymotion can be done through the following steps:

1. **Authenticate the user:** Get an access token with the right scope to be able to upload on the channel.
2. **Get an upload URL:** Provide your access token to get a dedicated upload URL where you’ll be able to upload your content.
3. **Upload the video:** Send your file to your upload URL.
4. **Create the video:** Create the video ID in your channel.
5. **Publish the video:** Set up the mandatory fields and publish your content.

<br />

<Callout icon="📘" theme="info">
  ### Upload content hosted on an external URL:

  If your video already has an external url, you don’t need to upload it to our servers: you can directly use this url as the video source.

  Therefore, we invite you to directly go to the step **["Create the video"](https://dailymotion.readme.io/docs/upload-videos#4-create-the-video)** and use your external URL as `url` value.
</Callout>

<br />

# 1. Authenticate the user

As uploading content is an action that impacts one’s account, you need to be authenticated with a user having access to the destination channel.

You will have to request an access token with the correct scope/permissions to be able to upload content on the channel.

See which scope you need based on whether you’re using a public or a private API key:

```text Public API key
Request an access token with the scope `manage_videos`.
Learn more about scopes: https://developers.dailymotion.com/reference/api-scopes#/
```
```text Private API key
When creating/editing your private API key from your Dailymotion Studio, toggle on all permissions in 'Manage videos'
```

See the **[authentication guide](https://developers.dailymotion.com/docs/authenticate)** for more information on how to authenticate the user and request an access token.

<Callout icon="⚠️" theme="warn">
  ### An access token is required for this guide:

  Your access token will be required for all the steps listed below.

  We invite you to keep it accessible during the entire process or add it as a variable on your project.
</Callout>

# 2. Get an upload URL

Now that you have an access token with the right scope/permissions, you need to request an upload URL to Dailymotion in order to host your file.

Perform a `GET` request to the relevant endpoint and include your access token to retrieve an upload URL.:

```curl Public API key
curl  https://api.dailymotion.com/file/upload
     -H "Authorization: Bearer ${ACCESS_TOKEN}"
```
```curl Private API key
curl  https://partner.api.dailymotion.com/rest/file/upload
     -H "Authorization: Bearer ${ACCESS_TOKEN}"
```

<br />

<Cards columns={1}>
  <Card title="Get an upload URL: Try it out!" href="partner-api-upload-get-upload-url" icon="fa-angle-double-down" />
</Cards>

<br />

**Response example**

The server will return 2 values :

* The `upload_url`: the URL you will use in the next step to send your file on our servers.
* The `progress_url`: the URL you can use to track the upload status from your upload location to our servers.

```json
{
    "upload_url": "https://upload-XXX.dailymotion.com/upload?uuid=UUID&seal=SEAL&extra=CHANNEL_ID",
    "progress_url": "https://upload-XXX.dailymotion.com/progress?uuid=UUID"
}
```

<br />

<Callout icon="📘" theme="info">
  ### Resume function:

  **The upload process includes a resume function.** Interrupted uploads automatically resume once the connection is back.
</Callout>

<br />

# 3. Upload the video

You have generated your `upload_url`, you can now host your file by sending it to this dedicated server slot:

Perform a `POST` HTTP request to the  received`upload_url` using `multipart/form-data` content type and include the `file` field, filled with the content path to upload.

```curl
curl -X POST \
     -F 'file=@/path/to/your/video.mp4' \
     '<UPLOAD_URL>'
```

**Response**

Once the `POST` HTTP request is complete, the upload server will return in response several content metadata, including the `url` field.

```json
{
    "acodec": "AAC",
    "bitrate": "1281806",
    "dimension": "400x848",
    "duration": "20852",
    "format": "MPEG-4",
    "hash": "XXX",
    "name": "My new upload",
    "seal": "XXX",
    "size": "3341029",
    "streamable": "Yes",
    "url": "https://upload-XXX.dailymotion.com/files/FILE_ID",
    "vcodec": "AVC"
}
```

<Callout icon="⚠️" theme="warn">
  ### Upload activity and failure

  **About upload expiration:**

  - The upload url does not have an expiry term for uploading, although some activity has to be “seen” on started uploads at least every 4 hours.
  - If the upload `POST` fails, you need to reacquire a new `upload_url`.

  **About video upload limits:**

  - Upload is not unlimited on our platform and depends on your account type and settings. Learn more about [upload limits](https://developers.dailymotion.com/reference/rate-limiting).
</Callout>

<br />

# 4. Create and publish the video

Once your video file is hosted (either on your own servers or a third-party service), you can use the `url` field to create the Dailymotion video object and directly publish it in the same request.

To do this, perform a `POST` request to the upload endpoint and include the following mandatory fields:

* `url `- URL of the hosted video file
* `published` – The video is published and can be embedded. Note that this does not determine whether the video is public or private. To do so, use `private` parameter.
* `title` – The title of the video on the platform.
* `is_created_for_kids` – Indicates whether the content is intended for children.
* `channel` – The content category associated with your content (See our Channel object API Reference)

<Callout icon="📘" theme="info">
  ### Additional fields

  Content defaults from your Dailymotion Studio are not applied to API uploads, you must explicitly include these parameters in your request.<br />For instance you can explicitly set `private `or `ai_chapter_generation_required`.

  You can also specify additional metadata such as `description` or `tags`. To get the full list of available fields, refer to our [Video fields](https://developers.dailymotion.com/reference/video-fields)
</Callout>

```curl Public API key
curl -X POST \
     -H "Authorization: Bearer ${ACCESS_TOKEN}" \
     -d 'url=<VIDEO_URL>' \
     -d 'title=Dailymotion upload test' \
     -d 'channel=videogames' \
     -d 'published=true' \
     -d 'private=false' \
     -d 'is_created_for_kids=false' \
     "https://api.dailymotion.com/user/<CHANNEL_ID>/videos"
```
```curl Private API key
curl -X POST \
     -H "Authorization: Bearer ${ACCESS_TOKEN}" \
     -d 'url=<VIDEO_URL>' \
     -d 'title=Dailymotion upload test' \
     -d 'channel=videogames' \
     -d 'published=true' \
     -d 'private=false' \
     -d 'is_created_for_kids=false' \
     "https://partner.api.dailymotion.com/rest/user/<CHANNEL_ID>/videos"
```

<Cards columns={1}>
  <Card title="Create a video: Try it out!" href="https://developers.dailymotion.com/reference/partner-api-create-a-video" icon="fa-angle-double-down" />
</Cards>

<br />

**Response example**

This API call will create the video on your channel. The ID of the newly created video will be returned in the `id` field of the response.

```json
{
    "id": "NEW_VIDEO_ID",
    "title": "Sans Titre",
    "channel": null,
    "owner": "OWNER_ID"
}
```

<Callout icon="⚠️" theme="warn">
  ### About is_created_for_kids:

  `is_created_for_kids` is a mandatory field which must be filled to identify the audience targeted by your content in order to comply with several laws such as COPPA and GDPR.

  You can visit our Help Center for more information if you need additional insights on **[how to determine the audience of your video](https://faq.dailymotion.com/hc/en-us/articles/360020996299)**, and check how to use the “is_created_for_kids” mandatory field.
</Callout>

# Code samples

<br />

```php
$url = $api->uploadFile('/path/to/your/video.mp4');
$api->post(
    '/user/<CHANNEL_ID>/videos',
    array(
        'url'       => $url,
        'title'     => 'My Title',
        'channel'   => 'videogames',
        'published' => true,
        'private' => false,
        'is_created_for_kids' => false,
    )
);
```
```javascript
// get an upload url
DM.api('/file/upload', function (response)
{
    //upload the video and get the url
    var xhr =  new XMLHttpRequest();
    xhr.open('POST', response.upload_url, true);
    var formData = new FormData(document.getElementById("fileDomId"));
    xhr.send(formData);

    // check when video is uploaded
    xhr.onreadystatechange = function ()
    {
        if (xhr.readyState == 4)
        {
            // create the video object and publish the video
            DM.api(
                '/user/<CHANNEL_ID>/videos',
                'post',
                {
                    url: JSON.parse(xhr.response).url,
                    title: 'My Title',
                    channel: 'videogames',
                    published: 'true',
                    private: 'false',
                    is_created_for_kids: 'false'
                }
            );
        }
    }
});
```
```python
d = dailymotion.Dailymotion()
d.set_grant_type('password', api_key=API_KEY, api_secret=API_SECRET,
    scope=['manage_videos'], info={'username': USERNAME, 'password': PASSWORD})
url = d.upload('./video.mp4')
d.post(
    "/user/<CHANNEL_ID>/videos",
    {
        "url": url,
        "title": "My Title",
        "published": "true",
        "private": "false",
        "channel": "news",
        "is_created_for_kids": "false",
    },
)
```

<br />