# Set a member's limit

Sets or clears the monthly limit on one member's Aitronos servers. A limit set for a person replaces the [default per person](/docs/api-reference/forge-compute/update-organization-limits) for them, higher or lower; clearing it makes the default apply again. If the person set a lower [own limit](/docs/api-reference/forge-compute/update-my-limit), the lower one applies. Returns the member's limits now in force, as one entry of [List member limits](/docs/api-reference/forge-compute/list-member-limits). A refused request stores nothing.

A person's spend is the spend of the Aitronos servers they own. Once one more hour at the quoted price would pass their limit, creating or resuming one of their servers is refused with `402 FORGE_COMPUTE_SPEND_LIMIT_REACHED` (`details.reason` `member_limit_reached`). At 90% of the limit each of their running Aitronos servers carries the `notice` `member_limit_90`; at 100% they are parked (`member_limit_parked`) or keep running (`member_limit_100`), as set in the organization's [compute settings](/docs/api-reference/forge-compute/get-settings). Every change is recorded in the organization's audit log.

Requires a bearer token (or API key) whose principal holds the `manage_billing` capability in the acting organization. It works while Forge cloud compute is switched off.

#### Path Parameters

**`user_id`** string required

The member's user id, as listed in `members[].user_id` by [List member limits](/docs/api-reference/forge-compute/list-member-limits). The person must be an active member of the acting organization.

#### Query Parameters

**`organization_id`** string optional

The organization to act in. Defaults to your current organization. You must be an active member of it, or the request is refused with `403 ORGANIZATION_ACCESS_DENIED`.

#### Headers

**`X-Organization-Id`** string optional

The same as `organization_id`, as a header. When both are sent, the query parameter wins.

#### Body Parameters

**`limit_chf`** string, number or `null` required

The person's monthly limit for Aitronos servers, in CHF (`"35.00"` or `35`). Send `null` to clear it: the default per person applies again. An amount must be at least CHF 0.01, have at most two decimals and be at most the organization's monthly spending limit. Unknown fields are refused.

## Returns

The member's entry, as in [List member limits](/docs/api-reference/forge-compute/list-member-limits#returns): `user_id`, `name`, `email`, `override_chf` (the limit now set for the person), `admin_limit_chf`, `self_limit_chf`, `effective_limit_chf`, `limit_source` and `spent_chf` (this month's Aitronos server spend; `null` when it could not be read).


```json
{
  "user_id": "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83",
  "name": "Marco Rossi",
  "email": "marco.rossi@example.com",
  "override_chf": "35.00",
  "admin_limit_chf": "35.00",
  "self_limit_chf": "20.00",
  "effective_limit_chf": "20.00",
  "limit_source": "self",
  "spent_chf": "9.80"
}
```

## Errors

A refused amount is answered with `422 VALIDATION_ERROR` whose `details.field` is `limit_chf` and `details.reason` says why; `message` is the sentence to show, for example "The limit must be at least CHF 0.01.". A person who is not an active member is refused before the amount is checked.

| Status | Code | When |
|  --- | --- | --- |
| 401 | `AUTHENTICATION_REQUIRED` | No valid credential. |
| 403 | `ORGANIZATION_ACCESS_DENIED` | `organization_id` or `X-Organization-Id` names an organization you are not an active member of. |
| 403 | `INSUFFICIENT_PERMISSIONS` | The caller does not hold `manage_billing` in the acting organization. |
| 404 | `MEMBER_NOT_FOUND` | `user_id` is not an active member of the acting organization. `details.user_id` echoes it. |
| 422 | `VALIDATION_ERROR` | An amount below CHF 0.01 (`details.reason` `must be at least CHF 0.01`), with more than two decimals (`can have at most two decimals`), or above the organization's monthly spending limit (`can be at most CHF 80.00`, with the organization's own amount). |
| 422 | `VALIDATION_ERROR` | `limit_chf` is missing, is not a number, or the body has an unknown field: `details.fields` lists each field with its `message` and `type`. |



```bash cURL
curl -X PUT "https://api.aitronos.com/v1/forge/compute/limits/members/usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"limit_chf": "35.00"}'
```


```python Python SDK
# pip install aitronos-sdk
#
# The Python SDK does not expose a typed `forge_compute` namespace yet, so call
# the endpoint directly with the same credential you would pass to `Aitronos(...)`
# — an API key or a bearer token, both sent as `Authorization: Bearer <value>`.
import httpx

API_KEY = "your-api-key"

member = httpx.put(
    "https://api.aitronos.com/v1/forge/compute/limits/members/usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"limit_chf": "35.00"},
).json()
print(member["name"], member["effective_limit_chf"], member["limit_source"])
```


```python Python
import os
import requests

token = os.environ["AITRONOS_TOKEN"]
user_id = "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83"
# Clear the limit set for this person: the default per person applies again.
response = requests.put(
    f"https://api.aitronos.com/v1/forge/compute/limits/members/{user_id}",
    headers={"Authorization": f"Bearer {token}"},
    json={"limit_chf": None},
)
print(response.status_code, response.json())
```


```javascript JavaScript
const userId = "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83";
const response = await fetch(
  `https://api.aitronos.com/v1/forge/compute/limits/members/${userId}`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${process.env.AITRONOS_TOKEN}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ limit_chf: "35.00" }),
  },
);
const member = await response.json();
console.log(response.ok ? member.effective_limit_chf : member.error.message);
```

**Response:**

200 OK

```json
{
  "user_id": "usr_2b8e4d1a9c3f4e7b8a6d5c2e1f0b9a83",
  "name": "Marco Rossi",
  "email": "marco.rossi@example.com",
  "override_chf": "35.00",
  "admin_limit_chf": "35.00",
  "self_limit_chf": "20.00",
  "effective_limit_chf": "20.00",
  "limit_source": "self",
  "spent_chf": "9.80"
}
```

404 Not Found

```json
{
  "success": false,
  "error": {
    "code": "MEMBER_NOT_FOUND",
    "message": "This person is not an active member of your organization.",
    "system_message": "Not an active member of this organization",
    "type": "client_error",
    "status": 404,
    "details": {"user_id": "usr_9d4c2a7e5b1f4c8a9e3d6b0f2a1c5e74"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

422 Below the minimum

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The limit must be at least CHF 0.01.",
    "system_message": "Invalid Forge compute limit limit_chf: must be at least CHF 0.01",
    "type": "validation_error",
    "status": 422,
    "details": {"field": "limit_chf", "reason": "must be at least CHF 0.01", "value": "0"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

403 Forbidden

```json
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You don't have permission to perform this action.",
    "system_message": "Missing required capability: manage_billing",
    "type": "authorization_error",
    "status": 403,
    "details": {"required_capability": "manage_billing"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

## Related Resources

- [Forge cloud compute overview](/docs/api-reference/forge-compute/introduction)
- [List billing organizations](/docs/api-reference/forge-compute/list-billing-organizations)
- [Choose the default billing organization](/docs/api-reference/forge-compute/choose-billing-organization)
- [List project groups](/docs/api-reference/forge-compute/list-project-groups)
- [Register or update a project group](/docs/api-reference/forge-compute/put-project-group)
- [Delete a project group](/docs/api-reference/forge-compute/delete-project-group)
- [List compute offerings](/docs/api-reference/forge-compute/list-offerings)
- [Get offering options](/docs/api-reference/forge-compute/get-offering-options)
- [Resolve a free size](/docs/api-reference/forge-compute/resolve-offering-size)
- [List connected accounts](/docs/api-reference/forge-compute/list-credentials)
- [Connect a cloud account](/docs/api-reference/forge-compute/put-credential)
- [Disconnect a cloud account](/docs/api-reference/forge-compute/delete-credential)
- [Create a server](/docs/api-reference/forge-compute/create-host)
- [List servers](/docs/api-reference/forge-compute/list-hosts)
- [List your servers in every organization](/docs/api-reference/forge-compute/list-my-hosts)
- [Get a server](/docs/api-reference/forge-compute/get-host)
- [Get a server's daily cost and uptime](/docs/api-reference/forge-compute/get-host-usage)
- [List a server's running intervals](/docs/api-reference/forge-compute/list-host-intervals)
- [List a server's event history](/docs/api-reference/forge-compute/list-host-events)
- [Report a setup step](/docs/api-reference/forge-compute/report-progress)
- [Report the server's host key](/docs/api-reference/forge-compute/report-host-key)
- [Mark a server ready](/docs/api-reference/forge-compute/report-ready)
- [Report activity](/docs/api-reference/forge-compute/report-activity)
- [Park a server](/docs/api-reference/forge-compute/park-host)
- [Resume a server](/docs/api-reference/forge-compute/resume-host)
- [Delete a server](/docs/api-reference/forge-compute/delete-host)
- [Revoke a server](/docs/api-reference/forge-compute/revoke-host)
- [Get compute settings](/docs/api-reference/forge-compute/get-settings)
- [Update compute settings](/docs/api-reference/forge-compute/update-settings)
- [Get spend limits](/docs/api-reference/forge-compute/get-limits)
- [Change the organization's limits](/docs/api-reference/forge-compute/update-organization-limits)
- [Set your own limit](/docs/api-reference/forge-compute/update-my-limit)
- [List member limits](/docs/api-reference/forge-compute/list-member-limits)
- [Set a member's limit](/docs/api-reference/forge-compute/update-member-limit)
- [Delete a leftover resource](/docs/api-reference/forge-compute/delete-orphan)