---
title: "Set member credit limits"
method: POST
path: "/v1/workspaces/{workspace_id}/billing/credit-limits"
tags: ["billing-usage"]
---

# Set member credit limits

`POST /v1/workspaces/{workspace_id}/billing/credit-limits`

**Plan:** `Enterprise`

Sets or clears the monthly credit limit for 1-1000 members in one request (send a single-item list for one member). Returns HTTP 200 with a per-member result; an individual failure does not fail the request. If every member fails, returns HTTP 422 with the same per-member response body.

## Path parameters

- `workspace_id` string, required — Workspace ID

## Request body

- V1BillingBulkSetMemberCreditLimitInputBody
  - `members` V1BulkMemberCreditLimitItem[], required — Per-member limits to apply (1-1000 entries). Use the workspace default (PATCH /v1/workspaces/{workspace_id}/settings) to cap everyone at once.
    - `email` string — Member's workspace email (case-insensitive; the address on the workspace membership, not the user's personal email). Provide exactly one of user_id or email.
    - `monthly_credit_limit` number, double, nullable, required — A number (0 blocks all spend) to set the cap, or null to clear it (the member inherits the workspace default).
    - `user_id` string — Member user_id (from GET /v1/workspaces/{workspace_id}/members; active members only). Provide exactly one of user_id or email.

## Response `200`

OK

- V1BulkSetMemberCreditLimitOutputBody
  - `failed` integer, required — Number that failed (see per-item error).
  - `results` V1BulkMemberCreditLimitResult[], nullable, required — Per-member outcome, in request order.
    - `email` string — Echoed when the item was addressed by email, so email-addressed results stay correlatable.
    - `error` string — Failure reason when status is error.
    - `status` string, required — success or error.
    - `user_id` string — The member this result is for (resolved from email when the item was addressed by email).
  - `successful` integer, required — Number applied successfully.
  - `total` integer, required — Number of members in the request.

## Other responses

- `401` — Missing or invalid API key.
- `402` — This operation or requested configuration requires a workspace plan that includes this feature.
- `403` — The key or caller lacks the required scope or permission.
- `406` — The Accept header excludes every media type this endpoint produces.
- `422` — Every member failed; same per-member response body as 200
- `429` — Too many requests. Retry after the interval in Retry-After when present.
- `default` — Error. The response body uses the standard error envelope; status matches the HTTP status code and type is a machine-readable error code.

---

[API](https://skmtc.net/lovable/apis/lovable-api.md) · [All operations](https://skmtc.net/lovable/apis/lovable-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lovable/lovable-api/revisions/aa8d44585147/schema)
