---
title: "Create cost basis"
method: POST
path: "/openmeter/currencies/custom/{currencyId}/cost-bases"
tags: ["OpenMeter Currencies"]
---

# Create cost basis

`POST /openmeter/currencies/custom/{currencyId}/cost-bases`

Create a cost basis for a currency.

## Path parameters

- `currencyId` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).

## Request body

- CreateCostBasisRequest — CostBasis create request.
  - `fiat_code` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `rate` string, required — Numeric represents an arbitrary precision number.
  - `effective_from` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `effective_to` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

## Response `201`

CostBasis created response.

- BillingCostBasis — Describes currency basis supported by billing system.
  - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
  - `fiat_code` string, required — Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
  - `rate` string, required — Numeric represents an arbitrary precision number.
  - `effective_from` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `effective_to` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/revisions/327f2080730f/schema)
