Métricas
KPIs de llamadas, series y desgloses.
GET /v1/metrics
Call metrics of my organization
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member. Over `since` (inclusive) to `until` (exclusive), by default the last 7 days, for real and simulated calls, optionally of one `assistant_id` or `campaign_id`: `kpis` (calls, answered and the answered rate, average duration, total minutes, cost estimate and `promises`, the calls whose structured output has a `promise_date` or `fecha_promesa`, null when no call has a structured output), `series` per `granularity` (`day`, up to 366 days, or `hour`, up to 31 days; buckets start at midnight or the hour of `timezone`, an IANA name, UTC by default; empty buckets are not listed), the calls by end reason and by outcome, the average duration per assistant, the cost per component (empty when calls were reported with a single total), `criteria` (the success rate of each success criterion over the analyzed calls) and `sentiment` (analyzed calls by sentiment). 401 when the token is missing, expired or invalid; 422 for an empty or too long range, an unknown time zone or another invalid parameter; 503 when metrics are not available.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
since | query | string (date-time) | null | ||
until | query | string (date-time) | null | ||
granularity | query | string | ||
timezone | query | string | ||
assistant_id | query | string (uuid) | null | ||
campaign_id | query | string (uuid) | null |
Respuestas
200Successful Response · MetricsResponseNombre Tipo Requerido Descripción by_end_reasonShareResponse[]sí by_end_reason[].callsintegersí by_end_reason[].keystringsí by_outcomeShareResponse[]sí by_outcome[].callsintegersí by_outcome[].keystringsí cost_by_componentCostComponentResponse[]sí Empty when no call reported a split. cost_by_component[].componentstringsí cost_by_component[].cost_usdnumbersí criteriaCriterionStatResponse[]sí Success rate per success criterion over the analyzed calls of the range; empty when no call was analyzed. criteria[].failureintegersí criteria[].idstringsí criteria[].namestringsí criteria[].successintegersí criteria[].success_ratenumber | nullsí `success` over `success` plus `failure`; null when none was decided. criteria[].unknownintegersí duration_by_assistantAssistantDurationResponse[]sí duration_by_assistant[].assistant_idstring (uuid) | nullsí duration_by_assistant[].assistant_namestring | nullsí duration_by_assistant[].average_duration_secondsnumbersí duration_by_assistant[].callsintegersí granularitystringsí kpisKpisResponsesí kpis.answeredintegersí kpis.answered_ratenumber | nullsí Null with no calls. kpis.average_duration_secondsnumber | nullsí kpis.callsintegersí kpis.cost_usdnumber | nullsí Sum of the priced calls. kpis.promisesinteger | nullsí Calls whose structured output has a `promise_date` or `fecha_promesa`; null when no call in the range has a structured output. kpis.total_minutesnumbersí sentimentSentimentDistributionResponsesí sentiment.negativeintegersí sentiment.neutralintegersí sentiment.positiveintegersí seriesSeriesPointResponse[]sí series[].answeredintegersí series[].bucketstring (date-time)sí Start of the day or hour. series[].callsintegersí series[].cost_usdnumber | nullsí series[].minutesnumbersí sincestring (date-time)sí untilstring (date-time)sí 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). · ErrorResponse422The range or a parameter is invalid. · ErrorResponse503Metrics are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse