> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.client.fo/llms.txt
> Use this file to discover all available pages before exploring further.

# Start a chunked upload

> Step 1 of 3. Returns the chunk size and how many chunks to send.

**Required permission:** `publishing:media:write`



## OpenAPI

````yaml /api-reference/publishing.openapi.json post /{workspace}/media/chunked/initiate
openapi: 3.1.0
info:
  title: Publishing API
  version: 1.0.0
  description: >-
    Social accounts, posts, scheduling, approval, tags and media for one
    workspace.
servers:
  - url: https://{domain}/os/api
    description: Your platform domain
    variables:
      domain:
        default: app.example.com
        description: The domain you sign in to, without https://
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Diagnostics
  - name: Accounts
  - name: Posts
  - name: Media
  - name: Tags
paths:
  /{workspace}/media/chunked/initiate:
    post:
      tags:
        - Media
      summary: Start a chunked upload
      description: |-
        Step 1 of 3. Returns the chunk size and how many chunks to send.

        **Required permission:** `publishing:media:write`
      operationId: media.chunked.initiate
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Your workspace UUID. Must match the API key's workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filename
                - mime_type
                - total_size
              properties:
                filename:
                  type: string
                  example: launch.mp4
                mime_type:
                  type: string
                  example: video/mp4
                total_size:
                  type: integer
                  description: File size in bytes.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  upload_uuid:
                    type: string
                    format: uuid
                  chunk_size:
                    type: integer
                  total_chunks:
                    type: integer
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A workspace API key: `Authorization: Bearer osk_...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: The same workspace API key in the `x-api-key` header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.