{"openapi":"3.1.0","info":{"title":"GET /api/v1/notifications/count","version":"1.0.0","description":"Notification count"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/notifications/count":{"get":{"tags":["notifications"],"summary":"Notification count","description":"Unread (``new`` only) count for the bell badge by default. Pass ``unread_only=false`` for the legacy open (new + seen) count.","operationId":"open_count_api_v1_notifications_count_get","parameters":[{"name":"scope_business_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional: scope to a single business","title":"Scope Business Id"},"description":"Optional: scope to a single business"},{"name":"business_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated alias for `scope_business_id`","deprecated":true,"title":"Business Id"},"description":"Deprecated alias for `scope_business_id`","deprecated":true},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true (default), count only unread (``new``) rows. When false, count open rows (``new`` + ``seen`` + expired snoozes).","default":true,"title":"Unread Only"},"description":"When true (default), count only unread (``new``) rows. When false, count open rows (``new`` + ``seen`` + expired snoozes)."},{"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":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_NotificationCountResponse_"}}}},"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"}}}},"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"},"NotificationCountResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count"}},"type":"object","required":["count"],"title":"NotificationCountResponse"},"SuccessEnvelope_NotificationCountResponse_":{"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/NotificationCountResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[NotificationCountResponse]"},"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":[]}]}