chatformdocs
API referenceV1

Counts, per-question funnel and answer distributions

GET
/v1/forms/{id}/analytics

Authorization

AuthorizationBearer <token>

A server-side secret key. Never send one from a browser — a request carrying an Origin header is refused for this reason.

In: header

Path Parameters

id*string

Query Parameters

source?string

Only responses from this channel (chat, embed, api), or all.

Default"all"
includeTest?"1"

1 counts test-mode responses too. A test key always does.

Value in

  • "1"

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/forms/string/analytics"
{  "views": 0,  "starts": 0,  "completed": 0,  "abandoned": 0,  "inProgress": 0,  "startsWithContext": 0,  "avgDurationMs": 0,  "medianDurationMs": 0,  "completionRate": 0,  "perBlock": [    {      "blockRef": "string",      "blockType": "string",      "title": "string",      "answered": 0,      "answerRate": 0,      "dropOff": 0    }  ],  "distributions": [    {      "blockRef": "string",      "title": "string",      "type": "string",      "answered": 0,      "options": [        {          "label": "string",          "count": 0        }      ],      "multi": true,      "values": [        {          "value": 0,          "count": 0        }      ],      "numericSummary": {        "avg": 0,        "min": 0,        "max": 0,        "median": 0      },      "samples": [        "string"      ],      "ranking": [        {          "label": "string",          "avgRank": 0        }      ],      "matrix": {        "rows": [          "string"        ],        "cols": [          "string"        ],        "counts": [          [            0          ]        ]      },      "timeline": [        {          "label": "string",          "count": 0        }      ]    }  ],  "daily": [    {      "date": "string",      "views": 0,      "starts": 0,      "completed": 0    }  ],  "bySource": [    {      "source": "string",      "count": 0    }  ],  "byCountry": [    {      "country": "string",      "count": 0    }  ],  "byDevice": {    "property1": 0,    "property2": 0  },  "places": [    {      "country": "string",      "region": "string",      "city": "string",      "lat": 0,      "lon": 0,      "count": 0,      "completed": 0    }  ],  "byBrowser": [    {      "label": "string",      "count": 0    }  ],  "byOs": [    {      "label": "string",      "count": 0    }  ],  "byChannel": [    {      "label": "string",      "count": 0    }  ],  "byReferrer": [    {      "label": "string",      "count": 0    }  ],  "byCampaign": [    {      "label": "string",      "count": 0,      "completed": 0    }  ],  "byDeviceType": [    {      "label": "string",      "count": 0,      "completed": 0    }  ],  "byLanguage": [    {      "label": "string",      "count": 0,      "completed": 0    }  ],  "byWeekHour": [    [      0    ]  ],  "durationBuckets": [    {      "label": "string",      "count": 0    }  ],  "aiFallbacks": {    "calls": 0,    "sessions": 0,    "reasons": [      {        "code": "string",        "count": 0      }    ]  },  "locked": [    "string"  ],  "property1": null,  "property2": null}