Skip to main content
POST
/
crm
/
reports
Generate report
curl --request POST \
  --url https://www.dench.com/api/v1/crm/reports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "objectName": "string",
  "type": "pie",
  "groupByField": "string"
}
'
{
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.

Body

application/json
objectName
string
required
type
enum<string>
required

Chart type for the generated report.

Available options:
pie,
bar,
line,
table
groupByField
string
required
metric
enum<string>

Aggregation metric. Defaults to count.

Available options:
count,
sum,
avg,
min,
max
metricField
string

Response

Successful response