---
title: "Set a user plan"
method: PUT
path: "/billing/v1/ai-models-included/users/{userId}/plan"
tags: ["Users"]
---

# Set a user plan

`PUT /billing/v1/ai-models-included/users/{userId}/plan`

## Request

- Base URL: `https://api.langdock.com`
- URL: `https://api.langdock.com/billing/v1/ai-models-included/users/{userId}/plan`
- Auth: HTTP bearer

Setting the current plan is a no-op. Upgrading resolves the associated pending usage request. May add paid seats; subscription synchronization follows the saved seat change. extraUsagePeriodSpend is null in the response.

## Request body

- IncludedPlanPut
  - `plan` 'business' | 'business_max', required

## Response `200`

Updated resource. Spending is null; GET retrieves spending.

- IncludedUser: EUR. Explicit user caps override plan/group defaults. With inherit, the highest plan/group value applies. Workspace disable overrides effective limits to zero. Spend is null when private and always null in mutation responses.
  - `id` string, uuid, required
  - `email` string, email: Present only when the key also has the USER_MANAGEMENT_API scope.
  - `name` string, nullable: Present only when the key also has the USER_MANAGEMENT_API scope.
  - `plan` 'business' | 'business_max', required
  - `extraUsageLimit` object, required
    - `configured` union, required
      - object
        - `type` 'limited', required
        - `amount` number, required
      - object
        - `type` 'unlimited', required
      - object
        - `type` 'inherit', required
    - `effective` union, required
      - object
        - `type` 'limited', required
        - `amount` number, required
        - `source` union, required
          - object
            - `type` 'plan' | 'user' | 'workspace', required
          - object
            - `type` 'group', required
            - `groupId` string, uuid, required
            - `groupName` string, required
      - object
        - `type` 'unlimited', required
        - `source` union, required
          - object
            - `type` 'plan' | 'user' | 'workspace', required
          - object
            - `type` 'group', required
            - `groupId` string, uuid, required
            - `groupName` string, required
  - `extraUsagePeriodSpend` number, nullable, required

## Other responses

- `400`: Invalid body/query, unknown fields, empty PATCH, invalid limit, invalid bulk member IDs, or a cursor outside this workspace (INVALID_CURSOR).
- `401`: Missing or invalid authentication.
- `403`: Missing Billing scope, personal key, unavailable feature, missing active service-account Admin authority, or email filter without the USER_MANAGEMENT_API scope.
- `404`: Resource not in this workspace, inactive/non-human user, privacy-hidden agent, usage request not found for that member, or endpoint unavailable in this mode.
- `405`: Unsupported HTTP method.
- `409`: Workspace mode differs from the requested mode (BILLING_MODE_MISMATCH), the usage request is no longer pending (USAGE_REQUEST_NOT_PENDING, details.status holds its current status), or the write does not answer the named usage request (USAGE_REQUEST_NOT_ANSWERED).
- `429`: API rate limit exceeded.

## Changes

- **2026-11-03** `c62bf90b4013`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/billing/v1/ai-models-included/users/:userId/plan/put.md)

---

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