---
title: "Upload file chunks"
url: "https://earlyaccess.developers.bynder.com/apis/asset-api-beta-1/versions/d41a5f27-191a-4019-9419-fe0a53e55978/operations/patchUploadFileChunks"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/asset-api-beta-1/versions/d41a5f27-191a-4019-9419-fe0a53e55978.md

# Upload file chunks

`PATCH` `/`

Operation ID: `patchUploadFileChunks`

> **IMPORTANT NOTE** > These APIs do not replace the existing v4 APIs yet, and currently only applies to newly uploaded assets still in Draft state (before publishing). Cannot be yet used for Assets that are in Asset Bank and Waiting room. The request target is the `Location` response header returned by **Upload file initialization**. Carry the relevant header information across calls as shown below. After the last chunk is uploaded, the file is automatically finalized. > The `Location Header Value` URL is a placeholder for the `Location` header from the previous call.

## Header parameters

- `tus-resumable` (string, required)
- `upload-offset` (string, required) - The combined length of the previously uploaded chunks. This value can be taken from the Upload-Offset response header of each preceding chunk request.
- `content-type` (string, required)
- `fileid` (string, required)
- `filename` (string, required)
- `reason` (string, required)

## Request body (required)

Content types: `application/offset+octet-stream`

## Responses

- `200` - Chunk accepted.
- `400`
- `401`
- `403`

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Asset API (Beta)
  version: 1.0.0-beta
servers:
  - url: https://{your-bynder-domain}/
paths:
  /:
    patch:
      description: >-
        > **IMPORTANT NOTE**

        > These APIs do not replace the existing v4 APIs yet, and currently only
        applies to newly uploaded assets still in Draft state (before
        publishing). Cannot be yet used for Assets that are in Asset Bank and
        Waiting room. 

         The request target is the `Location` response header returned by **Upload file initialization**. Carry the relevant header information across calls as shown below. After the last chunk is uploaded, the file is automatically finalized. 
        > The `Location Header Value` URL is a placeholder for the `Location`
        header from the previous call.
      operationId: patchUploadFileChunks
      parameters:
        - in: header
          name: tus-resumable
          required: true
          schema:
            default: 1.0.0
            type: string
        - description: The combined length of the previously uploaded chunks. This value
            can be taken from the Upload-Offset response header of each
            preceding chunk request.
          in: header
          name: upload-offset
          required: true
          schema:
            type: string
        - in: header
          name: content-type
          required: true
          schema:
            default: application/offset+octet-stream
            type: string
        - in: header
          name: fileid
          required: true
          schema:
            type: string
        - in: header
          name: filename
          required: true
          schema:
            type: string
        - in: header
          name: reason
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/offset+octet-stream:
            schema:
              format: binary
              type: string
        required: true
      responses:
        "200":
          description: Chunk accepted.
          headers:
            Upload-Offset:
              description: New offset after this chunk; use it for the next chunk request.
              schema:
                type: integer
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequestError"
          description: ""
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
          description: ""
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
          description: ""
      security:
        - httpAuth: []
      servers:
        - description: Dynamic Tus upload server returned in the previous step.
          url: "{Location Header Value}"
          variables:
            baseUploadUrl:
              default: "{Location Header Value}"
      summary: Upload file chunks
      tags:
        - Asset ingestion
security:
  - httpAuth: []
components:
  schemas:
    BadRequestError:
      properties:
        message:
          type: string
      title: BadRequestError
      type: object
    UnauthorizedError:
      properties:
        message:
          type: string
      title: UnauthorizedError
      type: object
    ForbiddenError:
      properties:
        message:
          type: string
      title: ForbiddenError
      type: object
  securitySchemes:
    httpAuth:
      scheme: bearer
      type: http
```
