---
title: "Create price unit"
method: POST
path: "/prices/units"
tags: ["Price Units"]
---

# Create price unit

`POST /prices/units`

Use when defining a new unit of measure for pricing (e.g. GB, API call, seat). Ideal for metered or usage-based prices.

## Request body

- CreatePriceUnitRequest
  - `base_currency` string, required — base_currency is the currency that the price unit is based on
  - `code` string, required
  - `conversion_rate` string, required — ConversionRate defines the exchange rate from this price unit to the base currency. This rate is used to convert amounts in the custom price unit to the base currency for storage and billing. Conversion formula: price_unit_amount * conversion_rate = base_currency_amount Example: If conversion_rate = "0.01" and base_currency = "usd": 100 price_unit tokens * 0.01 = 1.00 USD Note: Rounding precision is determined by the base currency (e.g., USD uses 2 decimal places, JPY uses 0).
  - `metadata` TypesMetadata
  - `name` string, required
  - `symbol` string, required

## Response `201`

Created

- CreatePriceUnitResponse
  - `base_currency` string
  - `code` string
  - `conversion_rate` string
  - `created_at` string, date-time
  - `created_by` string
  - `environment_id` string
  - `id` string
  - `metadata` TypesMetadata
  - `name` string
  - `status` 'published' | 'deleted' | 'archived'
  - `symbol` string
  - `tenant_id` string
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

## Changes

- **2026-07-15** `f8ecf435d25d` — 2 warning
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
- **2026-07-09** `7d57386313c7` — 3 breaking, 3 warning
  - the `metadata` request property type changed from no type to `object`
  - the `metadata` response's property type changed from no type to `object` for status `201`
  - the `status` response's property type changed from no type to `string` for status `201`
  - added the new `archived` enum value to the `status` response property for the response status `201`
  - …2 more
- **2026-07-09** `4b1a811c4179` — 5 breaking, 3 info
  - the `metadata` request property type changed from `object` to no type
  - the `created_at` response's property format changed from `date-time` to no format for status `201`
  - the `metadata` response's property type changed from `object` to no type for status `201`
  - the `status` response's property type changed from `string` to no type for status `201`
  - …4 more
- …earlier changes not shown

[Full history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/prices/units/post.md)

---

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