Skip to content

Rest API

Get audience sessions per day

GET
/api/v1/insights/audiences/per-day

How many sessions one audience matched per day on one domain, split by new and returning visitors. Both audienceId and domainName are required - there is no unfiltered variant.

x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

startTime
required
string format: date

First day of the range, inclusive, as YYYY-MM-DD.

endTime
required
string format: date

Last day of the range, inclusive, as YYYY-MM-DD.

forceRefresh
boolean

Recompute instead of reading the query cache. Slow - only worth it when you know the cache is stale.

audienceId
required
string

The audience to count sessions for.

domainName
required
string

The domain to count sessions for.

One entry per day in the range.

object
status
string
lastUpdate
number
days
Array<object>
object
day
string
new
object
sessions
number
name

Name of the audience the sessions matched.

string
isReturning
object
sessions
number
name

Name of the audience the sessions matched.

string

Unauthorized - invalid API key.

StartTime or endTime was missing.