Create billing rule

Create a new billing rule in the Billing Rules Engine. Billing rules apply rule-based logic to cloud billing data to support chargeback, showback, cost redistribution, and internal billing workflows.

Use filters to define which cost line items the rule applies to. startTime is required; omit endTime for an open-ended rule.

Rule types:

  • ADJUST_TO_LIST — Normalize billing amounts to list prices. Optionally apply a percentage offset (positive for markup, negative for discount).
  • APPLY_MARGIN — Apply a percentage margin to matching costs.
  • BACKOUT_LINE_ITEM — Exclude specific line items from downstream billing views and reports.
  • REALLOCATE_COSTS — Redistribute costs from a source scope to one or more targets.
  • RERATE — Adjust billing amounts by applying a percentage offset to existing costs or credits.

Each rule type requires a different meta shape. New rules are created in PROCESSING status while an asynchronous workflow validates and applies them; the rule transitions to ACTIVE on success or FAILED_PROCESSING on failure. Use the update endpoint to transition a rule to INACTIVE or DRAFT after creation.

Returns the ruleID of the newly created rule. See Billing Rules Engine for detailed configuration guidance.

Body Params

Normalize billing amounts to list prices, removing negotiated discounts. Optionally filter to specific line items.

string
enum
required
Allowed:
meta
object
required
uuid
required

Unique tenant ID

boolean

When true, the rule applies to all tenants in the organization and applyToTenantIDs must be empty. When false, applyToTenantIDs must contain at least one tenant ID.

applyToTenantIDs
array of uuids

List of tenant IDs the rule applies to. Required and non-empty when applyToAllTenants is false; must be empty when applyToAllTenants is true.

applyToTenantIDs
string
required
length ≥ 1

Rule name

date-time
required

Rule start time

date-time

Rule end time

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json