Categories
When uploading a video to Dailymotion, selecting a category is mandatory: they help organize content on the platform, and improve discoverability.
In the Platform API, video categories are set using the channel parameter, which must be assigned one of the values listed below:
| Categories | Name |
|---|---|
animals | Animals |
auto | Cars |
creation | Art |
fun | Comedy & Entertainment |
kids | Kids |
lifestyle | Lifestyle & How-to |
music | Music |
news | News |
people | Friends & family |
school | Education |
shortfilms | Shortfilms |
sport | Sport |
tech | Tech |
travel | Travel |
tv | TV shows |
videogames | Video games |
webcam | Webcam |
Examples
Example 1: Set the video category during video upload
Use this command to upload a new video and assign it to a category (i.e. videogames).
curl -X POST https://api.dailymotion.com/rest/user/PROFILE_ID/videos \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "title=Your new video" \
-d "channel=videogames" \
-d "is_Created_for_kids=false" \
-d "url=https://your-source-url/video.mp4"- Replace
YOUR_ACCESS_TOKENwith your actual access token. - Replace
https://your-source-url/video.mp4with the source of your video file. - Add in
channelone of the above category values.
Example 2: Update the category of an existing video
Use this command to update the category of an existing video. Here, we'll change it to music:
curl -X POST https://api.dailymotion.com/rest/video/VIDEO_ID \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "channel=music"- Replace VIDEO ID with your actual video ID.
- Add the
channelparameter with one of the above category values.
