Modern Stack File Upload

Modern Stack File Upload

1.0.0OAS 3.1
API Base URL
  • Server 1:https://{your-bynder-domain}/
    Variables
    your-bynder-domain:
Security
OAuth2 (oauth2)

Authorization Code OAuth Flow

Authorize URL: https://{your-auth-url}

Token URL: https://{your-bynder-domain}/v6/authentication/oauth2/token

Client Credentials OAuth Flow

Token URL: https://{your-bynder-domain}/v6/authentication/oauth2/token

permanentToken (apiKey)

An API key is a token that you provide when making API calls. Include the token in a header parameter called Authorization.

Example: Authorization: 123

Step 1

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.

Prepare the upload

Prepare the upload of a file in chunks.

post
https://example.com/v7/file_cmds/upload/prepare

Body

application/json
object

Response

application/json

Successful response

file_idstring

File ID to be used in subsequent upload steps.

Example:00000000-0000-0000-0000-000000000000

post/v7/file_cmds/upload/prepare

Body

{}
 
application/json

Step 2

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.

Upload a file chunk

Upload a chunk of the file.

post
https://example.com/v7/file_cmds/upload/{file_id}/chunk/{chunk_number}

Path Parameters

file_idstringrequired

The file ID retrieved from the prepare upload step.

Example:00000000-0000-0000-0000-000000000000

chunk_numberintegerrequired

The number of the chunk being uploaded. The first chunk is 0.

Headers

Content-Typeenumrequired

Allowed values:application/octet-stream

Content-SHA256stringrequired

(calculated checksum of the file/ chunk)

Example:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Body

application/octet-stream
string(binary)

Response

Chunk uploaded successfully

post/v7/file_cmds/upload/{file_id}/chunk/{chunk_number}

Body

No file selected