Referencia de la API

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

NombreEnTipoRequeridoDescripción
sincequerystring (date-time) | null
untilquerystring (date-time) | null
granularityquerystring
timezonequerystring
assistant_idquerystring (uuid) | null
campaign_idquerystring (uuid) | null

Respuestas

  • 200 Successful Response · MetricsResponse
    NombreTipoRequeridoDescripció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í
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role 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). · ErrorResponse
  • 422 The range or a parameter is invalid. · ErrorResponse
  • 503 Metrics are not available yet. · ErrorResponse
  • default Default Response · ErrorResponse