---
title: "Detach the negotiated package and put the workspace back on the fleet default"
method: POST
path: "/v1/admin/tenants/{tenant_id}/subscription-package/revert"
tags: ["admin"]
---

# Detach the negotiated package and put the workspace back on the fleet default

`POST /v1/admin/tenants/{tenant_id}/subscription-package/revert`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/admin/tenants/{tenant_id}/subscription-package/revert`
- Auth: HTTP bearer

Platform-admin only. Detaches any attached price and resets the allocation to the fleet default FIRST, then cancels the subscription actually billing on it, if any — so a losing compare-and-set never leaves a canceled subscription behind. Safe to run twice.

## Path parameters

- `tenant_id` string, uuid, required

## Request body

- AdminSubscriptionPackageRevert: POST body: why this negotiated deal is ending.
  - `reason` string, required: Why this deal is ending.

## Response `200`

Successful Response

- AdminSubscriptionPackageRevertResult: What reverting to the default package just did, plus the package's new readout.
  - `canceled_stripe_subscription_id` string, nullable: The subscription canceled, or null if nothing billed the attached price.
  - `package` AdminSubscriptionPackageView, required: The staff readout for a tenant's negotiated package.
    - `tenant_id` string, uuid, required
    - `monthly_credit_grant` integer, nullable, required: This tenant's own LIVE allocation, or null when the workspace has no subscription row yet.
    - `default_monthly_credit_grant` integer, required: The fleet default an unset workspace runs on.
    - `stripe_customer_id` string, nullable: This workspace's cus_… id, or null.
    - `stripe_subscription_id` string, nullable: The synced sub_… id, or null.
    - `cancelable_stripe_subscription_id` string, nullable: The sub_… a revert would cancel, or null when nothing bills the attached price.
    - `tier` string, nullable: The tier Stripe last synced onto this row.
    - `status` string, nullable: The subscription status Stripe last synced.
    - `current_period_end` string, date-time, nullable: The synced current period end.
    - `last_grant_at` string, date-time, nullable: When the monthly sweep last granted this row.
    - `negotiated_stripe_price_id` string, nullable: The attached negotiated price, or null.
    - `negotiated_monthly_price_cents` integer, nullable: Stripe's amount for that price.
    - `negotiated_monthly_credit_grant` integer, nullable: The negotiated allocation; promoted into monthly_credit_grant once synced.
    - `has_attached_package` boolean, required: Whether a negotiated price is attached — an offer, not a sale.
    - `on_negotiated_package` boolean, required: Whether the workspace is actually billing on it right now.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `409`: Conflict
- `422`: Validation error
- `503`: Billing is not configured on this deployment.

---

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