---
title: "Update aggregator"
method: PUT
path: "/v1/aggregators/{id}"
tags: ["Aggregators"]
---

# Update aggregator

`PUT /v1/aggregators/{id}`

Update the details of an existing aggregator.

## Path parameters

- `id` string, required

## Request body

- UpdateAggregator
  - `entity` string — The billable event entity to aggregate.
  - `type` 'metered' | 'licensed' — The type of aggregator.
  - `where` object, nullable — Filter conditions for the aggregation.
    - `conditional` 'and' | 'or', required
    - `fields` union[], required
      - union
        - object
          - `property` string, required
          - `operator` 'isNull' | 'isNotNull', required
        - object
          - `property` string, required
          - `operator` 'in' | 'notIn', required
          - `value` string, required
        - object
          - `property` string, required
          - `operator` 'gte' | 'gt' | 'lt' | 'lte', required
          - `value` number, required
        - object
          - `property` string, required
          - `operator` 'equals' | 'notEqual', required
          - `value` union, required
            - string
            - number
            - boolean
  - `name` string — Name of the aggregator.
  - `description` string, nullable — Description of the aggregator.
  - `allow_negative_values` boolean — Whether the aggregator can produce negative values.
  - `aggregate_on_customers_enabled` boolean — 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, nullable — Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.
  - `default_interval_count` integer — Default interval count for usage periods.
  - `default_interval_period` 'days' | 'weeks' | 'months' | 'years' — Default interval period for usage periods.
  - `thresholds` object[] — Thresholds for the aggregator. Replaces existing thresholds.
    - `id` string — Threshold ID. Required when updating an existing threshold.
    - `name` string — Name of the threshold.
    - `threshold_value` number, required — The threshold value.
    - `comparison_operator` 'gte' | 'lte' — The comparison operator for the threshold.
  - `formula_sql` string — Read-only formula expression; not accepted on public writes.
  - `operation` 'count' | 'sum' — The aggregation operation to perform.
  - `property` string — The property to sum. Required when operation is 'sum'.

## Other responses

- `404` — Aggregator not found

---

[API](https://skmtc.dev/hyperline/apis/hyperline-api.md) · [All operations](https://skmtc.dev/hyperline/apis/hyperline-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperline/hyperline-api/revisions/19fa5f22e39b/schema)
