---
title: "Modify Tenant"
method: PATCH
path: "/_api/tenant/{tenant}"
tags: ["Administration"]
---

# Modify Tenant

`PATCH /_api/tenant/{tenant}`

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

Update a tenant.

**Note**: Requires *administrator* permissions.

## Path parameters

- `tenant` string, string, required

## Request body

- TenantModify
  - `active` boolean: *True* if the tenant is active.
  - `status` string: Status of the tenant. Possible values: **active | expired | delinquent | inactive**
  - `displayName` string: Name of the tenant.
  - `metadata` object: Object with metadata key-value pairs.

## Response `200`

Successfully updated tenant.

- TenantModifyExampleRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `result` TenantModifyResultValue[]: Attributes of tenant after patch operation.
    - `tenant` string: Name of the tenant.
    - `active` boolean: Active state of tenant.
    - `status` string, string: Availability of tenant.
    - `metadata` object: Object with metadata key-value pairs.

## 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 tenant.

---

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