## Set a workspace spending limit

**put** `/compute/v1/admin/workspaces/{workspace_id}/spending-limit`

Set a workspace spending limit

### Path Parameters

- `workspace_id: string`

### Body Parameters

- `limit: object { amount, currency }`

  - `amount: number`

    Workspace spending limit amount in milli-USD. Tracking starts when the limit is configured; prior or already-committed unreserved work is not counted in this workspace cap ledger.

  - `currency: "MILLI_USD"`

    Workspace spending limits currently support milli-USD only.

    - `"MILLI_USD"`

- `type: "lifetime"`

  - `"lifetime"`

### Returns

- `limit: object { amount, currency }`

  - `amount: number`

    Workspace spending limit amount in milli-USD. Tracking starts when the limit is configured; prior or already-committed unreserved work is not counted in this workspace cap ledger.

  - `currency: "MILLI_USD"`

    Workspace spending limits currently support milli-USD only.

    - `"MILLI_USD"`

- `type: "lifetime"`

  - `"lifetime"`

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces/$WORKSPACE_ID/spending-limit \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "x-api-key: $BOLTZ_API_KEY" \
    -d '{
          "limit": {
            "amount": 5000,
            "currency": "MILLI_USD"
          },
          "type": "lifetime"
        }'
```

#### Response

```json
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}
```
