---
updatedAt: 2026-07-21T08:51:55.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/llms.txt
---

# Create an upload session

Start an upload session (no JSON body). The response contains
`upload_url` (POST the file here) and `progress_url` (poll until complete).
Call this before attaching the file to a video record. Requires
`video.manage`
[scope](https://developers.dailymotion.com/v2/reference/api-scopes)
and a valid Bearer token.

<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": {
    "/files/upload_sessions": {
      "post": {
        "tags": [
          "Upload session"
        ],
        "summary": "Create an upload session",
        "description": "Start an upload session (no JSON body). The response contains\n`upload_url` (POST the file here) and `progress_url` (poll until complete).\nCall this before attaching the file to a video record. Requires\n`video.manage`\n[scope](https://developers.dailymotion.com/v2/reference/api-scopes)\nand a valid Bearer token.",
        "operationId": "createUploadSession",
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadSessionGetResponse"
                }
              }
            }
          },
          "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": {
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                },
                "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"
                  }
                }
              }
            }
          },
          "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": {
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                },
                "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"
                  }
                }
              }
            }
          },
          "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": {
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                },
                "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"
                  }
                }
              }
            }
          },
          "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 limiting (reserved).** This BFF process does not currently return 429. Clients that reach the API through a gateway or CDN should still be prepared for 429 and ``Retry-After`` from those layers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "TOO_MANY_REQUESTS",
                    "message": "Too many requests. Retry after the indicated delay.",
                    "correlation_id": "550e8400-e29b-41d4-a716-446655440000",
                    "details": {
                      "retry_after_seconds": 60
                    },
                    "documentation_url": "https://developers.dailymotion.com/reference/api-errors"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ]
      }
    }
  },
  "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."
      },
      "UploadSessionGetResponse": {
        "properties": {
          "upload_url": {
            "type": "string",
            "title": "Upload Url",
            "description": "The URL where the video will be uploaded using POST. (default)",
            "example": "https://www.dailymotion.com/upload/x9xyz456/url"
          },
          "progress_url": {
            "type": "string",
            "title": "Progress Url",
            "description": "URL to poll for upload progress. Returns size, received, progress,\npercent, elapsed and remaining fields. (default)",
            "example": "https://www.dailymotion.com/progress/x9xyz456/url"
          }
        },
        "type": "object",
        "title": "Upload Session Get Response",
        "example": {
          "upload_url": "https://www.dailymotion.com/upload/x9xyz456/url",
          "progress_url": "https://www.dailymotion.com/progress/x9xyz456/url"
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT token for authentication. Can be retrieved using https://oauth2.dailymotion.com/v1/token",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Upload session",
      "description": "Binary upload handshake for a new video file."
    }
  ]
}
```