Bynder Modern Stack File Upload API

The newer /v7 file-command upload surface: prepare an upload, push numbered chunks, and finalise. An alternative to the /api/v4 upload sequence on portals running the modern stack.

OpenAPI Specification

bynder-modern-stack-upload-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Modern Stack File Upload","version":"1.0.0"},"tags":[{"name":"Step 1","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 2","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 3","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"}],"servers":[{"url":"https://{your-bynder-domain}/","variables":{"your-bynder-domain":{"default":"example.com","description":"Your Bynder domain."}}}],"paths":{"/v7/file_cmds/upload/prepare":{"post":{"summary":"Prepare the upload","description":"Prepare the upload of a file in chunks.","tags":["Step 1"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"File ID to be used in subsequent upload steps.","example":"00000000-0000-0000-0000-000000000000"}}}}}},"400":{"description":"Bad request"}}}},"/v7/file_cmds/upload/{file_id}/chunk/{chunk_number}":{"post":{"summary":"Upload a file chunk","description":"Upload a chunk of the file.","tags":["Step 2"],"parameters":[{"name":"file_id","in":"path","required":true,"description":"The file ID retrieved from the prepare upload step.","schema":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}},{"name":"chunk_number","in":"path","required":true,"description":"The number of the chunk being uploaded. The first chunk is 0.","schema":{"type":"integer","example":0}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Chunk uploaded successfully"},"400":{"description":"Bad request"}}}},"/v7/file_cmds/upload/{file_id}/finalise_api":{"post":{"summary":"Finalize the upload","description":"Finalize the upload after all chunks have been uploaded.","tags":["Step 3"],"parameters":[{"name":"file_id","in":"path","required":true,"description":"The file ID retrieved from the prepare upload step.","schema":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"fileName":{"type":"string","description":"Filename of the file.","example":"image.jpeg"},"fileSize":{"type":"integer","description":"Size of the file in bytes.","example":63973541},"chunksCount":{"type":"integer","description":"Number of chunks the file was split into.","example":1}}}}}},"responses":{"201":{"description":"Upload finalized successfully"},"400":{"description":"Bad request"}}}}}}