{"openapi":"3.0.0","paths":{"/notify":{"post":{"operationId":"notify","summary":"Send notification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationDto"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreateNotificationDto"}}}},"responses":{"201":{"description":""}},"tags":["Notifications"]}},"/verify/telegram/username/{username}":{"get":{"operationId":"verifyTelegramUsername","summary":"Verify Telegram username","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"Username not available"}},"tags":["Notifications"]}}},"info":{"title":"connhex-notifications","description":"","version":"1.2.0","contact":{}},"tags":[],"servers":[{"url":"http://connhex-notifications.connhex"}],"components":{"schemas":{"CreateNotificationPayloadDto":{"type":"object","properties":{"title":{"type":"string","description":"Subject / title of the notification."},"body":{"type":"string","description":"Main content of the notification."},"bodyFormat":{"type":"object","description":"Controls how `body` is interpreted for email notifications.\n- `\"text\"` (default): plain text, wrapped in the built-in HTML email template.\n- `\"html\"`: `body` is treated as a complete HTML document and sent as-is.\nWhen set to `\"html\"`, the fields `preview`, `incipit`, `conclusion`, and `footer`\nare ignored.\nHas no effect on non-email channels (Telegram, SMS, FCM, etc.)."},"preview":{"type":"string","description":"Email preview text shown in the inbox before opening the message.\nIgnored when `bodyFormat` is `\"html\"`."},"incipit":{"type":"string","description":"Opening text displayed before the main body.\nIgnored when `bodyFormat` is `\"html\"`."},"conclusion":{"type":"string","description":"Closing text displayed after the main body.\nIgnored when `bodyFormat` is `\"html\"`."},"footer":{"type":"string","description":"Footer text displayed at the bottom of the email.\nIgnored when `bodyFormat` is `\"html\"`."}},"required":["title","body"]},"MemoryStoredFile":{"type":"object","properties":{}},"CreateNotificationDto":{"type":"object","properties":{"userId":{"type":"string","description":"User ID of the target Connhex user.\nIn order to deliver the notification, `userId`, `target`, or `targets` must be specified."},"target":{"type":"string","description":"Notification target: can be an email address, a phone number or a telegram account.","example":"admin@connhex.com","deprecated":true},"targets":{"description":"Notification targets: an array of target addresses (emails, phone numbers, device tokens, etc.).\nIn order to deliver the notification, `userId`, `target`, or `targets` must be specified.","example":["admin@connhex.com","user@connhex.com"],"type":"array","items":{"type":"string"}},"medium":{"type":"string","enum":["email","telegram","sms","slack","discord","fcm","msteams"]},"payload":{"$ref":"#/components/schemas/CreateNotificationPayloadDto"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/MemoryStoredFile"}}},"required":["medium","payload"]}}}}