---
title: "Create a rate card."
method: POST
path: "/v2/rate-cards"
tags: ["Rate Cards"]
---

# Create a rate card.

`POST /v2/rate-cards`

## Request body

- RateCardRequest — Create a rate card and its rating rules in one request. Use a single rate for simple usage billing, or multiple rates with the same invoice_group_key when several Engine facts should roll up into one invoice line.
  - `name` string, required
  - `description` string, nullable
  - `currency_code` string, required
  - `metadata` unknown
  - `rates` RateCardRateRequest[], required — Rules that turn usage or grant facts into billable invoice amounts.
    - `source` 'metric_units' | 'grants', required — LedgerUp Engine source used by a rate card rate.
    - `source_id` string, required — LedgerUp resource identifier.
    - `billing_mode` 'flat' | 'per_unit' | 'per_seat' | 'usage_sum' | 'last_metric_reported' | 'tiered_usage' | 'package' | 'minimum_commit', required — How a price or rate converts a contract line into invoice amount.
    - `aggregation` 'sum' | 'count' | 'latest' | 'max' | 'min', required — Aggregation applied to source facts in the invoice period.
    - `source_unit` string, nullable — Unit reported by the source facts, such as characters, seconds, calls, or dollars.
    - `billing_unit` string, nullable — Unit produced by conversion and shown for billing, such as million_characters, credits, seats, or hours.
    - `conversion_mode` 'identity' | 'scale' | 'multiply' — How a source quantity is converted into the billing unit before pricing.
    - `invoice_group_key` string, nullable — Rates with the same key can contribute to a single invoice preview line after conversion to a shared billing_unit.
    - `unit_amount_minor_units` integer, nullable
    - `unit_scale` string, nullable
    - `package_size` string, nullable
    - `included_quantity` string, nullable
    - `minimum_amount_minor_units` integer, nullable
    - `commit_quantity` string, nullable
    - `commit_amount_minor_units` integer, nullable
    - `markup_percent` string, nullable
    - `tiers` RateTier[], nullable
      - `up_to` string, nullable, required — Exclusive upper bound. Null means infinity.
      - `unit_amount_minor_units` integer, required
      - `flat_amount_minor_units` integer, nullable, required
    - `metadata` unknown

## Response `200`

Success.

- RateCard — A reusable usage rating policy for contract lines.
  - `id` string, required — LedgerUp resource identifier.
  - `name` string, required
  - `description` string, nullable, required
  - `currency_code` string, required
  - `metadata` unknown, required
  - `created_at` integer, required — Unix timestamp in seconds.
  - `updated_at` integer, required — Unix timestamp in seconds.
  - `archived_at` integer, required — Unix timestamp in seconds.
  - `rates` RateCardRate[], required — Rating rules attached to this rate card.
    - `id` string, required — LedgerUp resource identifier.
    - `source` 'metric_units' | 'grants', required — LedgerUp Engine source used by a rate card rate.
    - `source_id` string, required — LedgerUp resource identifier.
    - `billing_mode` 'flat' | 'per_unit' | 'per_seat' | 'usage_sum' | 'last_metric_reported' | 'tiered_usage' | 'package' | 'minimum_commit', required — How a price or rate converts a contract line into invoice amount.
    - `aggregation` 'sum' | 'count' | 'latest' | 'max' | 'min', required — Aggregation applied to source facts in the invoice period.
    - `source_unit` string, nullable, required — Unit reported by the source facts, such as characters, seconds, calls, or dollars.
    - `billing_unit` string, nullable, required — Unit produced by conversion and shown for billing, such as million_characters, credits, seats, or hours.
    - `conversion_mode` 'identity' | 'scale' | 'multiply', required — How a source quantity is converted into the billing unit before pricing.
    - `invoice_group_key` string, nullable, required — Rates with the same key can contribute to a single invoice preview line after conversion to a shared billing_unit.
    - `unit_amount_minor_units` integer, nullable, required
    - `unit_scale` string, nullable, required
    - `package_size` string, nullable, required
    - `included_quantity` string, nullable, required
    - `minimum_amount_minor_units` integer, nullable, required
    - `commit_quantity` string, nullable, required
    - `commit_amount_minor_units` integer, nullable, required
    - `markup_percent` string, nullable, required
    - `tiers` RateTier[], required
      - `up_to` string, nullable, required — Exclusive upper bound. Null means infinity.
      - `unit_amount_minor_units` integer, required
      - `flat_amount_minor_units` integer, nullable, required
    - `metadata` unknown, required
    - `created_at` integer, required — Unix timestamp in seconds.
    - `updated_at` integer, required — Unix timestamp in seconds.
    - `archived_at` integer, required — Unix timestamp in seconds.

## Other responses

- `400` — Bad request, invalid header, invalid amount/quantity/currency, or text validation failure.
- `401` — Missing or invalid API key.
- `403` — API key lacks the required permission, or reset was attempted outside the test namespace.
- `408` — Request exceeded the 30 second timeout.
- `413` — Request body exceeded the 256 KiB limit.
- `415` — Write request content type was not application/json.
- `422` — Semantically invalid request, such as a service period with start greater than end.
- `429` — Rate limit exceeded.
- `500` — Internal server error or queue failure.

---

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