SnozeDevelopers
API referenceBilling

Update the workspace AI auto-refill settings

Updates whether auto-refill is enabled, its monthly ceiling, and the monthly top-up spend cap in cents (null removes the cap), recording the acting user; omitted fields are left unchanged. Requires a Clerk session and the `billing:manage` workspace permission.

PATCH
/v1/workspaces/{workspaceId}/billing/ai-topups/settings

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Request Body

application/json
  1. body
autoRefillEnabled?boolean|null
autoRefillMonthlyCeilingMicrousd?number|null|null
monthlySpendCapCents?|null|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://api.snoze.dev/v1/workspaces/string/billing/ai-topups/settings' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "autoRefillEnabled": true,    "autoRefillMonthlyCeilingMicrousd": 0,    "monthlySpendCapCents": 0,    "spentThisMonthCents": 0  }}