v2

latestOpenAPI 3.1.02026-07-273779120.8 KB
Campaign Stats
Stats

Conversation Outcome Mapping Trends

Get conversation outcome category / sub category counts over time, split into contiguous windows so the result can be rendered as a trend/bar chart.

The window size is derived from the requested period:

  • ≤ 2 days → 6-hour windows

  • ≤ 14 days → daily windows

  • ≤ ~1 month → weekly windows

  • > 1 month → monthly windows

  • template: Outcome mapping template to bucket outcomes by.

  • start / end: ISO 8601 range. end is exclusive; each window's end field is its last second (e.g. ...T23:59:59Z).

  • timezone: IANA timezone the day/month/6-hour bars align to (local calendar); defaults to UTC. Weekly bars are always anchored to start.

Returns an empty list if the team has no outcome mapping configured yet, or if the given range is missing or empty.

get/campaigns/v1/stats/outcomes/{template}/trends

Path parameters

template'template_v1' required

Outcome mapping template to bucket outcomes by

Query parameters

timezonestring

IANA timezone (e.g. 'Asia/Kolkata') that day/month/6-hour bars align to; defaults to UTC.

IANA timezone (e.g. 'Asia/Kolkata') that day/month/6-hour bars align to; defaults to UTC.

sizeinteger

Number of items per page

Number of items per page

pageinteger

Page number

Page number

searchstring nullable

Search keywords

Search keywords

startstring date-time nullable

Filter by start time (ISO 8601 format)

Filter by start time (ISO 8601 format)

endstring date-time nullable

Filter by end time (ISO 8601 format)

Filter by end time (ISO 8601 format)

Response

Conversation outcome category / sub category counts bucketed into time windows

messagestring required

Result description

Example response

{
  "message": "Stats fetched successfully."
}