Stage files
curl --request POST \
--url https://www.dench.com/api/v1/files/stage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"text": "<string>",
"base64": "<string>"
}
],
"path": "<string>",
"text": "<string>",
"base64": "<string>",
"lastModifiedBy": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
files: [{path: '<string>', text: '<string>', base64: '<string>'}],
path: '<string>',
text: '<string>',
base64: '<string>',
lastModifiedBy: '<string>'
})
};
fetch('https://www.dench.com/api/v1/files/stage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/files/stage"
payload = {
"files": [
{
"path": "<string>",
"text": "<string>",
"base64": "<string>"
}
],
"path": "<string>",
"text": "<string>",
"base64": "<string>",
"lastModifiedBy": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"staged": [
{
"path": "/prospects/leads.csv",
"size": 1024,
"result": {
"path": "/prospects/leads.csv",
"contentHash": "9f86d081884c7d65"
}
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}files
Stage files
Stage uploaded content into the workspace.
POST
/
files
/
stage
Stage files
curl --request POST \
--url https://www.dench.com/api/v1/files/stage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"text": "<string>",
"base64": "<string>"
}
],
"path": "<string>",
"text": "<string>",
"base64": "<string>",
"lastModifiedBy": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
files: [{path: '<string>', text: '<string>', base64: '<string>'}],
path: '<string>',
text: '<string>',
base64: '<string>',
lastModifiedBy: '<string>'
})
};
fetch('https://www.dench.com/api/v1/files/stage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/files/stage"
payload = {
"files": [
{
"path": "<string>",
"text": "<string>",
"base64": "<string>"
}
],
"path": "<string>",
"text": "<string>",
"base64": "<string>",
"lastModifiedBy": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"staged": [
{
"path": "/prospects/leads.csv",
"size": 1024,
"result": {
"path": "/prospects/leads.csv",
"contentHash": "9f86d081884c7d65"
}
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}Authorizations
DenchApiKeyAgentSession
Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.
Body
application/json
⌘I