Skip to main content
POST
Batch analytics metrics

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

id
integer
required

The numeric ID of the account

Body

application/json
metrics
object[]
required

Unique metric ids, 1–25 entries. Shared malformed fields fail the whole request; metric-specific errors affect that entry only.

Required array length: 1 - 25 elements
since
string<date>

Inclusive start date; default is 29 days before until.

until
string<date>

Inclusive last date; defaults to today in timezone. Maximum range 366 days and 800 buckets.

granularity
enum<string>

Must be supported by each metric; defaults to day if supported, otherwise its first grain.

Available options:
hour,
day,
week,
month
timezone
string

IANA time zone; default UTC.

business_hours
boolean

Legacy basis flag, mutually exclusive with hours.

hours
enum<string>

Hours basis; business/off require analytics_business_hours. Mutually exclusive with business_hours.

Available options:
all,
business,
off
compare
boolean

Include aligned prior-window comparisons when supported.

topic_mentions
enum<string>

Count main topic only (default) or all topic mentions.

Available options:
main,
all

Response

Success.

metrics
object
required

One entry keyed by each requested id, including unknown ids. Successful, pending and failed entries may coexist.