Skip to main content
PUT
Update aggregator

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

application/json
entity
string

The billable event entity to aggregate.

Example:

"api_calls"

type
enum<string>
default:metered

The type of aggregator.

Available options:
metered,
licensed
where
object | null

Filter conditions for the aggregation.

name
string

Name of the aggregator.

description
string | null

Description of the aggregator.

allow_negative_values
boolean
default:false

Whether the aggregator can produce negative values.

aggregate_on_customers_enabled
boolean
default:false

Whether the aggregator should aggregate on customers.

custom_event_name
string

Custom event name for the aggregator.

exposed_event_keys
string[]

Event keys exposed by the aggregator.

unit_name
string | null

Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.

Example:

"user"

default_interval_count
integer

Default interval count for usage periods.

default_interval_period
enum<string>

Default interval period for usage periods.

Available options:
days,
weeks,
months,
years
thresholds
object[]

Thresholds for the aggregator. Replaces existing thresholds.

formula_sql
string
deprecated

Read-only formula expression; not accepted on public writes.

operation
enum<string>

The aggregation operation to perform.

Available options:
count,
sum
property
string

The property to sum. Required when operation is 'sum'.

Response

id
string
required
entity
string
required
operation
enum<string>
required
Available options:
count,
sum,
sql_formula
property
string | null
required
where
object | null
required
type
enum<string>
required
Available options:
metered,
licensed
name
string | null
required
description
string | null
required
allow_negative_values
boolean
required
aggregate_on_customers_enabled
boolean
required
default_interval_count
integer | null
required
default_interval_period
enum<string> | null
required
Available options:
days,
weeks,
months,
years
custom_event_name
string | null
required
exposed_event_keys
string[]
required
unit_name
string | null
required
thresholds
object[]
required
created_at
string<date>
required
updated_at
string<date>
required
formula_sql
string | null