> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Set User Plans

> Set one plan for up to 500 members in a single call

List active human members, change a plan, and set the extra usage budget beyond the included allowance. Amounts are US dollars.

The calls use the workspace API key's `BILLING_API` scope. Writes run as the key's service account owner. This API does not invite or deactivate members. Use the [User Management API](https://docs.langdock.com/en/developer/user-management-api/user-management-overview.md) for that.

## Base URL

```
https://api.langdock.com/billing/v1/bring-your-own-keys/users/plan/bulk
```

> [!WARNING]
>
> **Dedicated deployments**
>
> Replace `api.langdock.com` with `<your-deployment-url>/api/public` in all requests.

## Prerequisites

* **API key** with the `BILLING_API` scope
* The key owner is a service account that has not been deleted and has an active Admin membership
* `USER_MANAGEMENT_API` on the same key when you need `email`, `name`, or an email filter

## Change plans in bulk

`POST /users/plan/bulk` sets one plan for 1 to 500 member ids.

```json theme={null}
{
  "userIds": [
    "11111111-1111-4111-8111-111111111111",
    "55555555-5555-4555-8555-555555555555"
  ],
  "plan": "power_user"
}
```

```json theme={null}
{
  "plan": "power_user",
  "updatedUserIds": ["11111111-1111-4111-8111-111111111111"],
  "alreadyOnPlanUserIds": ["55555555-5555-4555-8555-555555555555"]
}
```

Repeated ids count once. If any id is not an active human member of the workspace, the call returns `400` with those ids in `details.userIds` and changes nothing. Members already on the plan are listed in `alreadyOnPlanUserIds` and stay unchanged. Usage requests follow the same rules as a single plan change: `power_user` closes linked pending requests, and `standard` closes none.

The call returns `409` with `code` `CONFLICT` and message `Roles are managed by your identity provider via SCIM` when role management is set to the identity provider and at least one SCIM group is mapped to a plan. Nothing is written, including when every member is already on that plan. With no plan mapping, the call still sets the plan.

> [!NOTE]
>
> Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on [API Key Best Practices](https://docs.langdock.com/en/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.