{"openapi":"3.0.0","info":{"title":"Telegram API Service","description":"A comprehensive Telegram API service built with TypeScript and the telegram (gramjs) library for real MTProto integration. Provides access to all major Telegram operations including messaging, media, payments, channels, and user management. All endpoints use header-based authentication for security. Accepts credentials from any Telegram account type.","version":"2.3.0","contact":{"name":"API Support","email":"support@example.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://telegram-api.aso.market","description":"Production server"},{"url":"http://localhost:3000","description":"Development server"}],"security":[{"TelegramAuth":[]}],"components":{"securitySchemes":{"TelegramAuth":{"type":"apiKey","in":"header","name":"X-Api-Id","description":"Telegram API credentials passed via headers"}},"schemas":{"ApiResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"TelegramHeaders":{"type":"object","required":["X-Api-Id","X-Api-Hash","X-Session-String","X-User-Id"],"properties":{"X-Api-Id":{"type":"string","description":"Telegram API ID"},"X-Api-Hash":{"type":"string","description":"Telegram API Hash"},"X-Session-String":{"type":"string","description":"Telegram session string"},"X-User-Id":{"type":"string","description":"Telegram user ID"}}},"ValidateSessionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"isValid":{"type":"boolean","description":"Whether the session is valid"},"userInfo":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"username":{"type":"string","description":"Username (without @)"},"first_name":{"type":"string","description":"First name"},"last_name":{"type":"string","description":"Last name"},"is_bot":{"type":"boolean","description":"Whether the user is a bot"},"is_premium":{"type":"boolean","description":"Whether the user has Telegram Premium"},"phone":{"type":"string","description":"Phone number"},"about":{"type":"string","description":"Bio/about text"},"profile_photo":{"type":"object","properties":{"id":{"type":"string","description":"Photo ID"},"dc_id":{"type":"number","description":"Data center ID"}}},"common_chats_count":{"type":"number","description":"Number of common chats"},"blocked":{"type":"boolean","description":"Whether the user is blocked"},"can_pin_message":{"type":"boolean","description":"Whether the user can pin messages"},"has_private_forwards":{"type":"boolean","description":"Whether the user has private forwards enabled"},"settings":{"type":"object","properties":{"report_spam":{"type":"boolean"},"add_contact":{"type":"boolean"},"block_contact":{"type":"boolean"},"share_contact":{"type":"boolean"},"report_geo":{"type":"boolean"}}}}},"error":{"type":"string","description":"Error message if operation failed"}},"example":{"success":true,"isValid":true,"userInfo":{"id":"123456789","username":"example_user","first_name":"John","last_name":"Doe","is_bot":false,"is_premium":true,"phone":"+1234567890","about":"Software developer","profile_photo":{"id":"1234567890123456789","dc_id":2},"common_chats_count":5,"blocked":false,"can_pin_message":true,"has_private_forwards":false,"settings":{"report_spam":true,"add_contact":true,"block_contact":true,"share_contact":false,"report_geo":false}}}},"GetUsersResponse":{"type":"object","properties":{"success":{"type":"boolean"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"is_bot":{"type":"boolean"},"is_premium":{"type":"boolean"},"phone":{"type":"string"},"about":{"type":"string"},"profile_photo":{"type":"object"},"common_chats_count":{"type":"number"},"blocked":{"type":"boolean"}}}},"error":{"type":"string"}}},"UpdateProfileResponse":{"type":"object","properties":{"success":{"type":"boolean"},"user":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"about":{"type":"string"}}},"error":{"type":"string"}}},"SendMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Media object if present","nullable":true},"replyTo":{"type":"object","description":"Reply to message info","nullable":true}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetMessagesResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Media object if present","nullable":true},"replyTo":{"type":"object","description":"Reply to message info","nullable":true}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"EditMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Media object if present","nullable":true},"replyTo":{"type":"object","description":"Reply to message info","nullable":true}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SearchChannelsResponse":{"type":"object","properties":{"success":{"type":"boolean"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"username":{"type":"string"},"description":{"type":"string"},"participants_count":{"type":"number"},"is_verified":{"type":"boolean"},"is_scam":{"type":"boolean"},"is_fake":{"type":"boolean"},"photo":{"type":"object"},"type":{"type":"string","enum":["channel","supergroup","group"]}}}},"error":{"type":"string"}}},"GetChannelInfoResponse":{"type":"object","properties":{"success":{"type":"boolean"},"channel":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"username":{"type":"string"},"description":{"type":"string"},"participants_count":{"type":"number"},"is_verified":{"type":"boolean"},"is_scam":{"type":"boolean"},"is_fake":{"type":"boolean"},"photo":{"type":"object"},"type":{"type":"string","enum":["channel","supergroup","group"]},"date":{"type":"number"},"version":{"type":"number"},"admin_rights":{"type":"object"},"default_banned_rights":{"type":"object"}}},"error":{"type":"string"}},"example":{"success":true,"channel":{"id":"1234567890","title":"Example Channel","username":"example_channel","description":"This is an example channel","participants_count":1500,"is_verified":true,"is_scam":false,"is_fake":false,"photo":{"id":"1234567890123456789","dc_id":2},"type":"channel","date":1640995200,"version":1,"admin_rights":null,"default_banned_rights":{"view_messages":false,"send_messages":true,"send_media":true,"send_stickers":true,"send_gifs":true,"send_games":true,"send_inline":true,"embed_links":true,"send_polls":true,"change_info":false,"invite_users":false,"pin_messages":false}}}},"GetSimilarChannelsResponse":{"type":"object","properties":{"success":{"type":"boolean"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"username":{"type":"string"},"description":{"type":"string"},"participants_count":{"type":"number"},"is_verified":{"type":"boolean"},"is_scam":{"type":"boolean"},"is_fake":{"type":"boolean"},"photo":{"type":"object"},"type":{"type":"string","enum":["channel","supergroup","group"]}}}},"error":{"type":"string"}}},"GetDialogsResponse":{"type":"object","properties":{"success":{"type":"boolean"},"dialogs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"username":{"type":"string"},"type":{"type":"string","enum":["user","chat","channel","supergroup"]},"participants_count":{"type":"number"},"unread_count":{"type":"number"},"last_message":{"type":"object"},"photo":{"type":"object"}}}},"error":{"type":"string"}}},"CreateGroupResponse":{"type":"object","properties":{"success":{"type":"boolean"},"chat":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"participants_count":{"type":"number"},"date":{"type":"number"},"version":{"type":"number"},"migrated_to":{"type":"object"},"photo":{"type":"object"},"admin_rights":{"type":"object"},"default_banned_rights":{"type":"object"}}},"error":{"type":"string"}},"example":{"success":true,"chat":{"id":"1234567890","title":"Test Group","participants_count":2,"date":1640995200,"version":1,"migrated_to":null,"photo":{"className":"ChatPhotoEmpty"},"admin_rights":null,"default_banned_rights":{"view_messages":false,"send_messages":true,"send_media":true,"send_stickers":true,"send_gifs":true,"send_games":true,"send_inline":true,"embed_links":true,"send_polls":true,"change_info":false,"invite_users":false,"pin_messages":false}}}},"ArchiveChatResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}},"SendPhotoResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"object","properties":{"id":{"type":"number"},"text":{"type":"string"},"date":{"type":"number"},"from_id":{"type":"string"},"peer_id":{"type":"string"},"media":{"type":"object","properties":{"photo":{"type":"object"},"caption":{"type":"string"}}}}},"error":{"type":"string"}}},"SendDocumentResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"object","properties":{"id":{"type":"number"},"text":{"type":"string"},"date":{"type":"number"},"from_id":{"type":"string"},"peer_id":{"type":"string"},"media":{"type":"object","properties":{"document":{"type":"object"},"caption":{"type":"string"}}}}},"error":{"type":"string"}}},"DownloadMediaResponse":{"type":"object","properties":{"success":{"type":"boolean"},"file":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"number"},"mime_type":{"type":"string"},"data":{"type":"string","description":"Base64 encoded file data"}}},"error":{"type":"string"}}},"GetPaymentFormResponse":{"type":"object","properties":{"success":{"type":"boolean"},"form":{"type":"object","properties":{"form_id":{"type":"string"},"invoice":{"type":"object"},"can_save_credentials":{"type":"boolean"},"password_missing":{"type":"boolean"},"provider_id":{"type":"string"},"url":{"type":"string"},"native_provider":{"type":"string"},"native_params":{"type":"object"}}},"error":{"type":"string"}}},"CheckGiftCodeResponse":{"type":"object","properties":{"success":{"type":"boolean"},"gift_code":{"type":"object","properties":{"slug":{"type":"string"},"from_id":{"type":"string"},"to_id":{"type":"string"},"used_date":{"type":"number"},"gift":{"type":"object"}}},"error":{"type":"string"}}},"GetMessageHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Media object if present","nullable":true},"replyTo":{"type":"object","description":"Reply to message info","nullable":true}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"ClearHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"DeleteChatResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"GetChatAdminsResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"admins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Admin user ID"},"username":{"type":"string","description":"Admin username"},"firstName":{"type":"string","description":"Admin first name"},"lastName":{"type":"string","description":"Admin last name"},"isBot":{"type":"boolean","description":"Whether admin is a bot"},"canEdit":{"type":"boolean","description":"Can edit messages"},"canDelete":{"type":"boolean","description":"Can delete messages"},"canInvite":{"type":"boolean","description":"Can invite users"},"canRestrict":{"type":"boolean","description":"Can restrict users"},"canPin":{"type":"boolean","description":"Can pin messages"},"canPromote":{"type":"boolean","description":"Can promote users"}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetChatPhotoResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"photo":{"type":"object","properties":{"id":{"type":"string","description":"Photo ID"},"dcId":{"type":"number","description":"Data center ID"},"hasVideo":{"type":"boolean","description":"Whether photo has video"},"strippedThumb":{"type":"string","description":"Stripped thumbnail"}},"nullable":true},"error":{"type":"string","description":"Error message if operation failed"}}},"SendAlbumResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Media object","nullable":true}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SendStickerResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Sticker media object"}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SendVideoResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Video media object"}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SendVoiceResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"message":{"type":"object","properties":{"id":{"type":"number","description":"Message ID"},"text":{"type":"string","description":"Message text"},"date":{"type":"number","description":"Message timestamp"},"fromId":{"type":"string","description":"Sender user ID"},"peerId":{"type":"string","description":"Chat/peer ID"},"media":{"type":"object","description":"Voice media object"}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetMessageReactionsResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","description":"Reaction emoji"},"count":{"type":"number","description":"Number of reactions"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"username":{"type":"string","description":"Username"},"firstName":{"type":"string","description":"First name"}}}}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SetMessageReactionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"BlockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"UnblockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"error":{"type":"string","description":"Error message if operation failed"}}},"GetCommonChatsResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"chats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Chat ID"},"title":{"type":"string","description":"Chat title"},"type":{"type":"string","description":"Chat type"},"participantsCount":{"type":"number","description":"Number of participants"}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetUserStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"status":{"type":"object","properties":{"type":{"type":"string","description":"Status type (online, offline, recently, within_week, within_month, long_time_ago)"},"wasOnline":{"type":"number","description":"Last seen timestamp","nullable":true}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SearchUsersResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"username":{"type":"string","description":"Username"},"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"},"isBot":{"type":"boolean","description":"Whether user is a bot"},"isPremium":{"type":"boolean","description":"Whether user has Telegram Premium"}}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetGiveawayInfoResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"giveaway":{"type":"object","properties":{"id":{"type":"string","description":"Giveaway ID"},"title":{"type":"string","description":"Giveaway title"},"description":{"type":"string","description":"Giveaway description"},"participantsCount":{"type":"number","description":"Number of participants"},"winnersCount":{"type":"number","description":"Number of winners"},"endDate":{"type":"number","description":"End date timestamp"},"isActive":{"type":"boolean","description":"Whether giveaway is active"}}},"error":{"type":"string","description":"Error message if operation failed"}}},"GetPaymentReceiptResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"receipt":{"type":"object","properties":{"id":{"type":"string","description":"Receipt ID"},"date":{"type":"number","description":"Payment date"},"amount":{"type":"number","description":"Payment amount"},"currency":{"type":"string","description":"Payment currency"},"description":{"type":"string","description":"Payment description"},"provider":{"type":"string","description":"Payment provider"}}},"error":{"type":"string","description":"Error message if operation failed"}}},"SendPaymentFormResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the operation was successful"},"result":{"type":"object","properties":{"id":{"type":"string","description":"Payment ID"},"status":{"type":"string","description":"Payment status"},"receipt":{"type":"object","description":"Payment receipt"}}},"error":{"type":"string","description":"Error message if operation failed"}}}}},"tags":[{"name":"Authentication","description":"Session validation and user authentication"},{"name":"Users","description":"User management and profile operations"},{"name":"Channels","description":"Channel operations and management"},{"name":"Chats","description":"Chat and group management"},{"name":"Messages","description":"Message sending, forwarding, and management"},{"name":"Media","description":"Media upload, download, and management"},{"name":"Payments","description":"Payment processing and gift codes"}],"paths":{"/api/validate-session":{"post":{"tags":["Authentication"],"summary":"Validate Telegram Session","description":"Validates a Telegram session and returns detailed user information","operationId":"validateSession","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/get-users":{"post":{"tags":["Users"],"summary":"Get Users","description":"Get information about multiple users by their IDs","operationId":"getUsers","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Array of user IDs to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUsersResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/get-user-photos":{"post":{"tags":["Users"],"summary":"Get User Photos","description":"Get photos from a user's profile","operationId":"getUserPhotos","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","default":10,"description":"Number of photos to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/get-blocked-users":{"post":{"tags":["Users"],"summary":"Get Blocked Users","description":"Get list of blocked users","operationId":"getBlockedUsers","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","default":100,"description":"Number of blocked users to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/update-profile":{"post":{"tags":["Users"],"summary":"Update Profile","description":"Update user profile information","operationId":"updateProfile","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"},"about":{"type":"string","description":"About/bio text"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/get-similar-channels":{"post":{"tags":["Channels"],"summary":"Get Similar Channels","description":"Get channels similar to a specified channel","operationId":"getSimilarChannels","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"Channel ID to find similar channels for"},"limit":{"type":"integer","default":10,"description":"Number of similar channels to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSimilarChannelsResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/get-channel-info":{"post":{"tags":["Channels"],"summary":"Get Channel Info","description":"Get detailed information about a channel","operationId":"getChannelInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"Channel ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChannelInfoResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/get-channel-participants":{"post":{"tags":["Channels"],"summary":"Get Channel Participants","description":"Get participants of a channel","operationId":"getChannelParticipants","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"Channel ID"},"limit":{"type":"integer","default":100,"description":"Number of participants to retrieve"},"filter":{"type":"string","enum":["all","admins","kicked","bots","recent"],"default":"all","description":"Filter type for participants"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/search-channels":{"post":{"tags":["Channels"],"summary":"Search Channels","description":"Search for channels by query","operationId":"searchChannels","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"limit":{"type":"integer","default":20,"description":"Number of results to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchChannelsResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/join-channel":{"post":{"tags":["Channels"],"summary":"Join Channel","description":"Join a channel","operationId":"joinChannel","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"Channel ID to join"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/channels/leave-channel":{"post":{"tags":["Channels"],"summary":"Leave Channel","description":"Leave a channel","operationId":"leaveChannel","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["channelId"],"properties":{"channelId":{"type":"string","description":"Channel ID to leave"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/get-dialogs":{"post":{"tags":["Chats"],"summary":"Get Dialogs","description":"Get all dialogs/chats","operationId":"getDialogs","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","default":100,"description":"Number of dialogs to retrieve"},"offsetDate":{"type":"integer","description":"Offset date for pagination"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDialogsResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/create-group":{"post":{"tags":["Chats"],"summary":"Create Group","description":"Create a new group chat","operationId":"createGroup","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","users"],"properties":{"title":{"type":"string","description":"Group title"},"users":{"type":"array","items":{"type":"string"},"description":"Array of user IDs to add to the group"},"about":{"type":"string","description":"Group description"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/archive-chat":{"post":{"tags":["Chats"],"summary":"Archive Chat","description":"Archive or unarchive a chat","operationId":"archiveChat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"archive":{"type":"boolean","default":true,"description":"Whether to archive (true) or unarchive (false)"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveChatResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/mute-chat":{"post":{"tags":["Chats"],"summary":"Mute Chat","description":"Mute or unmute a chat","operationId":"muteChat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"muteUntil":{"oneOf":[{"type":"integer","description":"Unix timestamp"},{"type":"string","enum":["forever"],"description":"Mute forever"}],"description":"Mute until timestamp or 'forever'"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/get-common-chats":{"post":{"tags":["Chats"],"summary":"Get Common Chats","description":"Get common chats with a user","operationId":"getCommonChats","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","default":100,"description":"Number of chats to retrieve"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/report-chat":{"post":{"tags":["Chats"],"summary":"Report Chat","description":"Report a chat for violations","operationId":"reportChat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","reason"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"reason":{"type":"string","enum":["spam","violence","pornography","child_abuse","copyright","illegal_drugs","personal_details","other"],"description":"Report reason"},"comment":{"type":"string","description":"Additional comment"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/send-message":{"post":{"tags":["Messages"],"summary":"Send Message","description":"Send a message to a chat","operationId":"sendMessage","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","message"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"message":{"type":"string","description":"Message text"},"replyTo":{"type":"integer","description":"Message ID to reply to"},"parseMode":{"type":"string","description":"Parse mode for message formatting"},"linkPreview":{"type":"boolean","default":true,"description":"Enable link preview"},"silent":{"type":"boolean","default":false,"description":"Send silently"},"scheduleDate":{"type":"integer","description":"Schedule message for later (Unix timestamp)"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/forward-messages":{"post":{"tags":["Messages"],"summary":"Forward Messages","description":"Forward messages from one chat to another","operationId":"forwardMessages","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fromChatId","toChatId","messageIds"],"properties":{"fromChatId":{"type":"string","description":"Source chat ID"},"toChatId":{"type":"string","description":"Destination chat ID"},"messageIds":{"type":"array","items":{"type":"integer"},"description":"Array of message IDs to forward"},"silent":{"type":"boolean","default":false,"description":"Forward silently"},"dropAuthor":{"type":"boolean","default":false,"description":"Remove author information"},"dropMediaCaptions":{"type":"boolean","default":false,"description":"Remove media captions"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/delete-messages":{"post":{"tags":["Messages"],"summary":"Delete Messages","description":"Delete messages from a chat","operationId":"deleteMessages","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","messageIds"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageIds":{"type":"array","items":{"type":"integer"},"description":"Array of message IDs to delete"},"revoke":{"type":"boolean","default":true,"description":"Revoke messages for all users"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/pin-message":{"post":{"tags":["Messages"],"summary":"Pin Message","description":"Pin or unpin a message in a chat","operationId":"pinMessage","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","messageId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageId":{"type":"integer","description":"Message ID to pin"},"silent":{"type":"boolean","default":false,"description":"Pin silently"},"unpin":{"type":"boolean","default":false,"description":"Unpin the message"},"pmOneside":{"type":"boolean","default":false,"description":"Pin for one side only"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/get-pinned-messages":{"post":{"tags":["Messages"],"summary":"Get Pinned Messages","description":"Get pinned messages from a chat","operationId":"getPinnedMessages","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/mark-as-read":{"post":{"tags":["Messages"],"summary":"Mark as Read","description":"Mark messages as read","operationId":"markAsRead","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageIds":{"type":"array","items":{"type":"integer"},"description":"Array of message IDs to mark as read"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/send-typing":{"post":{"tags":["Messages"],"summary":"Send Typing","description":"Send typing indicator","operationId":"sendTyping","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"action":{"type":"string","enum":["typing","cancel","recording","upload_photo","upload_video","upload_audio","upload_document"],"default":"typing","description":"Typing action type"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/download-media":{"post":{"tags":["Media"],"summary":"Download Media","description":"Download media from a message","operationId":"downloadMedia","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messageOrMedia"],"properties":{"messageOrMedia":{"type":"object","description":"Message or media object"},"outputPath":{"type":"string","description":"Output file path"},"progressCallback":{"type":"boolean","description":"Enable progress callback"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadMediaResponse"}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/get-file-info":{"post":{"tags":["Media"],"summary":"Get File Info","description":"Get information about a file","operationId":"getFileInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fileLocation"],"properties":{"fileLocation":{"type":"object","description":"File location object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/set-chat-photo":{"post":{"tags":["Media"],"summary":"Set Chat Photo","description":"Set a photo for a chat","operationId":"setChatPhoto","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","photo"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"photo":{"type":"string","description":"Photo data (base64 or buffer)"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/delete-chat-photo":{"post":{"tags":["Media"],"summary":"Delete Chat Photo","description":"Delete a chat's photo","operationId":"deleteChatPhoto","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-payment-form":{"post":{"tags":["Payments"],"summary":"Get Payment Form","description":"Get payment form for an invoice","operationId":"getPaymentForm","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice"],"properties":{"invoice":{"type":"object","description":"Invoice object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/send-payment-form":{"post":{"tags":["Payments"],"summary":"Send Payment Form","description":"Send payment form","operationId":"sendPaymentForm","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["formId","invoice"],"properties":{"formId":{"type":"string","description":"Payment form ID"},"invoice":{"type":"object","description":"Invoice object"},"requestedInfoId":{"type":"string","description":"Requested info ID"},"shippingOptionId":{"type":"string","description":"Shipping option ID"},"credentials":{"type":"object","description":"Payment credentials"},"tipAmount":{"type":"number","description":"Tip amount"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-payment-receipt":{"post":{"tags":["Payments"],"summary":"Get Payment Receipt","description":"Get payment receipt","operationId":"getPaymentReceipt","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["msgId"],"properties":{"msgId":{"type":"integer","description":"Message ID"},"peer":{"type":"object","description":"Peer object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-saved-info":{"post":{"tags":["Payments"],"summary":"Get Saved Info","description":"Get saved payment information","operationId":"getSavedInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/clear-saved-info":{"post":{"tags":["Payments"],"summary":"Clear Saved Info","description":"Clear saved payment information","operationId":"clearSavedInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"info":{"type":"boolean","description":"Clear info"},"credentials":{"type":"boolean","description":"Clear credentials"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-bank-card-data":{"post":{"tags":["Payments"],"summary":"Get Bank Card Data","description":"Get bank card data","operationId":"getBankCardData","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["number"],"properties":{"number":{"type":"string","description":"Bank card number"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/validate-requested-info":{"post":{"tags":["Payments"],"summary":"Validate Requested Info","description":"Validate requested payment information","operationId":"validateRequestedInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice","info"],"properties":{"invoice":{"type":"object","description":"Invoice object"},"info":{"type":"object","description":"Info object"},"save":{"type":"boolean","description":"Save the info"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/export-invoice":{"post":{"tags":["Payments"],"summary":"Export Invoice","description":"Export invoice as URL","operationId":"exportInvoice","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoiceMedia"],"properties":{"invoiceMedia":{"type":"object","description":"Invoice media object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-premium-gift-code-options":{"post":{"tags":["Payments"],"summary":"Get Premium Gift Code Options","description":"Get premium gift code options","operationId":"getPremiumGiftCodeOptions","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"boostPeer":{"type":"object","description":"Boost peer object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/check-gift-code":{"post":{"tags":["Payments"],"summary":"Check Gift Code","description":"Check a gift code","operationId":"checkGiftCode","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","description":"Gift code slug"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/apply-gift-code":{"post":{"tags":["Payments"],"summary":"Apply Gift Code","description":"Apply a gift code","operationId":"applyGiftCode","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","description":"Gift code slug"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/get-giveaway-info":{"post":{"tags":["Payments"],"summary":"Get Giveaway Info","description":"Get giveaway information","operationId":"getGiveawayInfo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["peer","msgId"],"properties":{"peer":{"type":"object","description":"Peer object"},"msgId":{"type":"integer","description":"Message ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payments/launch-prepaid-giveaway":{"post":{"tags":["Payments"],"summary":"Launch Prepaid Giveaway","description":"Launch a prepaid giveaway","operationId":"launchPrepaidGiveaway","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["peer","giveawayId","purpose"],"properties":{"peer":{"type":"object","description":"Peer object"},"giveawayId":{"type":"string","description":"Giveaway ID"},"purpose":{"type":"object","description":"Purpose object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{}}]}}}},"400":{"description":"Bad request - Missing required headers or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized - Invalid Telegram credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/get-messages":{"post":{"summary":"Get Messages","description":"Get specific messages by IDs or with advanced filtering","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"limit":{"type":"number","default":100,"description":"Number of messages to retrieve"},"offsetId":{"type":"number","description":"Offset message ID"},"offsetDate":{"type":"number","description":"Offset date"},"addOffset":{"type":"number","description":"Additional offset"},"maxId":{"type":"number","description":"Maximum message ID"},"minId":{"type":"number","description":"Minimum message ID"},"search":{"type":"string","description":"Search query"},"fromUser":{"type":"string","description":"Filter by user ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"":"#/components/schemas/GetMessagesResponse"}}}}}}},"/api/messages/get-message-history":{"post":{"summary":"Get Message History","description":"Get message history for a chat","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"limit":{"type":"number","default":100,"description":"Number of messages to retrieve"},"offsetId":{"type":"number","description":"Offset message ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"":"#/components/schemas/GetMessagesResponse"}}}}}}},"/api/messages/edit-message":{"post":{"summary":"Edit Message","description":"Edit an existing message","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","messageId","newText"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageId":{"type":"number","description":"Message ID to edit"},"newText":{"type":"string","description":"New message text"},"parseMode":{"type":"string","enum":["md","html"],"description":"Parse mode"},"linkPreview":{"type":"boolean","description":"Enable link preview"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"":"#/components/schemas/EditMessageResponse"}}}}}}},"/api/chats/clear-history":{"post":{"summary":"Clear Chat History","description":"Clear message history for a chat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearHistoryResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/delete-chat":{"post":{"summary":"Delete Chat","description":"Delete a chat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChatResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/chats/get-chat-admins":{"post":{"summary":"Get Chat Admins","description":"Get list of chat administrators","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatAdminsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/get-chat-photo":{"post":{"summary":"Get Chat Photo","description":"Get chat profile photo","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId"],"properties":{"chatId":{"type":"string","description":"Chat ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatPhotoResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/send-album":{"post":{"summary":"Send Album","description":"Send multiple photos as an album","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","photos"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"photos":{"type":"array","items":{"type":"string"},"description":"Array of photo URLs or file paths"},"caption":{"type":"string","description":"Album caption"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendAlbumResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/send-sticker":{"post":{"summary":"Send Sticker","description":"Send a sticker to a chat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","sticker"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"sticker":{"type":"string","description":"Sticker file path or URL"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendStickerResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/send-video":{"post":{"summary":"Send Video","description":"Send a video to a chat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","video"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"video":{"type":"string","description":"Video file path or URL"},"caption":{"type":"string","description":"Video caption"},"duration":{"type":"number","description":"Video duration in seconds"},"width":{"type":"number","description":"Video width"},"height":{"type":"number","description":"Video height"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendVideoResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/media/send-voice":{"post":{"summary":"Send Voice Message","description":"Send a voice message to a chat","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","voice"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"voice":{"type":"string","description":"Voice file path or URL"},"duration":{"type":"number","description":"Voice duration in seconds"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendVoiceResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/get-message-reactions":{"post":{"summary":"Get Message Reactions","description":"Get reactions for a specific message","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","messageId"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageId":{"type":"number","description":"Message ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessageReactionsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/messages/set-message-reaction":{"post":{"summary":"Set Message Reaction","description":"Set reaction on a specific message","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["chatId","messageId","reaction"],"properties":{"chatId":{"type":"string","description":"Chat ID"},"messageId":{"type":"number","description":"Message ID"},"reaction":{"type":"string","description":"Reaction emoji"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMessageReactionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/block-user":{"post":{"summary":"Block User","description":"Block a user","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"User ID to block"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/unblock-user":{"post":{"summary":"Unblock User","description":"Unblock a user","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"User ID to unblock"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockUserResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/get-common-chats":{"post":{"summary":"Get Common Chats","description":"Get common chats with a user","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"User ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCommonChatsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/get-user-status":{"post":{"summary":"Get User Status","description":"Get user online status","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"User ID"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserStatusResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/search-users":{"post":{"summary":"Search Users","description":"Search for users by query","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query"},"limit":{"type":"number","default":20,"description":"Maximum number of results"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/users/validate-session":{"post":{"summary":"Validate Session","description":"Validate Telegram session and get user info","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSessionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payment/check-gift-code":{"post":{"summary":"Check Gift Code","description":"Check if a gift code is valid","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Gift code to check"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckGiftCodeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payment/get-giveaway-info":{"post":{"summary":"Get Giveaway Info","description":"Get information about a giveaway","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["peer","msgId"],"properties":{"peer":{"type":"string","description":"Channel or chat ID"},"msgId":{"type":"number","description":"Message ID containing giveaway"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetGiveawayInfoResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payment/get-payment-form":{"post":{"summary":"Get Payment Form","description":"Get payment form for an invoice","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice"],"properties":{"invoice":{"type":"object","description":"Invoice object"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentFormResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payment/get-payment-receipt":{"post":{"summary":"Get Payment Receipt","description":"Get payment receipt for a completed payment","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["msgId"],"properties":{"msgId":{"type":"number","description":"Message ID of payment"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentReceiptResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}},"/api/payment/send-payment-form":{"post":{"summary":"Send Payment Form","description":"Submit payment form for an invoice","security":[{"TelegramAuth":[]}],"parameters":[{"name":"X-Api-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API ID"},{"name":"X-Api-Hash","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram API Hash"},{"name":"X-Session-String","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram session string"},{"name":"X-User-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Telegram user ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["formId","invoice","credentials"],"properties":{"formId":{"type":"string","description":"Payment form ID"},"invoice":{"type":"object","description":"Invoice object"},"credentials":{"type":"object","description":"Payment credentials"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentFormResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponse"}}}}}}}}}