SnozeDevelopers
API referenceAutomations

Set an automation's monthly AI budget

Sets the most AI credits the automation may spend per usage period (1 to 1,000,000), or removes the ceiling with null. Once spent, its next AI or code step fails without retrying until the budget is raised or the period resets; the workspace allowance still applies either way. Requires the `automations:write` permission plus edit access; the change is recorded in the workspace activity log and does not touch the automation's draft. Send an `Idempotency-Key` header to make retries safe.

PUT
/v1/workspaces/{workspaceId}/automations/{automationId}/ai-budget

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
automationId*string

Request Body

application/json
  1. body
monthlyBudgetCredits*|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X PUT 'https://api.snoze.dev/v1/workspaces/string/automations/string/ai-budget' \  -H 'Content-Type: application/json' \  -d '{  "monthlyBudgetCredits": 1}'
Example Response
{  "data": {    "automationId": "string",    "periodStart": "string",    "periodEnd": "string",    "usedMicrousd": 0,    "usedCredits": 0,    "monthlyBudgetMicrousd": 0,    "monthlyBudgetCredits": 0  }}