# Update Member Spend Limit

Cap one member's Cirra credit use, or give them back the default.

`PUT https://connect.mindcloud.co/v2/members/:userId/spend-limit`

Permissions: `subscription:manage`.

## Parameters

### Path

- `userId` (string, required): The member's userId, from List Members.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Body

- `creditSpendLimitUsd` (number, required): US dollars per billing period, 0 for none, or null for the default.

## Example request

```bash
curl --request PUT \
  --url 'https://connect.mindcloud.co/v2/members/user_2wXk9Lm4Pq7Rz3Ts8Vb1Nc6Hd/spend-limit' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "creditSpendLimitUsd": 250
}'
```

## Response fields

- `userId` (string): The member's userId.
- `creditSpendLimitUsd` (string): How much of the organization's Cirra credit pool the member may use per billing period, in US dollars, such as "250.00". "0.00": none. Null: the plan's default limit.
