ChatFood API

Read performance

Needs a token with metrics:read.

Account health and alert counters:

curl -s "$API/v1/alerts/summary" -H "Authorization: Bearer $CF"

Today versus yesterday (GraphQL; delivery and error rates, new leads, broadcasts):

curl -s "$API/graphql" -H "Authorization: Bearer $CF" -H "Content-Type: application/json" -d '{
  "query": "query($tz: String, $page: UUID) { dashboard(timezoneOffset: $tz, pageId: $page) { broadcasts { totalToday completedToday failedToday } leads { totalActive newToday newYesterday } metrics { totalSentToday totalDeliveredToday deliveryRateToday errorRateToday deliveryRateYesterday } } }",
  "variables": {"tz": "-03:00", "page": null}
}'

Funnel of one flow over a period (flowMetrics, see §10), and per broadcast node metrics:

curl -s "$API/v1/schemas/<schemaId>/metrics?broadcastId=<broadcastId>" -H "Authorization: Bearer $CF"

broadcastCalendar* additionally needs broadcasts:read; profileCalendar needs leads:read. Without them the result is empty, not an error.

The GraphQL endpoint (POST /graphql) is read only and has introspection enabled, so any GraphQL client can explore the schema with the same token.