Set statuses
curl --request PUT \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/statuses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"statuses": [
{
"name": "New",
"color": "#94a3b8"
},
{
"name": "Working",
"color": "#3b82f6"
},
{
"name": "Qualified",
"color": "#22c55e",
"isDefault": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
statuses: [
{name: 'New', color: '#94a3b8'},
{name: 'Working', color: '#3b82f6'},
{name: 'Qualified', color: '#22c55e', isDefault: true}
]
})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/statuses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/crm/objects/{objectName}/statuses"
payload = { "statuses": [
{
"name": "New",
"color": "#94a3b8"
},
{
"name": "Working",
"color": "#3b82f6"
},
{
"name": "Qualified",
"color": "#22c55e",
"isDefault": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"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>"
}
}crm
Set statuses
Set CRM statuses.
PUT
/
crm
/
objects
/
{objectName}
/
statuses
Set statuses
curl --request PUT \
--url https://www.dench.com/api/v1/crm/objects/{objectName}/statuses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"statuses": [
{
"name": "New",
"color": "#94a3b8"
},
{
"name": "Working",
"color": "#3b82f6"
},
{
"name": "Qualified",
"color": "#22c55e",
"isDefault": true
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
statuses: [
{name: 'New', color: '#94a3b8'},
{name: 'Working', color: '#3b82f6'},
{name: 'Qualified', color: '#22c55e', isDefault: true}
]
})
};
fetch('https://www.dench.com/api/v1/crm/objects/{objectName}/statuses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/crm/objects/{objectName}/statuses"
payload = { "statuses": [
{
"name": "New",
"color": "#94a3b8"
},
{
"name": "Working",
"color": "#3b82f6"
},
{
"name": "Qualified",
"color": "#22c55e",
"isDefault": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"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.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
Successful response
⌘I