Upload videos
Uploading a video on your Dailymotion account can be done programmatically using our API.
You are reading API v2 documentationStill using the Legacy API? Access the Legacy API documentation.
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.
Overview
Uploading content on Dailymotion via the API v2 follows these steps:
- Authenticate: Get an access token with the right scope to upload on the profile.
- Get an upload URL: Obtain an upload URL to upload your content on.
- Upload the video file: Send your file to your upload URL.
- Create and publish the video: Create the video object in your channel and set up mandatory fields to publish it.
1. Authenticate
You need an access token with the video.manage scope to upload content. Refer to the Authentication guide for the full OAuth 2.0 flow. Keep your access token accessible throughout all steps below.
Access token requiredYour
Bearertoken must be included in theAuthorizationheader for every request in this guide.
2. Get an upload URL
Using an external URL instead?If your video is already hosted on an external URL, you can skip this step and the next one, and go directly to step 4. Use your external URL as the
urlvalue.
Perform a POST request to /v2/files/upload_sessions. No request body is needed.
curl -X POST https://api.dailymotion.com/v2/files/upload_sessions \
-H "Authorization: Bearer ${ACCESS_TOKEN}"Response
The server returns 2 fields:
upload_url: The URL you will use in the next step to send your file on our servers.progress_url: The URL you can use to track the upload progress.
{
"upload_url": "https://upload-XXX.dailymotion.com/upload?uuid=UUID&seal=SEAL&extra=PROFILE_ID",
"progress_url": "https://upload-XXX.dailymotion.com/progress?uuid=UUID"
}
Resume function:The upload process includes a resume function. Interrupted uploads automatically resume once the connection is back.
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
POSTfails, you need to reacquire a newupload_url.
3. Upload video file
Send your video file to the upload_url received in the previous step, using a POST request with multipart/form-data content type and the file field filled with the content path to your file.
curl -X POST \
-F 'file=@/path/to/your/video.mp4' \
'<UPLOAD_URL>'Response
Once complete, the upload server returns metadata about the uploaded file, including the url field which you'll use in the next step.
{
"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"
}
Upload limitsUpload is not unlimited and depends on your account type and settings. Learn more about upload limits.
4. Create and publish the video
Once your video file is hosted on our servers, use the file_url field to create the Dailymotion video object and publish it in the same request.
To do this, perform the following POST request and include mandatory fields:
title: Video title shown in the player and catalog (1-255 characters).category: Content category for discovery (eg.newssportetc - see available video categories).visibility: Who can watch the video (publicprivateorpassword).is_for_kids: Whether the content targets children. Required for compliance with COPPA and GDPR.file_url: URL of the video file to be ingested. This can be either the url returned by the upload server in step 3, or an accessible external URL.
// Replace <PROFILE_ID> and <VIDEO_URL> with your own
curl --request POST \
--url https://api.dailymotion.com/v2/profiles/<PROFILE_ID>/videos \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"title": "My new video",
"category": "news",
"visibility": "public",
"is_for_kids": false,
"source": {
"file_url": "<VIDEO_URL>"
}
}
'
Content defaults parametersContent defaults from your Dailymotion Studio are not applied to API uploads (except
geo_restriction). To change its value, you must explicitly include this parameters in your request.For this setting, Content defaults acts as the default, and can be overriden per video. It is not a mandatory field.
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.
HTTP/1.1 201 Created
Location: https://api.dailymotion.com/v2/profiles/{profile_id}/videos/x9xyz456
{
"video_id": "x9xyz456",
"title": "My new video",
"created_at": "2026-05-03T12:00:00Z"
}Note: Detailed events at different stages can be received by the client through webhooks.
Upload from an external URL
If your video is already hosted on an external URL, you can skip step 2 and 3 and provide the URL directly when creating the video object.
Prerequisite:Your account must have the necessary rights to upload using external URL sources. Contact your Dailymotion account manager if this is not enabled.
POST /v2/profiles/{profile_id}/videos
Content-Type: application/json
{
"title": "string",
"description": "string",
"tags": ["string"],
"category": "string",
"visibility": "string",
"is_for_kids": "boolean"
"source": {
"file_url": <EXTERNAL_VIDEO_URL>
}
}
Replace source flow
If you need to replace the source file of a video that already exists on your channel (for example, to upload a corrected version) while keeping all its metadata (title, description, tags, etc.) intact, follow this flow.
Prerequisites:
- The video object must already exist on your profile.
- Your account must have source replacement rights enabled. Contact your Dailymotion account manager if this is not the case.
- Get an upload URL:
POST /v2/files/upload_sessions
- Upload the new source file, same as in step 3.
- Patch the existing video with the new source URL:
PATCH /v2/videos/{video_id}
Content-Type: application/json
{
"source": {
"file_url": <VIDEO_URL>
}
}
Best practices
- Upload URL expiration: Upload URLs are time-limited. Implement retry logic using the retry upload flow if uploads take longer than expected.
- Progress tracking: Use the
progress_urlto provide upload feedback to users.
Updated 20 days ago
