---
updatedAt: 2026-07-27T12:49:06.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/llms.txt
---

# Add a video to a playlist

Add an existing video to the playlist, optionally before another
item via `before_video_id`. Returns **201** with the playlist item row.
Requires `playlist.manage`
[scope](https://developers.dailymotion.com/v2/reference/api-scopes).

<Callout icon="📘" theme="info">
  ### You are reading **API v2 documentation**

  Still using the Legacy API? Access the <Anchor target="_blank" href="https://developers.dailymotion.com/v0/docs/welcome">Legacy API documentation</Anchor>.
</Callout>

<br />

<br />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Dailymotion API v2",
    "description": "The Dailymotion API v2 allows you \nto access and manage your Dailymotion content.\n",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.dailymotion.com/v2",
      "description": "Production"
    }
  ],
  "paths": {
    "/playlists/{playlist_id}/videos": {
      "post": {
        "tags": [
          "Video"
        ],
        "summary": "Add a video to a playlist",
        "description": "Add an existing video to the playlist, optionally before another\nitem via `before_video_id`. Returns **201** with the playlist item row.\nRequires `playlist.manage`\n[scope](https://developers.dailymotion.com/v2/reference/api-scopes).",
        "operationId": "createPlaylistVideo",
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "name": "playlist_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Parent resource ID",
              "title": "Playlist Id"
            },
            "description": "Parent resource ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubPlaylistVideoCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubPlaylistVideoGetResponse"
                }
              }
            }
          },
          "401": {
            "description": "**Authentication failed.** No ``Authorization: Bearer`` header, malformed JWT, expired passport, or invalid signature. Identity is not established—unlike **403**, the caller is not treated as an authenticated subject. Typical ``error.code`` values: ``INVALID_AUTHORIZATION``, ``AUTHORIZATION_EXPIRED``.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTHORIZATION_EXPIRED",
                    "message": "Authorization expired.",
                    "correlation_id": "550e8400-e29b-41d4-a716-446655440000",
                    "details": {
                      "param": "authorization"
                    },
                    "documentation_url": "https://developers.dailymotion.com/reference/api-errors"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "**Authorization failed.** The bearer token was accepted, but the caller lacks required OAuth scopes or permissions, or an upstream service denied access to the resource. Typical ``error.code`` values: ``MISSING_PERMISSIONS``, ``UPSTREAM_ACCESS_DENIED``.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "MISSING_PERMISSIONS",
                    "message": "Missing required permissions: playlist:write. Required: playlist:read, playlist:write.",
                    "correlation_id": "550e8400-e29b-41d4-a716-446655440000",
                    "details": {
                      "required_permissions": [
                        "playlist:read",
                        "playlist:write"
                      ],
                      "missing_permissions": [
                        "playlist:write"
                      ]
                    },
                    "documentation_url": "https://developers.dailymotion.com/reference/api-errors"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "**Resource not found.** The path id does not exist, a parent resource in a nested URL is missing, or the object is not visible. Typical ``error.code``: ``RESOURCE_NOT_FOUND``.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RESOURCE_NOT_FOUND",
                    "message": "Video with ID 'x1' not found.",
                    "correlation_id": "550e8400-e29b-41d4-a716-446655440000",
                    "details": {
                      "object_id": "x1",
                      "reason": "object_not_found",
                      "object_type": "Video",
                      "param": "id"
                    },
                    "documentation_url": "https://developers.dailymotion.com/reference/api-errors"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "**Unprocessable entity (422).** Invalid **path, query, and body parameters** (FastAPI/Pydantic). **Domain validation** (``DomainValidationError`` and subclasses). **Missing context** (e.g. ``MISSING_PARENT_ID``, ``MISSING_REQUIRED_VALUE``). All 422 responses share the same {\"error\": {\"code\", \"message\", \"correlation_id\", \"details\", \"documentation_url\"}} envelope; code and details vary by error origin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "**Rate limit exceeded (429).** An operation with a rate limit answers 429 ``RATE_LIMIT_EXCEEDED`` once the client IP has emptied a quota of the operation's policy, with ``Retry-After``, ``RateLimit`` and ``RateLimit-Policy`` headers. Any operation can also receive 429 and ``Retry-After`` from the gateway or CDN in front of the API.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMIT_EXCEEDED",
                    "message": "API rate limit exceeded. Please wait before making more requests.",
                    "correlation_id": "550e8400-e29b-41d4-a716-446655440000",
                    "details": {
                      "limit": 250000,
                      "remaining": 0,
                      "reset_at": "2026-11-12T10:13:52Z",
                      "retry_after_seconds": 6
                    },
                    "documentation_url": "https://developers.dailymotion.com/reference/api-errors"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DomainErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/DomainErrorPayload"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "DomainErrorEnvelope",
        "description": "Standard error body: ``{ \"error\": { ... } }``.\n\nPer-HTTP-status examples (401 vs 403 vs 404, etc.) are attached on each\nresponse in :func:`bff_api.entrypoints.api.openapi.responses.\nstandard_domain_error_responses`, not on this schema alone."
      },
      "DomainErrorPayload": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Stable machine-readable error code (e.g. RESOURCE_NOT_FOUND, MISSING_PERMISSIONS)."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable summary."
          },
          "correlation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Correlation Id",
            "description": "Request correlation id for support (may be null)."
          },
          "details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details",
            "description": "Structured context; shape depends on *code*."
          },
          "documentation_url": {
            "type": "string",
            "title": "Documentation Url",
            "description": "Link to the public API error reference."
          }
        },
        "type": "object",
        "required": [
          "code",
          "message",
          "documentation_url"
        ],
        "title": "DomainErrorPayload",
        "description": "Fields inside the ``error`` object for non-2xx domain errors."
      },
      "SubPlaylistVideoCreate": {
        "properties": {
          "video_id": {
            "type": "string",
            "title": "Video Id",
            "description": "Unique identifier of the video to add to the playlist.",
            "example": "x1y2z3"
          },
          "before_video_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Before Video Id",
            "description": "Position the video before this video ID in the playlist order.\nOmit to append at the end.",
            "example": "xa4b5c6"
          }
        },
        "type": "object",
        "required": [
          "video_id"
        ],
        "title": "Sub Playlist Video Create",
        "example": {
          "video_id": "x1y2z3",
          "before_video_id": "xa4b5c6"
        }
      },
      "SubPlaylistVideoGetResponse": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Title of the video. (default)",
            "example": "My Summer Vacation"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Description of the video.",
            "example": "A fun video about our trip to the mountains."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "ISO 8601 timestamp when the video was created.",
            "example": "2023-06-15T14:30:00Z"
          }
        },
        "type": "object",
        "title": "Sub Playlist Video Get Response",
        "example": {
          "title": "My Summer Vacation",
          "description": "A fun video about our trip to the mountains.",
          "created_at": "2023-06-15T14:30:00Z"
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT token for authentication. Can be retrieved using https://oauth2.dailymotion.com/v1/token",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Video",
      "description": "Video resource — metadata, publication, and optional upload payload."
    }
  ]
}
```