---
title: "Update tenant billing plan"
method: POST
path: "/_api/plan/update"
tags: ["Administration"]
---

# Update tenant billing plan

`POST /_api/plan/update`

## 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/update/post.ts> (a function with typed inputs; its response is checked against the schema)

Update the billing plan for a tenant.

**Note**: If tenant name is not specified, the tenant invoking the API is used to update billing plan.

## Request body

- UpdateTenantPlan
  - `attribution` string, required: Attribution of the billing plan.
  - `plan` string, required: Name of the billing plan.
  - `tenant` string: Name of the tenant.
  - `payment_method_id` string: ID of Stripe payment method.

## Response `200`

Successfully updated billing plan.

- TenantUpdatePlanExampleRc200
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `result` object: The information about what are the new attribution, billing plan and features attributes for tenant after billing plan is updated.
    - `attribution` string: Attribution of the tenant.
    - `plan` string, string: Name of the billing plan.
    - `features` FeaturesListWithAvailabilityFlagExample[]: List of features with boolean value indicating that those features are enabled or not.
      - `CEP` boolean: Name of the CEP feature.
      - `DOCS` boolean: Name of the Docs feature.
      - `DYNAMO` boolean: Name of the Dynamo feature.
      - `REDIS` boolean: Name of the Redis feature.
      - `GEO_FABRICS` boolean: Name of the Geo Fabrics feature.
      - `GRAPHS` boolean: Name of the Graphs feature.
      - `KV` boolean: Name of the KV feature.
      - `LOCAL_COLLECTIONS` boolean: Name of the Local Collections feature.
      - `STREAMS` boolean: Name of the streams feature.
      - `USERS` boolean: Name of the Users feature.
      - `EVENT_HUB` boolean: Name of the EventHub feature.

## 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)
