Skip to main content

Reports API

Reports endpoints exposed by the Devotel CPaaS API Base path: /api/v1/reports Endpoint count: 7

Escalations grouped by reason code

GET /api/v1/reports/escalation-by-reason
Aggregate escalated conversations by escalation reason code for a time window (explicit from/to, or a 24h/7d/30d/90d range shortcut; defaults to the last 30 days). Returns one bucket per code with its count and median escalation→resolution time, plus an uncoded bucket for legacy free-text reasons. Use it to rank the top escalation drivers in the inbox.

List scheduled reports (deprecated)

GET /api/v1/reports/scheduled
Deprecated — the canonical surface is now GET /api/v1/analytics/scheduled-reports. This legacy route is a thin adapter over the same public.scheduled_reports store, so it returns exactly the same data as the new surface and never diverges. New integrations should call the analytics route. List all scheduled report definitions for the organization, newest first, with cursor pagination.

Get a scheduled report (deprecated)

GET /api/v1/reports/scheduled/{id}
Deprecated — the canonical surface is now GET /api/v1/analytics/scheduled-reports/{id}. This legacy route is a thin adapter over the same public.scheduled_reports store, so it returns the same definition the new surface shows. Retrieve a single scheduled report definition by id.
string
required

Generate an on-demand report

POST /api/v1/reports/generate
Generate a delivery report on demand for one channel (or all channels) over a time window chosen with an explicit from/to pair or a 24h/7d/30d/90d range shortcut. Returns aggregate metrics (totals, delivered/failed, delivery rate, cost) plus a daily breakdown and a per-channel breakdown. Requires owner, admin or developer role.

Create a scheduled report (deprecated)

POST /api/v1/reports/scheduled
Deprecated — the canonical surface is now POST /api/v1/analytics/scheduled-reports. This legacy route persists to the same public.scheduled_reports store the new surface writes to (single source of truth — it never diverges). Create a recurring report that generates on a cadence (daily/weekly/monthly) and emails the output (csv, pdf or xlsx) to its recipients. Requires owner, admin or developer role.

Update a scheduled report (deprecated)

PUT /api/v1/reports/scheduled/{id}
Deprecated — the canonical surface is now PUT /api/v1/analytics/scheduled-reports/{id}. This legacy route persists to the same public.scheduled_reports store the new surface writes to. Partially update a scheduled report — omitted fields keep their current values. Requires owner, admin or developer role.
string
required

Delete a scheduled report (deprecated)

DELETE /api/v1/reports/scheduled/{id}
Deprecated — the canonical surface is now DELETE /api/v1/analytics/scheduled-reports/{id}. Delete the definition so it stops running on its cadence. Returns 204 with no body on success; past emailed outputs are unaffected.
string
required