---
title: "Edit Enterprise"
method: PATCH
path: "/api/admin/workspaces/{tenant_id}/enterprise"
tags: ["admin"]
---

# Edit Enterprise

`PATCH /api/admin/workspaces/{tenant_id}/enterprise`

## Request

- Base URL: `https://api.heymetra.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.heymetra.com/api/admin/workspaces/{tenant_id}/enterprise`
- Auth: none declared

Change what an existing enterprise workspace gets (ZEISO-280).

The only enterprise action used to be "set a NEW plan", so changing one
ceiling on a workspace already on enterprise meant re-granting the whole
thing — and ``grant_enterprise`` demands a period end, resets the billing
period and clears a scheduled cancellation. A superadmin adding a seat was
moving a renewal date.

The body is the create path's own model (``EnterpriseLimitsIn``), so there
is one place the bounds are written. Refused with 409 for a workspace on a
self-serve tier: those limits come from the catalogue.

Recorded in ``admin_audit_log`` with both sides of every ceiling it moved
(ZEISO-302). The note that used to stand here said there was no admin audit
table and that a ``logger.info`` was the whole trail; there is one now, and
the log line is kept only as operator-visible noise beside it.

## Path parameters

- `tenant_id` string, uuid, required

## Headers

- `authorization` string, nullable
- `x-workspace-id` string, nullable

## Request body

- EnterpriseLimitsIn: What a bespoke enterprise plan grants, and what it costs. The one declaration of these four values and their bounds. ZEISO-280 added an edit path beside the create path, and a second copy of ``ge=0`` would have been a rule that drifts — the create path would keep refusing a negative seat count and the edit path would quietly stop. Both bodies below inherit it, and ``tests/test_enterprise_edit.py`` fails if either stops.
  - `connector_limit` integer, required
  - `account_limit` integer, required
  - `seat_limit` integer, required
  - `monthly_price_usd` union, required
    - number
    - string

## Response `200`

Successful Response

- WorkspaceRow
  - `tenant_id` string, uuid, required
  - `name` string, required
  - `plan` 'starter' | 'pro' | 'superior' | 'enterprise', required
  - `subscription_status` 'none' | 'active' | 'past_due' | 'canceled' | 'trialing' | 'trial_ended', required
  - `billing_interval` 'monthly' | 'annual', required
  - `current_period_start` string, date-time, nullable, required
  - `current_period_end` string, date-time, nullable, required
  - `members` integer, required
  - `connections` integer, required
  - `monthly_price_usd` number, required
  - `connector_limit` integer, required
  - `account_limit` integer, required
  - `seat_limit` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/heymetra/apis/heymetra-api.md) · [All operations](https://skmtc.dev/heymetra/apis/heymetra-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heymetra/apis/heymetra-api/revisions/877b0f87d6d0?raw)
