---
title: "Turn agent purchasing on or off and set its limits; every change is audited"
method: PUT
path: "/v1/account/billing/agent-purchasing"
---

# Turn agent purchasing on or off and set its limits; every change is audited

`PUT /v1/account/billing/agent-purchasing`

## Request

- Base URL: `https://api.roveapi.com`
- URL: `https://api.roveapi.com/v1/account/billing/agent-purchasing`
- Auth: API key in cookie `rove_session`

## Request body

- object
  - `state` 'off' | 'on', required: off by default: no API key can buy until the owner turns it on
  - `per_purchase_max_cents` integer, required: Ceiling $500; not above period_max_cents.
  - `period` 'day' | 'week' | 'month', required: Calendar periods in UTC; weeks start Monday.
  - `period_max_cents` integer, required: Ceiling $2,000.
  - `off_session_allowed` boolean, required

## Response `200`

Successful response (Cache-Control: no-store)

- object
  - `state` 'off' | 'on', required: off by default: no API key can buy until the owner turns it on
  - `per_purchase_max_cents` integer, required: Ceiling $500; not above period_max_cents.
  - `period` 'day' | 'week' | 'month', required: Calendar periods in UTC; weeks start Monday.
  - `period_max_cents` integer, required: Ceiling $2,000.
  - `off_session_allowed` boolean, required
  - `updated_at` string, date-time, nullable, required: null until the owner first changes it; the values are then the defaults ($25 per purchase, $100 per month).
  - `period_committed_cents` integer, required: Live agent and auto top-up purchases this period that reserve or spent their amount; owner purchases never count.
  - `period_resets_at` string, date-time, required
  - `ceilings` object, required
    - `per_purchase_max_cents` 50000, required
    - `period_max_cents` 200000, required

## Other responses

- `400`: RFC 7807 invalid-params: the field and its ceiling
- `401`: RFC 7807 owner-session-required: sign in
- `403`: RFC 7807 owner-origin-refused (mutations only)
- `429`: RFC 7807 billing-settings-rate-limited: 30 owner billing-settings changes per account per trailing hour; Retry-After and retry_after_seconds
- `503`: RFC 7807 account-service-unavailable; Retry-After: 30

---

[API](https://skmtc.dev/roveapi/apis/rove-api.md) · [All operations](https://skmtc.dev/roveapi/apis/rove-api/llms.txt) · [OpenAPI document](https://skmtc.dev/roveapi/apis/rove-api/revisions/0e5d69bde586?raw)
