Developers
ENPT

Reports

Get conversation volume, service numbers and costs of your account for a period.

Three reports bring the numbers of your account into your own dashboards:

  • Conversation statistics: number of services, messages and tickets, split by channel and by after-hours, with monthly and daily history.
  • Financial statistics: conversations per month and per day, with the cost based on your contracted price per service.
  • AI costs: what the AI models cost in the period, per model, and the average cost per conversation.

Dates use the YYYY-MM-DD format.

Conversation statistics

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/reports/getConversationalStats

ParameterTypeRequiredDescription
hostIdstring (UUID)YesYour account ID.
startDatestringNoStart of the period. Default: 30 days ago.
endDatestringNoEnd of the period. Default: today.
bypassCachebooleanNotrue recalculates. Otherwise results are cached for 5 minutes when the period includes today, 3 hours for past periods.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/reports/getConversationalStats" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hostId": "<your-host-id>", "startDate": "2026-10-01", "endDate": "2026-10-31" }'

data is an array with one object:

FieldDescription
total_contracted_servicesServices in your plan.
total_services, services_month_to_dateServices in the period and in the current month.
total_messages, total_messages_sent_by_avatar, total_messages_received_by_userMessages.
total_messages_responder_managerMessages sent by your team.
total_services_after_hours, total_messages_after_hoursActivity outside business hours.
total_tickets, total_opened_tickets, total_solved_ticketsTickets.
services_on_whatsapp, services_on_webchat, services_on_minichat, services_on_api, services_on_other_channelsServices per channel.
history_months, history_daysHistory series for charts.
metagenerated_at and from_cache.

Financial statistics

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/reports/getFinancialStats

ParameterTypeRequiredDescription
hostIdstring (UUID)YesYour account ID.
startDatestringNoStart of the daily series. Default: 30 days ago.
endDatestringNoEnd of the period. Default: today. The monthly series covers the 12 months up to this date.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/reports/getFinancialStats" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hostId": "<your-host-id>", "startDate": "2026-10-01", "endDate": "2026-10-31" }'

data is an array with one object:

FieldDescription
host_planYour plan, including service_pricing_contracted (price per service).
history_monthsOne item per month: mês (first day of the month), total_conversations, total_cost.
history_daysOne item per day: dia, total_conversations, total_cost.
metagenerated_at.

total_cost is the number of conversations times your price per service.

AI costs

Cost data is consolidated once a day, so the most recent day available is usually yesterday. If you ask for a later end date, the report uses the last day available and tells you.

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/reports/getCostByHostId

ParameterTypeRequiredDescription
hostIdstring (UUID)NoYour account ID. Default: the account of the token.
startDatestringNoDefault: first day of the current month.
endDatestringNoDefault: today, limited to the last day available.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/reports/getCostByHostId" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "startDate": "2026-10-01", "endDate": "2026-10-31" }'
FieldDescription
costsOne item per model, most expensive first: model, provider, total_tokens, prompt_tokens, response_tokens, total_cost_usd, total_cost_brl (converted at the current rate plus 3.5% IOF tax), exchange_rate_usd_to_brl, iof_rate.
cost_per_conversationAverage cost per conversation for last_10_conversations, last_24h_conversations, last_7days_conversations and period_conversations: average_cost_usd, average_cost_brl and, except for the last 10, total_conversations.
host_infoYour plan: contracted services and price per service.
currency_infousd_to_brl_rate, iof_rate, last_updated.
filter_datesRequested and applied dates, and was_clamped (true when the end date was moved back).
data_last_updatedLast day with cost data.

Results are cached for 2 minutes.

Errors

ErrorsTechnical details
StatusWhen
500The report could not be calculated.

When hostId is missing or the period has no data, the statistics reports return zeros or an empty data array instead of an error.

Previous

Flow Assistant

Next

Partners