---
title: "Modify billing plan"
method: PATCH
path: "/_api/plan/{name}"
tags: ["Administration"]
---

# Modify billing plan

`PATCH /_api/plan/{name}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/plan/:name/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update the billing plan.

## Path parameters

- `name` string, string, required

## Request body

- PlanModify
  - `name` string: Name and unique identifier of the of the billing plan.
  - `planId` string: ID of the billing plan.
  - `description` string: Description of the billing plan.
  - `featureGates` string[]: List of the billing plan feature gates.
  - `attribution` string: Attribution of the billing plan. Combination of attribution and label must be unique for the plan.
  - `label` string: Display label of the billing plan. Combination of attribution and label must be unique for the plan.
  - `pricing` string: Pricing details of the billing plan.
  - `isBundle` boolean: Bundle.
  - `metadata` object: Metadata of the plan, having set of key-value pairs.
  - `metrics` PlanMetricsExample[]: List of metrics applicable for billing plan.
    - `name` string: Name of the metrics. e.g. reads, writes etc.
    - `value` string: Value of the metrics. e.g. c8db_service_read_requests_count, c8db_service_write_requests_count etc.
    - `metricType` string: Name of the metrics. e.g. counter, gauge, histogram.
  - `active` boolean: A mandatory flag that specifies whether the billing plan is active.
  - `demo` boolean: An flag that specifies whether the billing plan is demo or not.

## Response `200`

Successfully updated billing plan data.

- PlanModify
  - `name` string: Name and unique identifier of the of the billing plan.
  - `planId` string: ID of the billing plan.
  - `description` string: Description of the billing plan.
  - `featureGates` string[]: List of the billing plan feature gates.
  - `attribution` string: Attribution of the billing plan. Combination of attribution and label must be unique for the plan.
  - `label` string: Display label of the billing plan. Combination of attribution and label must be unique for the plan.
  - `pricing` string: Pricing details of the billing plan.
  - `isBundle` boolean: Bundle.
  - `metadata` object: Metadata of the plan, having set of key-value pairs.
  - `metrics` PlanMetricsExample[]: List of metrics applicable for billing plan.
    - `name` string: Name of the metrics. e.g. reads, writes etc.
    - `value` string: Value of the metrics. e.g. c8db_service_read_requests_count, c8db_service_write_requests_count etc.
    - `metricType` string: Name of the metrics. e.g. counter, gauge, histogram.
  - `active` boolean: A mandatory flag that specifies whether the billing plan is active.
  - `demo` boolean: An flag that specifies whether the billing plan is demo or not.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified billing plan.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
