Upload a chunk of a file
const url = 'https://api.cardio.ai/v3/uploads/example/chunks?offset=1';const options = { method: 'POST', headers: {'X-Api-Token': '<X-Api-Token>', 'Content-Type': 'application/octet-stream'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.cardio.ai/v3/uploads/example/chunks?offset=1' \ --header 'Content-Type: application/octet-stream' \ --header 'X-Api-Token: <X-Api-Token>' \ --data binaryReceives and stores a chunk of an ongoing file upload session.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Upload session ID.
Query Parameters
Section titled “Query Parameters”Byte offset for the chunk.
Request Bodyrequired
Section titled “Request Bodyrequired”Binary chunk data.
Responses
Section titled “Responses”Operation completed successfully.
Bad Request - missing or invalid parameters.
Error payload carried by every non-2xx response.
object
Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.
Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.
Examplegenerated
{ "message": "example", "reason": "example"}Unauthorized - missing, expired, or invalid token.
Error payload carried by every non-2xx response.
object
Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.
Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.
Examplegenerated
{ "message": "example", "reason": "example"}Too Many Requests - rate limit exceeded.
Error payload carried by every non-2xx response.
object
Human-readable description of the failure. The wording is not part of the API contract; do not match on it programmatically.
Stable machine-readable failure code in snake_case, e.g. “api_token_missing” or “invalid_task_id”. Omitted for 500 responses.
Examplegenerated
{ "message": "example", "reason": "example"}