---
title: "Update User Plan"
method: PUT
path: "/api/admin/users/{user_id}/plan"
tags: ["admin"]
---

# Update User Plan

`PUT /api/admin/users/{user_id}/plan`

Change a user's plan and re-cap their active month's quota row.

Without the quota-row update, a mid-month flip would not take effect
until the next calendar reset because ``UsageQuota`` captures limits
at row creation. ``messages_used`` / ``tokens_used`` carry over so a
user partway through their old cap does not get a free reset.

## Path parameters

- `user_id` string, required

## Request body

- AdminUserPlanUpdate — Set a user's subscription plan. Must be a key in ``billing.plans.PLANS``.
  - `plan` string, required

## Response `200`

Successful Response

- AdminUserPlanResponse — Resulting plan plus the active month's caps after the change.
  - `user_id` string, required
  - `plan` string, required
  - `messages_limit` integer, required
  - `tokens_limit` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/clawbolt.md) · [All operations](https://skmtc.net/mozilla-ai/apis/clawbolt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/clawbolt/revisions/0e52fe5f8d33/schema)
