Count submissions
count_submissionsHow many submissions match, instead of the submissions themselves. Call this before listing when you do not know how big an answer is, so you can narrow it rather than paging blindly. Takes the same filters as list_submissions. Pass group_by to count by day, week, month, country, spam, read, or field: for a submitted field, and the largest 20 groups come back with the rest in "other". group_by field: is also how you learn what a field holds before filtering on it: the buckets are its distinct values, and a field in filter then selects up to 20 of them. A count that runs out of time returns what it reached with exact false: say so rather than presenting it as the whole number, and narrow the date range for an exact one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Any field contains this text, matched literally and without case. Use it first when you do not know which field holds the text. On some forms it covers only the fields recent submissions carry, so reach an older field by name with a field filter. | |
| read | No | ||
| field | No | Up to 5 filters keyed by field name, spelled the way the submissions spell it. Each is an object with one of eq, contains, starts_with, exists or in. Several filters combine with AND. Example: {"email": {"contains": "@example.com"}, "plan": {"in": ["pro", "team"]}}. | |
| status | No | inbox | |
| country | No | Two-letter uppercase country code. For several, separate them with commas, such as "DE,AT,CH". Max 20. | |
| form_id | Yes | Form id, a short string such as "AbC123xyz" (from list_forms). | |
| group_by | No | day, week, month, country, spam, read, or field:<name> using a name the submissions carry. Leave it out for the total alone. | |
| created_after | No | RFC 3339 date or time, inclusive. | |
| created_before | No | RFC 3339 date or time, exclusive. | |
| has_attachments | No |