Reports
Call detail records, summaries, saved templates and exports.
Live view or file
See which fields a call record has.
Read records live, a page at a time.
Or build a fixed file and download it when it is ready.
POSTCreate a report exportGETGet a report exportGETDownload a report export
On this page
Call records
Templates
List call detail records
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr
Returns one row per call in the campaign for a reporting period, with every field of the campaign's report catalogue (see List report fields) as a cell. Each cell has a status: only VALUE cells carry a value; masked customer fields come back as MASKED.
from and to are ISO 8601 timestamps with an offset; the period must have started and may span at most 31 days. timeBasis chooses whether a call counts by when it was requested, when it ended, or whether it was active at any point in the period. Filter by call state, agent, lead, disposition or whether the wrap-up is recorded. Pages of up to 100 rows use an opaque cursor: pass nextCursor back as cursor with the same filters until it is null.
This is a live view: rows can change while a call is in progress or telephony data catches up (telephonySync). For a fixed file, create an export. A very broad query can time out with 503; narrow the period or filters and retry. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Query parameters · 11
Required
fromStart of the period (ISO 8601).
toEnd of the period (ISO 8601).
Dates
timeBasisWhich call time the period filters on: when the call was created, when it ended, or any time it was active.
Other filters
stateCurrent state of the call detail record.
agentIdID of the agent.
leadIdID of the lead.
wrapUpALL,RECORDED(wrap-up saved) orAWAITING(wrap-up still due).dispositionKeyOnly calls with this disposition key.
Sorting
orderSort direction.
Paging
limitMaximum number of records to return in one page.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.
Responses
One page of call records.
versionVersion number.
campaignIdID of the campaign.
processIdID of the process.
timezoneIANA time zone, for example
Asia/Kolkata.fromStart of the period (ISO 8601), inclusive.
toEnd of the period (ISO 8601), inclusive.
timeBasisWhich call time the period filters on: when the call was created, when it ended, or any time it was active.
observedAtWhen it was observed (ISO 8601).
consistencyHow current the data is:
LIVE_PAGEmeans read live when the page was built.lastTelephonySyncAtWhen it was last telephony sync (ISO 8601);
nullif not yet.telephonySyncHow current telephony data is:
FRESH,STALE(behind) orUNAVAILABLE.itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.- A service this operation depends on is temporarily unavailable; retry with backoff.
List report fields
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/fields
Returns the campaign's report catalogue: every field a call record, template or export can contain (call facts, timings, disposition, callback and the campaign's customer fields), with its type, group and whether it is masked or only available for older calls. Use the field IDs as column keys in templates and exports. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Responses
The report catalogue.
versionVersion number.
campaignIdID of the campaign.
processIdID of the process.
timezoneIANA time zone, for example
Asia/Kolkata.fieldsThe fields, in display order.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.
Summarise calls by lead or account
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/summary
Groups the campaign's calls for a reporting period by lead, or by account using a customer field you choose (groupBy: ACCOUNT with accountFieldKey), with totals per group and overall: requests, ended, open, uncertain and failed calls, wrap-ups recorded and awaited, and open and overdue callbacks.
from and to are ISO 8601 timestamps with an offset; the period must have started and may span at most 31 days. timeBasis chooses whether a call counts by when it was requested, when it ended, or whether it was active at any point in the period. Groups are paged with cursor / nextCursor. A summary covering more than 10,000 leads is refused with 400; narrow the period or filters. If the data changes while you page, the next page returns 409; start again from the first page. A very broad query can time out with 503; narrow the period or filters and retry. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Query parameters · 13
Required
fromStart of the period (ISO 8601).
toEnd of the period (ISO 8601).
Dates
timeBasisWhich call time the period filters on: when the call was created, when it ended, or any time it was active.
Other filters
stateCurrent state of the call detail record.
agentIdID of the agent.
leadIdID of the lead.
wrapUpALL,RECORDED(wrap-up saved) orAWAITING(wrap-up still due).dispositionKeyOnly calls with this disposition key.
groupByLEADorACCOUNT(grouped by a customer field).accountFieldKeyCustomer field to group by; required when
groupByisACCOUNT, refused otherwise.
Sorting
orderSort direction.
Paging
limitMaximum number of records to return in one page.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.
Responses
One page of the summary.
versionVersion number.
campaignIdID of the campaign.
timezoneIANA time zone, for example
Asia/Kolkata.observedAtWhen it was observed (ISO 8601).
consistencyHow current the data is:
LIVE_PAGEmeans read live when the page was built.groupByLEADorACCOUNT(grouped by a customer field).accountFieldKeyCustomer field to group by when
groupByisACCOUNT.fromStart of the period (ISO 8601), inclusive.
toEnd of the period (ISO 8601), inclusive.
timeBasisWhich call time the period filters on: when the call was created, when it ended, or any time it was active.
matchedLeadsLeads matched to a group.
totalGroupsGroups in the summary, across all pages.
unmatchedLeadsLeads without a value in the grouping field.
totalsTotals across all groups.
itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.- The change conflicts with the record's current state or a workflow rule;
error.codenames it. - A service this operation depends on is temporarily unavailable; retry with backoff.
Get earlier calls with the same lead
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/calls/{callId}/history
Returns the record of one call (anchor) followed by the lead's earlier calls in the same campaign, newest first, so you can compare what changed between wrap-ups. Paged with cursor / nextCursor, up to 50 per page. A very broad query can time out with 503; narrow the period or filters and retry. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
callIdCall ID.
Query parameters
limitMaximum number of records to return in one page.
cursorOpaque cursor from the previous page's
nextCursor. Leave it out to start at the first page.
Responses
The call and earlier calls.
versionVersion number.
campaignIdID of the campaign.
leadIdID of the lead.
timezoneIANA time zone, for example
Asia/Kolkata.observedAtWhen it was observed (ISO 8601).
consistencyHow current the data is:
LIVE_PAGEmeans read live when the page was built.anchorThe call the history is centred on.
itemsThe records in this response, in the documented order.
nextCursorPass as
cursorto fetch the next page;nullon the last page.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.CALL_NOT_FOUNDThe call does not exist or the key cannot see it.- A service this operation depends on is temporarily unavailable; retry with backoff.
List report templates
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/templates
Lists saved report layouts for the campaign's process: your own templates and those shared with the process. canEdit is true for templates the acting member owns. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Responses
Report templates.
itemsThe records in this response, in the documented order.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.
Create or update a report template
PUT/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/templates
Saves a report layout: the columns (field IDs from List report fields, each with a heading), an optional business identifier column, the time basis and default filters. Templates belong to the campaign's process, so they work for every campaign of that process. PRIVATE templates are visible only to their owner; PROCESS templates are shared.
To create, choose a new UUID as id and send expectedRevision: 0; to update, send the template's current revision. Only the owner can update a template. A stale revision, or the limit of 200 templates per process, returns 409. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Request body (application/json)
idID of the call detail record template.
expectedRevisionThe
revisionfrom your last read. If the record changed since, the request fails with409and nothing is saved.nameName of the call detail record template, as shown in the LMS.
visibilityWho can see it, from the values below.
definitionWhat the report contains: columns, filters and time basis.
Responses
The saved template.
idID of the call detail record template.
processIdID of the process.
ownerIdID of the owner.
nameName of the call detail record template, as shown in the LMS.
visibilityWho can see it, from the values below.
revisionRevision number, increased on every change. Send it back as
expectedRevisionwhen you update.definitionWhat the report contains: columns, filters and time basis.
updatedAtWhen it last changed (ISO 8601). Send it back as
expectedUpdatedAtwhen you update.canEditWhether it can edit.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.CDR_TEMPLATE_CONFLICTThe template changed after you read it, or its name is taken.
Delete a report template
DELETE/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/templates/{templateId}
Removes a template you own. Send its current revision as expectedRevision; a stale revision, or a template that is not yours or already removed, returns 409. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
templateIdReport template ID.
Request body (application/json)
expectedRevisionThe
revisionfrom your last read. If the record changed since, the request fails with409and nothing is saved.
Responses
The template was removed.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.TEMPLATE_NOT_FOUNDThe report template does not exist or the key cannot see it.CDR_TEMPLATE_CONFLICTThe template changed after you read it.
Create a report export
POST/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/exports
Starts building a CSV or Excel file of the campaign's call records for a period of up to 31 days, laid out by definition (the same shape as a template). view chooses one row per call (CALLS), per lead (LEAD) or per account (ACCOUNT, with accountFieldKey).
The export runs in the background. Poll Get a report export until state is READY (or FAILED), then download it. Files are available for 24 hours after the request, then EXPIRED. Exports hold up to 100,000 rows.
Choose a new UUID as id: it makes the request safe to retry. Repeating the same request returns the existing export; reusing the id with a different request returns 409.
Limits: 2 exports in progress per member, 5 per workspace, and 20 requests per member per day; beyond that the request returns 429. Returns 503 when export storage is not configured. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Request body (application/json)
idID of the call detail record export.
formatCSVorXLSX.viewCALLS(one row per call),LEAD(one row per lead) orACCOUNT(grouped by an account field).accountFieldKeyCustomer field that identifies the account, when rows are grouped by account.
definitionWhat the report contains: columns, filters and time basis.
fromStart of the period (ISO 8601), inclusive.
toEnd of the period (ISO 8601), inclusive.
Responses
The export was accepted (or already existed).
idID of the call detail record export.
campaignIdID of the campaign.
formatCSVorXLSX.viewCALLS(one row per call),LEAD(one row per lead) orACCOUNT(grouped by an account field).stateCurrent state of the call detail record export.
createdAtWhen it was created (ISO 8601).
capturedAtWhen it was captured (ISO 8601);
nullif not yet.expiresAtWhen it expires (ISO 8601).
rowCountNumber of row records.
byteLengthFile size in bytes;
nulluntil ready.sha256SHA-256 checksum of the file, in hex.
errorCodeWhy the export failed;
nullunless it failed.fromStart of the period (ISO 8601), inclusive.
toEnd of the period (ISO 8601), inclusive.
Errors
VALIDATION_ERRORA parameter, header or body field is invalid; compare the request with the fields above (Validation errors).PARTNER_OPERATION_FORBIDDENThe key lacks thereports.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.- The change conflicts with the record's current state or a workflow rule;
error.codenames it. - A service this operation depends on is temporarily unavailable; retry with backoff.
List report exports
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/exports
Lists the acting member's 50 most recent exports for the campaign, newest first, with their state. enabled: false means export storage is not configured, so new exports cannot be created. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
Responses
Recent exports.
itemsThe records in this response, in the documented order.
enabledWhether it is turned on.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.
Get a report export
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/exports/{exportId}
Returns one of the acting member's exports. state moves from QUEUED to PROCESSING to READY, or ends as FAILED (see errorCode), CANCELLED or EXPIRED. When READY, rowCount, byteLength and sha256 describe the file. Poll every few seconds while it is queued or processing. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
exportIdExport ID.
Responses
The export.
idID of the call detail record export.
campaignIdID of the campaign.
formatCSVorXLSX.viewCALLS(one row per call),LEAD(one row per lead) orACCOUNT(grouped by an account field).stateCurrent state of the call detail record export.
createdAtWhen it was created (ISO 8601).
capturedAtWhen it was captured (ISO 8601);
nullif not yet.expiresAtWhen it expires (ISO 8601).
rowCountNumber of row records.
byteLengthFile size in bytes;
nulluntil ready.sha256SHA-256 checksum of the file, in hex.
errorCodeWhy the export failed;
nullunless it failed.fromStart of the period (ISO 8601), inclusive.
toEnd of the period (ISO 8601), inclusive.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.CDR_EXPORT_NOT_FOUNDThe export does not exist or the key cannot see it.
Cancel or discard a report export
DELETE/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/exports/{exportId}
Cancels an export that is still running, or discards a finished one so it can no longer be downloaded. Cancelling an export that is already cancelled or expired succeeds without change. The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
exportIdExport ID.
Responses
The export was cancelled.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.writescope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.CDR_EXPORT_NOT_FOUNDThe export does not exist or the key cannot see it.
Download a report export
GET/v1/tenants/{tenantSlug}/lms/campaigns/{campaignId}/cdr/exports/{exportId}/download
Streams the finished file as an attachment: text/csv; charset=utf-8 for CSV exports, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for Excel exports. Compare X-Report-SHA256 with the export's sha256 to verify it. Returns 409 while the export is not READY, or when the workspace's customer field masking changed since it was built (create a new export); 410 once it has expired; 503 when the file cannot be read from storage (retry later). The acting member needs both calling management and lead read permissions.
Path parameters
campaignIdCampaign ID.
exportIdExport ID.
Responses
The export file.
Content-DispositionAlwaysattachment; filename="cdr-<exportId>.<csv|xlsx>".Content-LengthFile size in bytes.X-Report-SHA256SHA-256 of the file, as lowercase hex.
Errors
PARTNER_OPERATION_FORBIDDENThe key lacks thereports.readscope.PERMISSION_DENIEDThe key's acting member lacks the permission or data access.CAMPAIGN_NOT_FOUNDThe campaign does not exist or the key cannot see it.CDR_EXPORT_NOT_FOUNDThe export does not exist or the key cannot see it.- The change conflicts with the record's current state or a workflow rule;
error.codenames it. CURSOR_EXPIREDThe cursor is older than the 30-day retention. Take a fresh cursor and reconcile mirrored records: Retention and recovery.- A service this operation depends on is temporarily unavailable; retry with backoff.