---
title: "Upload a file chunk"
url: "https://earlyaccess.developers.bynder.com/apis/modern-stack-file-upload-1/versions/6d6cce94-280c-448d-a782-cc8e300b2ccc/paths/v7-file_cmds-upload-file_id--chunk--chunk_number/post"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/modern-stack-file-upload-1/versions/6d6cce94-280c-448d-a782-cc8e300b2ccc.md

# Upload a file chunk

`POST` `/v7/file_cmds/upload/{file_id}/chunk/{chunk_number}`

Upload a chunk of the file.

## Path parameters

- `file_id` (string, required) - The file ID retrieved from the prepare upload step.
- `chunk_number` (integer, required) - The number of the chunk being uploaded. The first chunk is 0.

## Header parameters

- `Content-Type` (enum, required)
- `Content-SHA256` (string, required) - (calculated checksum of the file/ chunk)

## Request body (required)

Content types: `application/octet-stream`

## Responses

- `201` - Chunk uploaded successfully
- `400` - Bad request

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Modern Stack File Upload
  version: 1.0.0
servers:
  - url: https://{your-bynder-domain}/
    variables:
      your-bynder-domain:
        default: example.com
        description: Your Bynder domain.
paths:
  /v7/file_cmds/upload/{file_id}/chunk/{chunk_number}:
    post:
      description: Upload a chunk of the file.
      parameters:
        - description: The file ID retrieved from the prepare upload step.
          in: path
          name: file_id
          required: true
          schema:
            example: 00000000-0000-0000-0000-000000000000
            type: string
        - description: The number of the chunk being uploaded. The first chunk is 0.
          in: path
          name: chunk_number
          required: true
          schema:
            example: 0
            type: integer
        - in: header
          name: Content-Type
          required: true
          schema:
            enum:
              - application/octet-stream
            type: enum
        - description: (calculated checksum of the file/ chunk)
          in: header
          name: Content-SHA256
          required: true
          schema:
            example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              format: binary
              type: string
        required: true
      responses:
        "201":
          description: Chunk uploaded successfully
        "400":
          description: Bad request
      summary: Upload a file chunk
      tags:
        - Step 2
security:
  - permanentToken: []
  - OAuth2: []
components:
  securitySchemes:
    permanentToken:
      in: header
      name: Authorization
      type: apiKey
    OAuth2:
      flows:
        authorizationCode:
          authorizationUrl: https://{your-auth-url}
          scopes: {}
          tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token
        clientCredentials:
          scopes: {}
          tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token
      type: oauth2
```
