{"openapi":"3.1.0","info":{"title":"POST /api/v1/billing/ai/pause","version":"1.0.0","description":"Pause Ai Features"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/billing/ai/pause":{"post":{"tags":["billing"],"summary":"Pause Ai Features","description":"Pause all AI features for the authenticated business.\n\nSets ``businesses.ai_paused_at`` so:\n- ``check_ai_quota`` returns ``allowed=False, paused=True`` for any\n  subsequent AI call (chat, panels, OCR, etc.).\n- ``track_business_usage`` short-circuits, stopping the Stripe\n  overage fire-and-forget.\n- ``AITransactionCleaner`` downshifts to rule-only cleaning during\n  Plaid sync (no LLM calls).\n\nIdempotent. Returns the refreshed AI usage payload so the widget /\nbanner can transition to the paused state without a second\nround-trip.","operationId":"pause_ai_features_api_v1_billing_ai_pause_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_PauseAiFeaturesResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIOverageBreakdown":{"properties":{"light":{"type":"integer","title":"Light"},"standard":{"type":"integer","title":"Standard"},"heavy":{"type":"integer","title":"Heavy"}},"additionalProperties":true,"type":"object","required":["light","standard","heavy"],"title":"AIOverageBreakdown"},"AIOverageRatesCents":{"properties":{"light":{"type":"integer","title":"Light"},"standard":{"type":"integer","title":"Standard"},"heavy":{"type":"integer","title":"Heavy"}},"additionalProperties":true,"type":"object","required":["light","standard","heavy"],"title":"AIOverageRatesCents"},"AIUpgradeSuggestion":{"properties":{"addon_or_plan_slug":{"type":"string","title":"Addon Or Plan Slug"},"label":{"type":"string","title":"Label"},"monthly_quota":{"type":"integer","title":"Monthly Quota"},"monthly_price_cents":{"type":"integer","title":"Monthly Price Cents"},"would_save_cents":{"type":"integer","title":"Would Save Cents"}},"additionalProperties":true,"type":"object","required":["addon_or_plan_slug","label","monthly_quota","monthly_price_cents","would_save_cents"],"title":"AIUpgradeSuggestion"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PauseAiFeaturesResponse":{"properties":{"requests_used":{"type":"integer","title":"Requests Used"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"remaining":{"type":"integer","title":"Remaining"},"is_unlimited":{"type":"boolean","title":"Is Unlimited"},"plan_tier":{"type":"string","title":"Plan Tier"},"has_ai_pro":{"type":"boolean","title":"Has Ai Pro"},"is_trial":{"type":"boolean","title":"Is Trial"},"overage_enabled":{"type":"boolean","title":"Overage Enabled"},"overage_requests":{"type":"integer","title":"Overage Requests"},"overage_rates_cents":{"$ref":"#/components/schemas/AIOverageRatesCents"},"overage_breakdown":{"$ref":"#/components/schemas/AIOverageBreakdown"},"estimated_overage_cost_cents":{"type":"integer","title":"Estimated Overage Cost Cents"},"projected_month_end_overage_cents":{"type":"integer","title":"Projected Month End Overage Cents"},"ai_paused_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Paused At"},"ai_paused_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Paused By"},"upgrade_suggestion":{"anyOf":[{"$ref":"#/components/schemas/AIUpgradeSuggestion"},{"type":"null"}]},"disabled_features_when_paused":{"items":{"type":"string"},"type":"array","title":"Disabled Features When Paused"}},"additionalProperties":true,"type":"object","required":["requests_used","monthly_limit","remaining","is_unlimited","plan_tier","has_ai_pro","is_trial","overage_enabled","overage_requests","overage_rates_cents","overage_breakdown","estimated_overage_cost_cents","projected_month_end_overage_cents","disabled_features_when_paused"],"title":"PauseAiFeaturesResponse","description":"Response for ``pause_ai_features``."},"SuccessEnvelope_PauseAiFeaturesResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/PauseAiFeaturesResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[PauseAiFeaturesResponse]"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}