Write or Append File
curl --request POST \
--url https://api.zerodrive.dev/v1/files/write \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"content": "<string>",
"content_base64": "<string>",
"source_url": "<string>",
"content_type": "<string>",
"append": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
path: '<string>',
content: '<string>',
content_base64: '<string>',
source_url: '<string>',
content_type: '<string>',
append: false
})
};
fetch('https://api.zerodrive.dev/v1/files/write', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/write"
payload = {
"path": "<string>",
"content": "<string>",
"content_base64": "<string>",
"source_url": "<string>",
"content_type": "<string>",
"append": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Write or Append File
Create, overwrite, or append to any file in the vault via text, base64 binary, or remote source_url.
POST
https://api.zerodrive.dev
/
v1
/
files
/
write
Write or Append File
curl --request POST \
--url https://api.zerodrive.dev/v1/files/write \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"content": "<string>",
"content_base64": "<string>",
"source_url": "<string>",
"content_type": "<string>",
"append": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
path: '<string>',
content: '<string>',
content_base64: '<string>',
source_url: '<string>',
content_type: '<string>',
append: false
})
};
fetch('https://api.zerodrive.dev/v1/files/write', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/write"
payload = {
"path": "<string>",
"content": "<string>",
"content_base64": "<string>",
"source_url": "<string>",
"content_type": "<string>",
"append": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Body
application/json
Response
200
File written successfully

