---
title: "Create Rule Set"
method: POST
path: "/billing/rule-set/create"
tags: ["provider", "billing"]
---

# Create Rule Set

`POST /billing/rule-set/create`

## Headers

- `TENANT` string, required
- `API-KEY` string, required

## Request body

- RuleSetCreate
  - `name` string, required — Name of the rule set to be created.
  - `description` string, nullable — Optional description of the rule set to be created.
  - `rules` RuleCreateWithoutId[] — List of rules to be created.
    - `name` string, required — Name of the rule.
    - `delayInDays` integer, required — Number of days to delay before applying the rule.
    - `amountLessThan` integer, nullable — Upper bound for the amount, exclusive.
    - `amountGreaterThan` integer, nullable — Lower bound for the amount, exclusive.
    - `lessThanOrEqualTo` integer, nullable — Upper bound for the amount, inclusive.
    - `methods` InvoiceMethod[], required — Communication methods to be used for this rule.
    - `message` string, nullable — Message to be sent when applying this rule, must contain the {url} and {first_name} placeholders.

## Response `200`

Successful Response

- RuleSetSummary
  - `id` string, required — Unique identifier for the rule set.
  - `name` string, required — Name of the rule set.
  - `description` string, nullable — Optional description of the rule set.
  - `rules` RuleSummary[] — List of rules contained in this rule set.
    - `id` string, required — Unique identifier for the rule.
    - `name` string, required — Name of the rule.
    - `delayInDays` integer, required — Number of days to delay before applying the rule.
    - `ruleSetId` string, required — Identifier of the rule set this rule belongs to.
    - `amountLessThan` integer, nullable — Upper bound for the amount, exclusive.
    - `amountGreaterThan` integer, nullable — Lower bound for the amount, exclusive.
    - `lessThanOrEqualTo` integer, nullable — Upper bound for the amount, inclusive.
    - `methods` InvoiceMethod[], required — Communication methods to be used for this rule.
    - `message` string, nullable — Message to be sent when applying this rule.

## Other responses

- `422` — Validation Error

---

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