---
title: "Finalize the upload"
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--finalise_api/post"
---

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

# Finalize the upload

`POST` `/v7/file_cmds/upload/{file_id}/finalise_api`

Finalize the upload after all chunks have been uploaded.

## Path parameters

- `file_id` (string, required) - The file ID retrieved from the prepare upload step.

## Request body (required)

Content types: `application/x-www-form-urlencoded`

## Responses

- `201` - Upload finalized 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}/finalise_api:
    post:
      description: Finalize the upload after all chunks have been uploaded.
      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
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                chunksCount:
                  description: Number of chunks the file was split into.
                  example: 1
                  type: integer
                fileName:
                  description: Filename of the file.
                  example: image.jpeg
                  type: string
                fileSize:
                  description: Size of the file in bytes.
                  example: 63973541
                  type: integer
              type: object
        required: true
      responses:
        "201":
          description: Upload finalized successfully
        "400":
          description: Bad request
      summary: Finalize the upload
      tags:
        - Step 3
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
```
