Upload a file to a vault
const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.prudra.dev/vaults/{id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/vaults/{id}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/vaults/{id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file{}{
"type": "https://api.prudra.dev/problems/payment-limit-reached",
"title": "Plan Limit Reached",
"status": 429,
"detail": "Your plan includes 100 payments per month. You have used 100.",
"limit": 100,
"current": 100,
"upgradeUrl": "https://dashboard.prudra.com/settings/billing"
}Vaults
Upload a file to a vault
Accepts multipart form data with field file. Returns upload instructions / result
(pre-signed URL flow) for storing content in object storage.
POST
/
vaults
/
{id}
/
files
Upload a file to a vault
const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.prudra.dev/vaults/{id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/vaults/{id}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/vaults/{id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file{}{
"type": "https://api.prudra.dev/problems/payment-limit-reached",
"title": "Plan Limit Reached",
"status": 429,
"detail": "Your plan includes 100 payments per month. You have used 100.",
"limit": 100,
"current": 100,
"upgradeUrl": "https://dashboard.prudra.com/settings/billing"
}
