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

# Create cost basis

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

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/openmeter/currencies/custom/{currencyId}/cost-bases`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

**Pre-release Endpoint**
This endpoint is currently in beta and is subject to change.

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: The fiat currency code for the cost basis.
  - `rate` string, required: The cost rate for the currency.
  - `effective_from` string, date-time: An ISO-8601 timestamp representation of the date from which the cost basis is effective. If not provided, it will be effective immediately and will be set to `now` by the system.
  - `effective_to` string, date-time: An ISO-8601 timestamp representation of the date until which the cost basis is effective. If provided, it must be later than `effective_from`. If not provided, it remains effective until superseded.

## 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: The fiat currency code for the cost basis.
  - `rate` string, required: The cost rate for the currency.
  - `effective_from` string, date-time: An ISO-8601 timestamp representation of the date from which the cost basis is effective. If not provided, it will be effective immediately and will be set to `now` by the system.
  - `effective_to` string, date-time: An ISO-8601 timestamp representation of the date until which the cost basis is effective. If provided, it must be later than `effective_from`. If not provided, it remains effective until superseded.
  - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.

## Other responses

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

## Changes

- **2026-10-15** `7aab863a6daa`: 1 breaking, 2 warning
  - added `#/components/schemas/InvalidParameterMinimumTime, #/components/schemas/InvalidParameterMaximumTime` to the `invalid_parameters/items/` response property `oneOf` list for the response status `400`
  - added the new `key_invalid` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
  - added the new `unique` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2026-10-07** `59663dd13a10`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v3/openmeter/currencies/custom/:currencyId/cost-bases/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
