Reportes
Reportes de campañas y exportaciones en CSV.
GET /v1/reports/calls/export
Export the call log as CSV
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
The calls that match the filters of `listCalls` (without `limit` and `cursor`), newest first, one row per call: id, start, duration, assistant, campaign, direction, outcome, end reason, `phone_last4` and `simulated`. The result of the call adds `result_outcome`, `structured_output` as JSON text, and one `result.<key>` column for each top-level key of the structured outputs (a list or an object as JSON text). The `include_costs` and `include_internal` options require `costs:read` and add the cost estimate and captured values respectively. Streamed, never held in memory. Needs an `editor` or above. Never has a full phone number. A text that starts with `=`, `+`, `-` or `@` is prefixed with `'` so a spreadsheet does not run it. At most 100,000 rows: a larger result is refused with 422, narrow the filters. Every export is audited as `report.export` (filter names only, never values). An organization may start a limited number of exports per minute. 401, 422 and 503 as in `listCalls`; 403 for a `viewer`; 429 when the organization exports too often (see `Retry-After`).
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
format | query | string | ||
since | query | string (date-time) | null | ||
until | query | string (date-time) | null | ||
assistant_id | query | string (uuid) | null | ||
campaign_id | query | string (uuid) | null | ||
outcome | query | string | null | ||
end_reason | query | string | null | ||
direction | query | string | null | ||
q | query | string | null | ||
sentiment | query | "positive" | "neutral" | "negative" | null | The sentiment of the post-call analysis. | |
criterion | query | string | null | Id of a success criterion of the assistant; the call was analyzed. | |
criterion_result | query | "success" | "failure" | "unknown" | null | How `criterion` was judged. Needs `criterion`. | |
include_costs | query | boolean | ||
include_internal | query | boolean |
Respuestas
200A CSV file.401Missing, expired or invalid token. · ErrorResponse403The caller lacks the required role or permission. · ErrorResponse422A filter is invalid or the result too big. · ErrorResponse429Too many exports; retry later. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/reports/campaigns/{campaign_id}
How a campaign went
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member. `summary` (status, dates, contacts, attempts, minutes), `contactability` (contacts reached, those with an answered attempt, over contacts), `attempts_per_contact` (how many contacts took 0, 1, 2... attempts), `outcomes` of the closed attempts (`answered_responded` when an answered call has a transcribed caller turn; older calls without this signal remain `answered`), `best_hours` (attempts and answered by local hour of the campaign's time zone, only the hours with attempts), `dnc_skipped` (contacts closed by the do-not-call list) and `completion`. Reports include real and simulated campaign calls. 401 when the token is missing, expired or invalid; 404 when the campaign is not in the caller's organization; 503 when reports are not available.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí |
Respuestas
200Successful Response · CampaignReportResponseNombre Tipo Requerido Descripción attempts_per_contactAttemptsBucketResponse[]sí attempts_per_contact[].attemptsintegersí attempts_per_contact[].contactsintegersí best_hoursHourOutcomeResponse[]sí best_hours[].answeredintegersí best_hours[].attemptsintegersí best_hours[].hourintegersí Local hour in the campaign's zone. completionCompletionResponsesí completion.contacts_doneintegersí completion.contacts_totalintegersí completion.progressnumbersí contactabilityContactabilityResponsesí contactability.contactsintegersí contactability.ratenumber | nullsí `reached` over `contacts`. contactability.reachedintegersí Contacts with at least one answered attempt. dnc_skippedintegersí Contacts closed by the do-not-call list. outcomesOutcomeCountResponse[]sí outcomes[].attemptsintegersí outcomes[].contactsintegersí Distinct contacts with such an attempt. outcomes[].outcomestringsí summaryReportSummaryResponsesí summary.assistant_idstring (uuid)sí summary.attemptsintegersí summary.campaign_idstring (uuid)sí summary.completed_atstring (date-time) | nullsí summary.contacts_totalintegersí summary.namestringsí summary.started_atstring (date-time) | nullsí summary.statusstringsí (draft, running, paused, completed, cancelled) summary.timezonestringsí summary.total_minutesnumbersí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/reports/campaigns/{campaign_id}/export
Export a campaign as CSV
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
One row per contact: id, `phone_last4`, state, attempts, the last outcome (`answered_responded` when caller speech was transcribed), `last_call_at` (start of the last completed attempt, in the campaign's time zone) and the seconds of the contact's completed attempts: `seconds_total`, `seconds_effective` (answered attempts) and `seconds_not_effective` (the rest). Then one `file.<header>` column for each other column of the contact file (in file order, at most 100), as the client uploaded it, followed by exportable result columns. The legacy layout uses the last completed attempt. Select `view=contact` or `view=attempt` for the configured dashboard layout and filters. An explicit request for costs or internal fields requires `costs:read`. Never the full phone number. Streamed, never held in memory. Needs an `editor` or above. At most 100,000 contacts: a larger campaign is refused with 422. Every export is audited as `report.export`. An organization may start a limited number of exports per minute. 401, 403, 429 and 503 as in `exportCalls`; 404 when the campaign is not in the caller's organization.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
format | query | string | ||
include_costs | query | boolean | ||
include_internal | query | boolean | ||
outcome | query | string | "answered_responded" | "no_initial_response" | "silence_abandonment" | null | ||
since | query | string (date-time) | null | ||
until | query | string (date-time) | null | ||
view | query | string | null |
Respuestas
200A CSV file.401Missing, expired or invalid token. · ErrorResponse403The caller lacks the required role or permission. · ErrorResponse404No such campaign in the caller's tenant. · ErrorResponse422The format is invalid or the campaign too big. · ErrorResponse429Too many exports; retry later. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/reports/campaigns/{campaign_id}/rows
Page through the contacts or call attempts of a campaign
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
Contacts show all completed outcomes and the best and latest dispatch. Attempt mode expands individual dispatches. Outcome and UTC date filters select matching rows without altering a contact's totals. Standard reports omit cost and captured variables. The include_costs and include_internal options require costs:read.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | path | string (uuid) | sí | |
include_costs | query | boolean | ||
include_internal | query | boolean | ||
outcome | query | string | "answered_responded" | "no_initial_response" | "silence_abandonment" | null | ||
since | query | string (date-time) | null | ||
until | query | string (date-time) | null | ||
view | query | string | ||
limit | query | integer | ||
cursor | query | string (uuid) | null |
Respuestas
200Successful Response · ReportRowsResponseNombre Tipo Requerido Descripción available_columnsReportColumn[]sí available_columns[].keystringsí available_columns[].labelstring | nullavailable_columns[].sourcestringsí (file, result, captured) columnsReportColumn[]sí columns[].keystringsí columns[].labelstring | nullcolumns[].sourcestringsí (file, result, captured) itemsReportRowResponse[]sí items[].attemptReportAttemptResponse | nullsí items[].attempt.attempt_numberintegersí items[].attempt.cost_usdnumber | nullitems[].attempt.dispatch_sequenceintegersí items[].attempt.duration_secondsinteger | nullsí items[].attempt.idstring (uuid)sí items[].attempt.outcomestring | "answered_responded" | "no_initial_response" | "silence_abandonment" | nullsí (answered, busy, no_answer, voicemail, failed, dnc) items[].attempt.silence_phasestring | nullsí (initial, in_conversation) items[].attempt.started_atstring (date-time)sí items[].attempt.statusstringsí (in_progress, completed, released) items[].attempt_countintegersí items[].attempt_outcomesstring | "answered_responded" | "no_initial_response" | "silence_abandonment"[]sí Outcome of each completed attempt, ascending by dispatch sequence. items[].best_attemptReportAttemptResponse | nullsí items[].best_attempt.attempt_numberintegersí items[].best_attempt.cost_usdnumber | nullitems[].best_attempt.dispatch_sequenceintegersí items[].best_attempt.duration_secondsinteger | nullsí items[].best_attempt.idstring (uuid)sí items[].best_attempt.outcomestring | "answered_responded" | "no_initial_response" | "silence_abandonment" | nullsí (answered, busy, no_answer, voicemail, failed, dnc) items[].best_attempt.silence_phasestring | nullsí (initial, in_conversation) items[].best_attempt.started_atstring (date-time)sí items[].best_attempt.statusstringsí (in_progress, completed, released) items[].cellsany[]sí items[].contact_idstring (uuid)sí items[].latest_attemptReportAttemptResponse | nullsí items[].latest_attempt.attempt_numberintegersí items[].latest_attempt.cost_usdnumber | nullitems[].latest_attempt.dispatch_sequenceintegersí items[].latest_attempt.duration_secondsinteger | nullsí items[].latest_attempt.idstring (uuid)sí items[].latest_attempt.outcomestring | "answered_responded" | "no_initial_response" | "silence_abandonment" | nullsí (answered, busy, no_answer, voicemail, failed, dnc) items[].latest_attempt.silence_phasestring | nullsí (initial, in_conversation) items[].latest_attempt.started_atstring (date-time)sí items[].latest_attempt.statusstringsí (in_progress, completed, released) items[].outcomesReportOutcomeResponse[]sí items[].outcomes[].countintegersí items[].outcomes[].outcomestring | "answered_responded" | "no_initial_response" | "silence_abandonment"sí (answered, busy, no_answer, voicemail, failed, dnc) next_cursorstring (uuid) | nullsí 401Missing, expired or invalid token. · ErrorResponse403Insufficient role or full report permission. · ErrorResponse404No such campaign in the organization. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/reports/config
Read the organization's campaign report settings
Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
include_internal | query | boolean | ||
campaign_id | query | string (uuid) | null |
Respuestas
200Successful Response · ReportConfigNombre Tipo Requerido Descripción columnsReportColumn[] | nullcolumns[].keystringsí columns[].labelstring | nullcolumns[].sourcestringsí (file, result, captured) objective_fieldstring | nullrankingstring[]stage_orderstring[]401Missing, expired or invalid token. · ErrorResponse403Insufficient role or full report permission. · ErrorResponse404No such campaign in the organization. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
PUT /v1/reports/config
Replace the organization's campaign report settings
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
campaign_id | query | string (uuid) | null | ||
include_internal | query | boolean |
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
columns | ReportColumn[] | null | ||
columns[].key | string | sí | |
columns[].label | string | null | ||
columns[].source | string | sí | (file, result, captured) |
objective_field | string | null | ||
ranking | string[] | ||
stage_order | string[] |
Respuestas
200Successful Response · ReportConfigNombre Tipo Requerido Descripción columnsReportColumn[] | nullcolumns[].keystringsí columns[].labelstring | nullcolumns[].sourcestringsí (file, result, captured) objective_fieldstring | nullrankingstring[]stage_orderstring[]401Missing, expired or invalid token. · ErrorResponse403Insufficient role or full report permission. · ErrorResponse404No such campaign in the organization. · ErrorResponse409Protected settings require costs:read. · ErrorResponse503Reports are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse