Skip to content

Create Statistics Report

Tool name: create-statistics-report

Creates a statistics report (Analytics Reports in the app): a chart of how many contacts got the given tags per period. The tags must exist in the account; contacts are not changed. Read its numbers with get-statistics-report, change it with update-statistics-report.

Input schema

namestring, [ 1 .. 250 ] charactersrequired

Name of the report in KlickTipp

tagIdsArray of integers, non-emptyrequired

IDs of the tags the report counts, from search-tags; a repeated ID is stored once

chartnull or string

progress (taggings per period), continuous (running total) or total (one bar per tag); omit for progress

Default:null
Enum:"progress""continuous""total"
granularitynull or string

hour, day, month or year; omit for day

Default:null
Enum:"hour""day""month""year"
rangeFromnull or string^(\d{4}-\d{2}-\d{2}|0)$

First day of the range as a calendar date YYYY-MM-DD, not after rangeTo, or 0 for no start

Default:null
rangeTonull or string^(\d{4}-\d{2}-\d{2}|0)$

Last day of the range as a calendar date YYYY-MM-DD, not before rangeFrom, or 0 for today

Default:null
metaLabelsArray of strings

Labels of the report

Default:null
notesnull or string, <= 1000 characters

Internal note

Default:null
accountIdnull or integer, >= 1

User ID of the account; omit for the account of the access token

Default:null
Input example
{ "name": "string", "tagIds": [ 1 ], "chart": "progress", "granularity": "hour", "rangeFrom": null, "rangeTo": null, "metaLabels": null, "notes": null, "accountId": null }

Output schema

accountIdintegerrequired
typestringrequired
idintegerrequired
settingsobjectrequired
uiobjectrequired
Output example
{ "accountId": 0, "type": "string", "id": 0, "settings": {}, "ui": {} }