{"openapi":"3.1.0","info":{"title":"PUT /api/v1/preferences/notifications/topics","version":"1.0.0","description":"Update Topic Overrides Endpoint"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/preferences/notifications/topics":{"put":{"tags":["notification-preferences"],"summary":"Update Topic Overrides Endpoint","description":"Replace the per-topic channel override map for the current user.\n\nValidation is permissive: unknown topics or unknown channels\nare silently dropped by ``extract_topic_overrides`` rather\nthan rejected, so a forward-compatible client (e.g. one that\nknows about a topic the server hasn't deployed yet) won't\nbreak the save.","operationId":"update_topic_overrides_endpoint_api_v1_preferences_notifications_topics_put","parameters":[{"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/TopicChannelOverridesResponse"}}}},"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"},"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"}},"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":[]}]}