GET
/
v1
/
analytics.getVerifications

To use this endpoint, your root key must have the api.*.read_api permission.

Retrieve usage data from unkey to power your dashboards, reports or usage-based billing.

Changelog

DateChanges
Jan 01 2025Introduced endpoint

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

apiId
string
required

Select the API. Only keys belonging to this API will be included.

externalId
string

Filtering by externalId allows you to narrow down the search to a specific user or organisation.

keyId

Only include data for a specific key or keys.

    When you are providing zero or more than one key ids, all usage counts are aggregated and summed up. Send multiple requests with one keyId each if you need counts per key.
tag

Only include data for a specific tag or tags.

    When you are providing zero or more than onetag, all usage counts are aggregated and summed up. Send multiple requests with one tag each if you need counts per tag.
start
integer | null

The start of the period to fetch usage for as unix milliseconds timestamp. To understand how the start filter works, let's look at an example:

    You specify a timestamp of 5 minutes past 9 am.
    Your timestamp gets truncated to the start of the hour and then applied as filter.
    We will include data `where time >= 9 am`

    
end
integer | null
default:
1736773056026

The end of the period to fetch usage for as unix milliseconds timestamp. To understand how the end filter works, let's look at an example:

      You specify a timestamp of 5 minutes past 9 am.
      Your timestamp gets truncated to the start of the hour and then applied as filter.
      We will include data `where time <= 10 am`
      
groupBy

By default, datapoints are not aggregated, however you probably want to get a breakdown per time, key or identity.

      Grouping by tags and by tag is mutually exclusive.
Available options:
key,
identity,
tags,
tag,
month,
day,
hour
limit
integer

Limit the number of returned datapoints. This may become useful for querying the top 10 identities based on usage.

Required range: x > 1
orderBy
enum<string>

Sort the output by a specific value. You can use this in combination with the order param.

Available options:
time,
valid,
notFound,
forbidden,
usageExceeded,
rateLimited,
unauthorized,
disabled,
insufficientPermissions,
expired,
total
order
enum<string>
default:
asc

Define the order of sorting. Use this in combination with orderBy

Available options:
asc,
desc

Response

200 - application/json
total
integer
required

Total number of verifications in the current time slice, regardless of outcome.

disabled
integer
expired
integer
forbidden
integer
identity
object
            Only available when specifying groupBy=identity in the query.
            In this case there would be one datapoint per time and groupBy target.
insufficientPermissions
integer
keyId
string
            Only available when specifying groupBy=key in the query.
            In this case there would be one datapoint per time and groupBy target.
notFound
integer
rateLimited
integer
tag
string

Only available when grouping by tag.

tags
string[]

Filter by one or multiple tags. If multiple tags are provided

time
integer

Unix timestamp in milliseconds of the start of the current time slice.

unauthorized
integer
usageExceeded
integer
valid
integer