budgets

Create a hierarchical budget (owner or admin only)

Requires OWNER or ADMIN authority. A scoped child key cannot do this and receives 403 permission_denied. To have a budget created from an agent-initiated flow, propose it in the onboarding request so a human approves the exact numbers.

post/api/budgets

Request

  • Base URL: https://www.spendline.ai
  • URL: https://www.spendline.ai/api/budgets
  • Auth: API key in header x-spendline-key

Request body

idstring uuid
scope_type'org' | 'team' | 'agent' | 'customer' required

org = whole account. team = x-spendline-tags cost-centre key. agent = x-agent-id. customer = x-customer-id.

scope_idstring nullable

Required unless scope_type is "org". Must match the attribution value exactly.

monthly_limit_usdnumber required

Calendar-month cap in USD, UTC.

strict_modeboolean

true blocks over-cap calls with 402; false records only.

require_approval_on_exceedboolean
created_atstring date-time
updated_atstring date-time

Response

Created.

idstring uuid
scope_type'org' | 'team' | 'agent' | 'customer' required

org = whole account. team = x-spendline-tags cost-centre key. agent = x-agent-id. customer = x-customer-id.

scope_idstring nullable

Required unless scope_type is "org". Must match the attribution value exactly.

monthly_limit_usdnumber required

Calendar-month cap in USD, UTC.

strict_modeboolean

true blocks over-cap calls with 402; false records only.

require_approval_on_exceedboolean
created_atstring date-time
updated_atstring date-time

Changes

No recorded changes to this operation across all 1 revision of this API.