POST /v1/billing/meters

Creates a billing meter.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
customer_mapping Object No

Fields that specify how to map a meter event to a customer.

customer_mapping.event_payload_key String Yes
customer_mapping.type String Yes

Possible values:

  • "by_id"
default_aggregation Object Yes

The default settings to aggregate a meter's events with.

default_aggregation.formula String Yes

Possible values:

  • "count"
  • "sum"
  • "last"
expand[] Array No

Specifies which fields in the response should be expanded.

display_name String Yes

The meter’s name. Not visible to the customer.

event_name String Yes

The name of the meter event to record usage for. Corresponds with the event_name field on meter events.

event_time_window String No

The time window to pre-aggregate meter events for, if any.

Possible values:

  • "day"
  • "hour"
value_settings Object No

Fields that specify how to calculate a meter event's value.

value_settings.event_payload_key String Yes

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.