Upload a file
curl --request PUT \
--url https://sandbox.brimble.io/sandboxes/{id}/files/{filePath} \
--header 'Content-Type: application/octet-stream' \
--header 'x-brimble-key: <api-key>' \
--data '<string>'import requests
url = "https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}"
payload = "<string>"
headers = {
"x-brimble-key": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-brimble-key': '<api-key>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/octet-stream",
"x-brimble-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://sandbox.brimble.io/sandboxes/{id}/files/{filePath}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-brimble-key", "<api-key>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}")
.header("x-brimble-key", "<api-key>")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-brimble-key"] = '<api-key>'
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_bodyRuntime
Upload a file
Upload a file into a sandbox’s filesystem with the Brimble Sandboxes API.
PUT
/
sandboxes
/
{id}
/
files
/
{filePath}
Upload a file
curl --request PUT \
--url https://sandbox.brimble.io/sandboxes/{id}/files/{filePath} \
--header 'Content-Type: application/octet-stream' \
--header 'x-brimble-key: <api-key>' \
--data '<string>'import requests
url = "https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}"
payload = "<string>"
headers = {
"x-brimble-key": "<api-key>",
"Content-Type": "application/octet-stream"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-brimble-key': '<api-key>', 'Content-Type': 'application/octet-stream'},
body: '<string>'
};
fetch('https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: application/octet-stream",
"x-brimble-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://sandbox.brimble.io/sandboxes/{id}/files/{filePath}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-brimble-key", "<api-key>")
req.Header.Add("Content-Type", "application/octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}")
.header("x-brimble-key", "<api-key>")
.header("Content-Type", "application/octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.brimble.io/sandboxes/{id}/files/{filePath}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-brimble-key"] = '<api-key>'
request["Content-Type"] = 'application/octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_bodyAuthorizations
Your account-level Brimble API key. Find it in the dashboard under your profile drawer → API key (click the avatar in the sidebar). Available on paid plans only.
Path Parameters
24-char hex id of the sandbox.
Pattern:
^[a-f0-9]{24}$Absolute path inside the sandbox, with literal forward slashes (do not
URL-encode / as %2F; the edge proxy will reject %2F with a generic
400 before the request reaches the API).
Example: tmp/notes.txt resolves to /tmp/notes.txt inside the sandbox.
Body
application/octet-stream
The body is of type file.
Response
File written
Last modified on October 31, 2026
Was this page helpful?