---
title: "Modern Stack File Upload"
url: "https://earlyaccess.developers.bynder.com/apis/modern-stack-file-upload-1/versions/6d6cce94-280c-448d-a782-cc8e300b2ccc"
---

# Modern Stack File Upload

OpenAPI specification document.

```json
{"components":{"securitySchemes":{"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"},"permanentToken":{"in":"header","name":"Authorization","type":"apiKey"}}},"info":{"title":"Modern Stack File Upload","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v7/file_cmds/upload/prepare":{"post":{"description":"Prepare the upload of a file in chunks.","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"file_id":{"description":"File ID to be used in subsequent upload steps.","example":"00000000-0000-0000-0000-000000000000","type":"string"}},"type":"object"}}},"description":"Successful response"},"400":{"description":"Bad request"}},"summary":"Prepare the upload","tags":["Step 1"]}},"/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"]}},"/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":[]}],"servers":[{"url":"https://{your-bynder-domain}/","variables":{"your-bynder-domain":{"default":"example.com","description":"Your Bynder domain."}}}],"tags":[{"description":"This endpoint prepares the upload of a file in chunks. It returns a file ID that will be used in subsequent steps to upload the file chunks and finalize the upload.\n","name":"Step 1"},{"description":"This endpoint uploads a chunk of the file. You need to provide the file ID obtained from the prepare upload step and the chunk number (starting from 0). The request body should contain the binary data of the chunk being uploaded.\n","name":"Step 2"},{"description":"This endpoint finalizes the upload after all chunks have been uploaded. You need to provide the file ID and details about the file, including its name, size, and the number of chunks it was split into.\n","name":"Step 3"}]}
```
