---
title: "POST /video/"
method: POST
path: "/video/"
tags: ["video"]
---

# POST /video/

`POST /video/`

Add a video to the db if it does not already exist.

## Request body

- VideoRequest
  - `video_id` string, required — Video ID from YouTube URL, matches ^[A-Za-z0-9-_]{11}$

## Response `201`

- Video
  - `uid` string, required — A unique identifier, build with a namespace and an external id.
  - `name` string, required — Video title
  - `description` string, nullable, required — Video description, from YouTube
  - `publication_date` string, date-time, nullable, required
  - `views` integer, nullable, required
  - `uploader` string, nullable, required — Name of the channel on YouTube
  - `language` string, nullable, required
  - `rating_n_ratings` integer, required
  - `rating_n_contributors` integer, required
  - `duration` integer, nullable, required
  - `video_id` string, required — Video ID from YouTube URL, matches ^[A-Za-z0-9-_]{11}$

## Changes

- **2023-12-12** `59949f9d6e91` — 2 info
  - the `rating_n_contributors` response's property default value `0` was added for the status `201`
  - the `rating_n_ratings` response's property default value `0` was added for the status `201`
- **2023-07-04** `b0f74d913a83` — 2 info
  - the `rating_n_contributors` response's property default value `0` was removed for the status `201`
  - the `rating_n_ratings` response's property default value `0` was removed for the status `201`

[Change history](https://skmtc.dev/tournesol-app/apis/tournesol-api/changes/video/post.md)

---

[API](https://skmtc.dev/tournesol-app/apis/tournesol-api.md) · [All operations](https://skmtc.dev/tournesol-app/apis/tournesol-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tournesol-app/tournesol-api/revisions/96c8c62ad972/schema)
