{"openapi":"3.1.0","info":{"title":"PUT /api/v1/advisory-firms/{firm_id}/businesses/{business_id}/preferences/notifications/topics","version":"1.0.0","description":"Update a business notification topic policy"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/advisory-firms/{firm_id}/businesses/{business_id}/preferences/notifications/topics":{"put":{"tags":["advisory-firms"],"summary":"Update a business notification topic policy","description":"Replace the per-topic channel policy for a client business.","operationId":"update_business_notification_topic_policy_api_v1_advisory_firms__firm_id__businesses__business_id__preferences_notifications_topics_put","parameters":[{"name":"firm_id","in":"path","required":true,"schema":{"type":"string","title":"Firm Id"}},{"name":"business_id","in":"path","required":true,"schema":{"type":"string","title":"Business Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicChannelOverridesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_TopicChannelOverridesResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SuccessEnvelope_TopicChannelOverridesResponse_":{"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/TopicChannelOverridesResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[TopicChannelOverridesResponse]"},"TopicCatalogEntry":{"properties":{"value":{"type":"string","title":"Value","description":"NotificationTopic enum value"},"label":{"type":"string","title":"Label","description":"Human-readable label"}},"type":"object","required":["value","label"],"title":"TopicCatalogEntry","description":"A selectable notification topic and its display label."},"TopicChannelOverridesResponse":{"properties":{"overrides":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object","title":"Overrides","description":"Map of topic -> {channel: bool}"},"available_channels":{"items":{"type":"string"},"type":"array","title":"Available Channels","description":"Channels the override grid can toggle"},"available_topics":{"items":{"$ref":"#/components/schemas/TopicCatalogEntry"},"type":"array","title":"Available Topics","description":"Every notification topic + label, generated from the backend enum so the preference grid never hardcodes the topic list"}},"type":"object","title":"TopicChannelOverridesResponse","description":"User's per-topic channel overrides + the channel set this UI accepts.\n\nThe ``available_channels`` field lets the frontend stay in\nsync with backend without hardcoding the channel list."},"TopicChannelOverridesUpdate":{"properties":{"overrides":{"additionalProperties":{"additionalProperties":{"type":"boolean"},"type":"object"},"type":"object","title":"Overrides"}},"type":"object","title":"TopicChannelOverridesUpdate","description":"Replace-style update for the per-topic override map.\n\nSending an empty dict for a topic clears that topic's\noverrides (falls back to ``CHANNEL_POLICY`` defaults).\nSending an empty top-level dict clears all overrides."},"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":[]}]}