{"openapi":"3.1.0","info":{"title":"PUT /api/v1/notifications/{notification_id}/pin","version":"1.0.0","description":"Pin or unpin a notification"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/notifications/{notification_id}/pin":{"put":{"tags":["notifications"],"summary":"Pin or unpin a notification","description":"Toggle whether a notification is pinned to the top of the feed.","operationId":"set_pinned_api_v1_notifications__notification_id__pin_put","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}},{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPinnedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}}},"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"},"NotificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"recipient_kind":{"$ref":"#/components/schemas/RecipientKindEnum"},"recipient_id":{"type":"string","title":"Recipient Id"},"scope_business_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Business Id"},"scope_firm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Firm Id"},"source":{"$ref":"#/components/schemas/NotificationSourceEnum"},"topic":{"$ref":"#/components/schemas/NotificationTopicEnum"},"severity":{"$ref":"#/components/schemas/NotificationSeverityEnum"},"status":{"$ref":"#/components/schemas/NotificationStatusEnum"},"snoozed_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Snoozed Until"},"pinned":{"type":"boolean","title":"Pinned","default":false},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body","default":""},"action_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Label"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"},"has_action":{"type":"boolean","title":"Has Action","default":false},"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachments"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"channels":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Channels"},"is_virtual":{"type":"boolean","title":"Is Virtual","default":false},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"status_changed_at":{"type":"string","format":"date-time","title":"Status Changed At"}},"type":"object","required":["id","recipient_kind","recipient_id","source","topic","severity","status","title","created_at","updated_at","status_changed_at"],"title":"NotificationResponse","description":"Single notification row."},"NotificationSeverityEnum":{"type":"string","enum":["info","warning","urgent"],"title":"NotificationSeverityEnum"},"NotificationSourceEnum":{"type":"string","enum":["alert","task","system","digest","announcement","message"],"title":"NotificationSourceEnum"},"NotificationStatusEnum":{"type":"string","enum":["new","seen","snoozed","resolved","dismissed"],"title":"NotificationStatusEnum"},"NotificationTopicEnum":{"type":"string","enum":["billing","ap_approval","anomaly","plaid","month_end","ledger","notes","email_ingest","reconciliation","manual"],"title":"NotificationTopicEnum"},"RecipientKindEnum":{"type":"string","enum":["user","business","firm"],"title":"RecipientKindEnum"},"SetPinnedRequest":{"properties":{"pinned":{"type":"boolean","title":"Pinned"}},"type":"object","required":["pinned"],"title":"SetPinnedRequest"},"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":[]}]}