---
title: "Upsert tax code"
method: PUT
path: "/openmeter/tax-codes/{taxCodeId}"
tags: ["OpenMeter Tax"]
---

# Upsert tax code

`PUT /openmeter/tax-codes/{taxCodeId}`

## Path parameters

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

## Request body

- UpsertTaxCodeRequest — TaxCode upsert request.
  - `name` string, required — Display name of the resource. Between 1 and 256 characters.
  - `description` string — Optional description of the resource. Maximum 1024 characters.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `app_mappings` BillingTaxCodeAppMapping[], required — Mapping of app types to tax codes.
    - `app_type` 'sandbox' | 'stripe' | 'external_invoicing', required — The type of the app.
    - `tax_code` string, required — Tax code.

## Response `200`

TaxCode upsert response.

- BillingTaxCode — Tax codes by provider.
  - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
  - `name` string, required — Display name of the resource. Between 1 and 256 characters.
  - `description` string — Optional description of the resource. Maximum 1024 characters.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `updated_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `deleted_at` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `key` string, required — A key is a unique string that is used to identify a resource.
  - `app_mappings` BillingTaxCodeAppMapping[], required — Mapping of app types to tax codes.
    - `app_type` 'sandbox' | 'stripe' | 'external_invoicing', required — The type of the app.
    - `tax_code` string, required — Tax code.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `410` — Gone

---

[API](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-and-konnect-metering-billing-api/versions/9bca44e2d61d/schema)
