---
title: "Set user extra usage budget"
method: PUT
path: "/billing/v1/bring-your-own-keys/users/{userId}/extra-usage-budget"
tags: ["Users"]
---

# Set user extra usage budget

`PUT /billing/v1/bring-your-own-keys/users/{userId}/extra-usage-budget`

## Request

- Base URL: `https://api.langdock.com`
- URL: `https://api.langdock.com/billing/v1/bring-your-own-keys/users/{userId}/extra-usage-budget`
- Auth: HTTP bearer

Raising the effective extra allowance resolves the pending usage request. Unchanged or lower allowances do not. The request body is the limit object directly; extraUsagePeriodSpend is null in the response.

## Request body

- union
  - object
    - `type` 'limited', required
    - `amount` number, required
  - object
    - `type` 'unlimited', required
  - object
    - `type` 'none', required

## Response `200`

Updated resource. Spending is null; GET retrieves spending.

- ByokUser: USD. The highest plan/group monthly budget configures weekly and session allowances. Extra usage can start when those included allowances are exhausted. 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` 'standard' | 'power_user', required
  - `monthlyBudget` object, required
    - `effective` union, required
      - object
        - `type` 'limited', required
        - `amount` number, required
        - `source` union, required
          - object
            - `type` 'plan', required
          - object
            - `type` 'group', required
            - `groupId` string, uuid, required
            - `groupName` string, required
      - object
        - `type` 'unlimited', required
        - `source` union, required
          - object
            - `type` 'plan', required
          - object
            - `type` 'group', required
            - `groupId` string, uuid, required
            - `groupName` string, required
  - `extraUsageBudget` union, required
    - object
      - `type` 'limited', required
      - `amount` number, required
    - object
      - `type` 'unlimited', required
    - object
      - `type` 'none', 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/bring-your-own-keys/users/:userId/extra-usage-budget/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)
