Upload files to a bucket root
Uploads one or more files with multipart/form-data. Any file field name is accepted; every file part is processed. Up to 10 file parts per request.
A successful upload returns HTTP 200, not 201.
When a request contains multiple files, the success response describes only the first processed file. List the folder afterward to discover every resulting fileId.
Requires active encryption keys for the owning user context, active billing, and the scopes buckets:write + files:write.
curl --request POST \
--url https://api.everabyte.io/api/files/upload/{bucketId} \
--header 'Content-Type: multipart/form-data' \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>' \
--form 'file=@example-file;type=application/octet-stream'const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
options.body = form;
fetch('https://api.everabyte.io/api/files/upload/{bucketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
options.body = form;
fetch('https://api.everabyte.io/api/files/upload/{bucketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.everabyte.io/api/files/upload/{bucketId}"
files = { "file": ("example-file", open("example-file", "rb"), "application/octet-stream") }
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/files/upload/{bucketId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Public-Key: <api-key>",
"X-Secret-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everabyte.io/api/files/upload/{bucketId}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": 200,
"message": "File uploaded",
"data": {
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"extFile": "<string>"
},
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effectiveFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileSize": 123,
"sizeBytes": 123,
"versionId": "<string>",
"scheme": "hybrid-v1",
"encryption": "SSE",
"isUpdate": true,
"warning": {
"is_low": true,
"threshold_bytes": 123,
"remaining_bytes": 123,
"message": "<string>"
}
}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}Authorizations
Public half of the company API key. Format: pk_ followed by 64 hexadecimal characters.
Secret half of the company API key. Format: sk_ followed by 64 hexadecimal characters. Stored as a hash server-side and shown only at creation or rotation.
Path Parameters
Bucket identifier. Read it from the bucket list, or copy it from the Everabyte dashboard.
Body
File content. Additional file parts may be sent under the same or different field names, up to 10 parts.
curl --request POST \
--url https://api.everabyte.io/api/files/upload/{bucketId} \
--header 'Content-Type: multipart/form-data' \
--header 'X-Public-Key: <api-key>' \
--header 'X-Secret-Key: <api-key>' \
--form 'file=@example-file;type=application/octet-stream'const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
options.body = form;
fetch('https://api.everabyte.io/api/files/upload/{bucketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const form = new FormData();
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {'X-Public-Key': '<api-key>', 'X-Secret-Key': '<api-key>'}
};
options.body = form;
fetch('https://api.everabyte.io/api/files/upload/{bucketId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.everabyte.io/api/files/upload/{bucketId}"
files = { "file": ("example-file", open("example-file", "rb"), "application/octet-stream") }
headers = {
"X-Public-Key": "<api-key>",
"X-Secret-Key": "<api-key>"
}
response = requests.post(url, files=files, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.everabyte.io/api/files/upload/{bucketId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Public-Key: <api-key>",
"X-Secret-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everabyte.io/api/files/upload/{bucketId}"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Key", "<api-key>")
req.Header.Add("X-Secret-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": 200,
"message": "File uploaded",
"data": {
"file": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"extFile": "<string>"
},
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effectiveFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileSize": 123,
"sizeBytes": 123,
"versionId": "<string>",
"scheme": "hybrid-v1",
"encryption": "SSE",
"isUpdate": true,
"warning": {
"is_low": true,
"threshold_bytes": 123,
"remaining_bytes": 123,
"message": "<string>"
}
}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}{
"status": 123,
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"code": "<string>",
"data": {}
}