---
title: "Update Budget"
method: PATCH
path: "/v1/account/budget"
tags: ["v1"]
---

# Update Budget

`PATCH /v1/account/budget`

## Request

- Base URL: `https://api.ellipsis.dev`
- URL: `https://api.ellipsis.dev/v1/account/budget`
- Auth: HTTP bearer

Update spending policy or budget alerts as an account administrator.

Each supplied section replaces that section; omitted sections are
preserved. Set policy.developer_defaults to null to disable developer
limits. Null override windows inherit their default. API keys use
their stable ID, not their secret. Changes apply to the next paid
request, including sessions already running. API keys and session
tokens cannot edit budgets. The session ceiling remains at
/account/settings; purchasing credits is separate from budget policy.

## Headers

- `user-agent` string, nullable

## Request body

- BudgetUpdate: Replace the supplied policy and/or alerts; omitted sections are preserved.
  - `alerts` BudgetAlerts: Notifications only. These thresholds do not stop paid requests.
    - `absolute_thresholds` BudgetAlertThresholds, required: Independent notification thresholds in millicents. Null disables a window.
      - `day` integer, nullable
      - `month` integer, nullable
      - `week` integer, nullable
    - `percent_thresholds` integer[], required
  - `policy` BudgetPolicy: Limits on actual spend, including subscription tokens, not allocations of credit. Developer keys are attribution_type:attribution_id; API keys use their stable key ID, never the secret. Unattributed and Ellipsis bot activity is exempt only from developer limits. A null developer default disables that scope while preserving overrides for later use.
    - `account` BudgetLimits, required: Spending ceilings over trailing 1, 7 and 28 days, in millicents. Each is at least 100,000 ($1) and a whole number of cents.
      - `day` integer, required
      - `month` integer, required
      - `week` integer, required
    - `default_session` integer, required
    - `developer_defaults` BudgetLimits, required: Spending ceilings over trailing 1, 7 and 28 days, in millicents. Each is at least 100,000 ($1) and a whole number of cents.
      - `day` integer, required
      - `month` integer, required
      - `week` integer, required
    - `developer_overrides` object, required

## Response `200`

Successful Response

- BudgetSummary: Prepaid credit and the actual trailing budgets enforced by the proxy. Budget windows roll continuously; they are not monthly credit renewals. Amounts are in millicents and may be negative after overshoot. One admitted request can exceed a limit.
  - `alerts` BudgetAlerts, required: Notifications only. These thresholds do not stop paid requests.
    - `absolute_thresholds` BudgetAlertThresholds, required: Independent notification thresholds in millicents. Null disables a window.
      - `day` integer, nullable
      - `month` integer, nullable
      - `week` integer, nullable
    - `percent_thresholds` integer[], required
  - `as_of` string, date-time, required
  - `credit_balance` integer, required
  - `credit_exhausted` boolean, required
  - `developer_limits` DeveloperBudgets, required
    - `defaults` DeveloperBudgetDefaultWindow[], required
      - `limit` integer, required
      - `platform_max` integer, required
      - `window_days` integer, required
    - `developers` DeveloperBudget[], required: Developers with recent usage or overrides, plus active API keys.
      - `attribution_id` string, required
      - `attribution_type` 'github_user' | 'linear_user' | 'slack_user' | 'api_key', required
      - `avatar_url` string, nullable, required
      - `developer_key` string, required
      - `login` string, nullable, required
      - `name` string, nullable, required: API key name, when the key still exists.
      - `windows` DeveloperBudgetWindow[], required
        - `exhausted` boolean, required
        - `limit` integer, nullable, required
        - `override` integer, nullable, required
        - `remaining` integer, nullable, required
        - `spent` integer, required
        - `window_days` integer, required
    - `enabled` boolean, required
  - `per_run` SessionBudgetDefault, required
    - `budget` integer, required
    - `ceiling` integer, required: Current effective session ceiling from /account/settings.
    - `platform_max` integer, required
  - `policy` BudgetPolicy, required: Limits on actual spend, including subscription tokens, not allocations of credit. Developer keys are attribution_type:attribution_id; API keys use their stable key ID, never the secret. Unattributed and Ellipsis bot activity is exempt only from developer limits. A null developer default disables that scope while preserving overrides for later use.
    - `account` BudgetLimits, required: Spending ceilings over trailing 1, 7 and 28 days, in millicents. Each is at least 100,000 ($1) and a whole number of cents.
      - `day` integer, required
      - `month` integer, required
      - `week` integer, required
    - `default_session` integer, required
    - `developer_defaults` BudgetLimits, required: Spending ceilings over trailing 1, 7 and 28 days, in millicents. Each is at least 100,000 ($1) and a whole number of cents.
      - `day` integer, required
      - `month` integer, required
      - `week` integer, required
    - `developer_overrides` object, required
  - `windows` AccountBudgetWindow[], required
    - `exhausted` boolean, required
    - `fraction_used` number, required
    - `limit` integer, required
    - `platform_max` integer, required
    - `remaining` integer, required
    - `spent` integer, required
    - `window_days` integer, required: Trailing window length: 1, 7 or 28 days.

## Other responses

- `401`: The bearer token is missing, invalid, or revoked.
- `403`: The credential may not perform this action, or the account is blocked.
- `422`: Validation Error

---

[API](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api.md) - [All operations](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ellipsis/apis/ellipsis-rest-api/revisions/344b16df9a1a?raw)
