{"openapi":"3.1.0","info":{"title":"tgpost.ing","version":"0.1.0"},"paths":{"/api/ai/quota":{"get":{"tags":["ai"],"summary":"Get Quota","operationId":"get_quota_api_ai_quota_get","parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/edit":{"post":{"tags":["ai"],"summary":"Edit","operationId":"edit_api_ai_edit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/link":{"post":{"tags":["ai"],"summary":"Link","operationId":"link_api_ai_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/plan":{"post":{"tags":["ai"],"summary":"Plan","operationId":"plan_api_ai_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/pack":{"post":{"tags":["ai"],"summary":"Buy Pack","description":"Invoice link for a pack of requests: stars or crypto (@CryptoBot). Only on plans with AI.","operationId":"buy_pack_api_ai_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/report/{token}":{"get":{"tags":["public"],"summary":"Ad Report","operationId":"ad_report_api_public_report__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/imports":{"get":{"tags":["imports"],"summary":"All Sources","description":"Import sources of every channel the user administers.","operationId":"all_sources_api_imports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/channels/{channel_id}/imports":{"get":{"tags":["imports"],"summary":"List Sources","operationId":"list_sources_api_channels__channel_id__imports_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["imports"],"summary":"Add Source","operationId":"add_source_api_channels__channel_id__imports_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/imports/{source_id}":{"patch":{"tags":["imports"],"summary":"Edit Source","operationId":"edit_source_api_channels__channel_id__imports__source_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["imports"],"summary":"Remove Source","operationId":"remove_source_api_channels__channel_id__imports__source_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/suggested":{"get":{"tags":["suggested"],"summary":"List Suggested","operationId":"list_suggested_api_suggested_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/suggested/{sid}":{"post":{"tags":["suggested"],"summary":"Decide","operationId":"decide_api_suggested__sid__post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"integer","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/telegram":{"post":{"tags":["auth"],"summary":"Auth Telegram","description":"Sign in from inside the Telegram Mini App — no code, no confirmation: Telegram signs the user data.","operationId":"auth_telegram_api_auth_telegram_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/start":{"post":{"tags":["auth"],"summary":"Auth Start","operationId":"auth_start_api_auth_start_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuthStart"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/site-link":{"post":{"tags":["auth"],"summary":"Auth Site Link","description":"«Открыть сайт» in the Mini App: a one-time link that signs the same user in on the website.\n\nThe token is confirmed at once (the user is already signed in here); /login?t=… redeems it via /auth/check —\nonce, within 10 minutes.","operationId":"auth_site_link_api_auth_site_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/check":{"get":{"tags":["auth"],"summary":"Auth Check","operationId":"auth_check_api_auth_check_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["auth"],"summary":"Me Patch","operationId":"me_patch_api_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MePatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/watch":{"get":{"tags":["auth"],"summary":"Watch List","description":"Competitor channels the user follows, read from their public web pages (watch.py).","operationId":"watch_list_api_watch_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/config":{"get":{"tags":["auth"],"summary":"Public Config","operationId":"public_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/plans":{"get":{"tags":["auth"],"summary":"Plans","operationId":"plans_api_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/team":{"get":{"tags":["team"],"summary":"Team","operationId":"team_api_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/team/invites":{"post":{"tags":["team"],"summary":"Create Invite","operationId":"create_invite_api_team_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__team__InviteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/invites/{token}":{"delete":{"tags":["team"],"summary":"Delete Invite","operationId":"delete_invite_api_team_invites__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["team"],"summary":"Invite Info","operationId":"invite_info_api_team_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/invites/{token}/accept":{"post":{"tags":["team"],"summary":"Invite Accept","operationId":"invite_accept_api_team_invites__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/{helper_id}":{"put":{"tags":["team"],"summary":"Set Access","operationId":"set_access_api_team__helper_id__put","parameters":[{"name":"helper_id","in":"path","required":true,"schema":{"type":"integer","title":"Helper Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Access"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["team"],"summary":"Remove Helper","operationId":"remove_helper_api_team__helper_id__delete","parameters":[{"name":"helper_id","in":"path","required":true,"schema":{"type":"integer","title":"Helper Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bots":{"get":{"tags":["bots"],"summary":"List Bots","operationId":"list_bots_api_bots_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["bots"],"summary":"Add Bot","operationId":"add_bot_api_bots_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bots/{bot_ref}/scan":{"post":{"tags":["bots"],"summary":"Rescan","operationId":"rescan_api_bots__bot_ref__scan_post","parameters":[{"name":"bot_ref","in":"path","required":true,"schema":{"type":"integer","title":"Bot Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bots/{bot_ref}":{"delete":{"tags":["bots"],"summary":"Remove Bot","operationId":"remove_bot_api_bots__bot_ref__delete","parameters":[{"name":"bot_ref","in":"path","required":true,"schema":{"type":"integer","title":"Bot Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels":{"get":{"tags":["channels"],"summary":"List Channels","operationId":"list_channels_api_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/channels/order":{"put":{"tags":["channels"],"summary":"Set Order","description":"Save the user's own order of channels and chats (used everywhere in the panel).","operationId":"set_order_api_channels_order_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/add-links":{"get":{"tags":["channels"],"summary":"Add Links","operationId":"add_links_api_channels_add_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/channels/connect":{"post":{"tags":["channels"],"summary":"Connect Channel","operationId":"connect_channel_api_channels_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/refresh":{"post":{"tags":["channels"],"summary":"Refresh Channel","operationId":"refresh_channel_api_channels__channel_id__refresh_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/photo":{"get":{"tags":["channels"],"summary":"Channel Photo","operationId":"channel_photo_api_channels__channel_id__photo_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/discover":{"get":{"tags":["channels"],"summary":"Discover","description":"Chats the service bot / the user's own bots were added to, where the user is an admin.","operationId":"discover_api_channels_discover_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["channels"],"summary":"Discover Connect","operationId":"discover_connect_api_channels_discover_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/bot":{"put":{"tags":["channels"],"summary":"Choose Bot","description":"Pick which bot publishes into the channel (own bot or the service bot).","operationId":"choose_bot_api_channels__channel_id__bot_put","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotChoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/join-requests":{"get":{"tags":["channels"],"summary":"Join Requests","operationId":"join_requests_api_channels__channel_id__join_requests_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/join-requests/decide":{"post":{"tags":["channels"],"summary":"Decide Join Requests","operationId":"decide_join_requests_api_channels__channel_id__join_requests_decide_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/export":{"get":{"tags":["channels"],"summary":"Export Channel","description":"Backup: every post of the channel made in the service — posts.json, posts.html and the media files, zipped.","operationId":"export_channel_api_channels__channel_id__export_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/copy-settings":{"post":{"tags":["channels"],"summary":"Copy Settings","description":"Copy one block of settings (template, link shortening, watermark, queue slots) to other channels.","operationId":"copy_settings_api_channels__channel_id__copy_settings_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}":{"patch":{"tags":["channels"],"summary":"Patch Channel","operationId":"patch_channel_api_channels__channel_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["channels"],"summary":"Remove Channel","operationId":"remove_channel_api_channels__channel_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"leave","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Leave"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/members":{"get":{"tags":["channels"],"summary":"Members","operationId":"members_api_channels__channel_id__members_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/members/{member_id}":{"patch":{"tags":["channels"],"summary":"Set Role","operationId":"set_role_api_channels__channel_id__members__member_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["channels"],"summary":"Remove Member","operationId":"remove_member_api_channels__channel_id__members__member_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/invites":{"post":{"tags":["channels"],"summary":"Create Invite","operationId":"create_invite_api_channels__channel_id__invites_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__channels__InviteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invites/{token}":{"get":{"tags":["channels"],"summary":"Invite Info","operationId":"invite_info_api_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invites/{token}/accept":{"post":{"tags":["channels"],"summary":"Invite Accept","operationId":"invite_accept_api_invites__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/short-links":{"post":{"tags":["channels"],"summary":"Make Short Link","operationId":"make_short_link_api_channels__channel_id__short_links_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortLinkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["channels"],"summary":"Recent Short Links","description":"Hand-made links of the channel not used in a post yet (the newest first).","operationId":"recent_short_links_api_channels__channel_id__short_links_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts":{"get":{"tags":["posts"],"summary":"List Posts","operationId":"list_posts_api_posts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Id"}},{"name":"channel_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Ids"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["posts"],"summary":"Create Post","operationId":"create_post_api_posts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/summary":{"get":{"tags":["posts"],"summary":"Summary","operationId":"summary_api_posts_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/posts/{post_id}":{"get":{"tags":["posts"],"summary":"Get Post","operationId":"get_post_api_posts__post_id__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["posts"],"summary":"Update Post","operationId":"update_post_api_posts__post_id__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["posts"],"summary":"Delete Post","operationId":"delete_post_api_posts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}},{"name":"from_channels","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"From Channels"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/check-duplicate":{"post":{"tags":["posts"],"summary":"Check Duplicate","description":"The editor asks before scheduling: is the same text already published / scheduled in these channels?","operationId":"check_duplicate_api_posts_check_duplicate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DupIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/refresh-preview":{"post":{"tags":["posts"],"summary":"Refresh Preview","description":"«Проверить» in the editor: what {data} would become right now.","operationId":"refresh_preview_api_posts_refresh_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshCheck"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/next-slot":{"post":{"tags":["posts"],"summary":"Next Slot","description":"Nearest free queue slot(s) of the selected channels (slots.py).","operationId":"next_slot_api_posts_next_slot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/bulk":{"post":{"tags":["posts"],"summary":"Bulk Create","description":"Many text posts at once: into the queue slots, as drafts, or at the times given per item.","operationId":"bulk_create_api_posts_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/publish":{"post":{"tags":["posts"],"summary":"Publish Now","operationId":"publish_now_api_posts__post_id__publish_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/unschedule":{"post":{"tags":["posts"],"summary":"Unschedule","operationId":"unschedule_api_posts__post_id__unschedule_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/duplicate":{"post":{"tags":["posts"],"summary":"Duplicate","operationId":"duplicate_api_posts__post_id__duplicate_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/targets/{target_id}/delete":{"post":{"tags":["posts"],"summary":"Delete From Channel","operationId":"delete_from_channel_api_posts__post_id__targets__target_id__delete_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"integer","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/views":{"post":{"tags":["posts"],"summary":"Refresh Views","description":"Update view counters of this post right now (public channels only, at most once a minute).","operationId":"refresh_views_api_posts__post_id__views_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/comments":{"get":{"tags":["posts"],"summary":"List Comments","operationId":"list_comments_api_posts__post_id__comments_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["posts"],"summary":"Add Comment","description":"Comment a post; the author and everyone else in the discussion get it in the bot.","operationId":"add_comment_api_posts__post_id__comments_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/comments/{comment_id}":{"delete":{"tags":["posts"],"summary":"Delete Comment","operationId":"delete_comment_api_posts__post_id__comments__comment_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/report":{"post":{"tags":["posts"],"summary":"Make Report Link","description":"Public link with the stats of an ad post for the advertiser (Pro and Business).","operationId":"make_report_link_api_posts__post_id__report_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["posts"],"summary":"Drop Report Link","operationId":"drop_report_link_api_posts__post_id__report_delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/giveaway":{"get":{"tags":["posts"],"summary":"Giveaway Info","operationId":"giveaway_info_api_posts__post_id__giveaway_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/links":{"get":{"tags":["posts"],"summary":"Post Links","description":"Short links of this post and their clicks.","operationId":"post_links_api_posts__post_id__links_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/reactions":{"get":{"tags":["posts"],"summary":"Reactions","operationId":"reactions_api_posts__post_id__reactions_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media":{"post":{"tags":["media"],"summary":"Upload","operationId":"upload_api_media_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_media_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/{media_id}":{"patch":{"tags":["media"],"summary":"Change Kind","operationId":"change_kind_api_media__media_id__patch","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"integer","title":"Media Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_change_kind_api_media__media_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/{media_id}/file":{"get":{"tags":["media"],"summary":"Get File","operationId":"get_file_api_media__media_id__file_get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"integer","title":"Media Id"}},{"name":"sig","in":"query","required":true,"schema":{"type":"string","title":"Sig"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/stats":{"get":{"tags":["stats"],"summary":"Channel Stats","operationId":"channel_stats_api_channels__channel_id__stats_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invite-links":{"get":{"tags":["stats"],"summary":"All Invite Links","description":"Ad invite links of every channel the user administers — one table for all channels.","operationId":"all_invite_links_api_invite_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/channels/{channel_id}/invite-links":{"get":{"tags":["stats"],"summary":"Invite Links","operationId":"invite_links_api_channels__channel_id__invite_links_get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["stats"],"summary":"Create Invite Link","operationId":"create_invite_link_api_channels__channel_id__invite_links_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__stats__InviteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/invite-links/{link_id}":{"patch":{"tags":["stats"],"summary":"Edit Invite Link","operationId":"edit_invite_link_api_channels__channel_id__invite_links__link_id__patch","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__stats__InviteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/invite-links/{link_id}/revoke":{"post":{"tags":["stats"],"summary":"Revoke Invite Link","operationId":"revoke_invite_link_api_channels__channel_id__invite_links__link_id__revoke_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"integer","title":"Channel Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"integer","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/summary":{"get":{"tags":["stats"],"summary":"Admin Summary","operationId":"admin_summary_api_admin_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/ads":{"get":{"tags":["stats"],"summary":"Admin Ads","description":"Ad tags report: t.me/<bot>?startapp=ad_<tag> → visits, new users, channels, payments (ads.py).","operationId":"admin_ads_api_admin_ads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/signups":{"get":{"tags":["stats"],"summary":"Admin Signups","description":"Who registered and where from (signups.py): the list with IPs and the summary. Superadmin only.","operationId":"admin_signups_api_admin_signups_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"tags":["stats"],"summary":"Admin Users","operationId":"admin_users_api_admin_users_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/ai-usage":{"get":{"tags":["stats"],"summary":"Admin Ai Usage","description":"AI spend: requests and tokens, estimated cost in $, by action / day / client, packs sold (ai.py).","operationId":"admin_ai_usage_api_admin_ai_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}":{"patch":{"tags":["stats"],"summary":"Admin User Patch","operationId":"admin_user_patch_api_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/media":{"get":{"tags":["stats"],"summary":"Media Stats","operationId":"media_stats_api_admin_media_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/media/cleanup":{"post":{"tags":["stats"],"summary":"Media Cleanup","operationId":"media_cleanup_api_admin_media_cleanup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/invoice":{"post":{"tags":["billing"],"summary":"Invoice","operationId":"invoice_api_billing_invoice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/crypto":{"post":{"tags":["billing"],"summary":"Crypto Invoice","operationId":"crypto_invoice_api_billing_crypto_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/card":{"post":{"tags":["billing"],"summary":"Card Checkout","operationId":"card_checkout_api_billing_card_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/subscription":{"get":{"tags":["billing"],"summary":"Card Subscription","operationId":"card_subscription_api_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/card/portal":{"post":{"tags":["billing"],"summary":"Card Portal","operationId":"card_portal_api_billing_card_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/creem/webhook":{"post":{"tags":["billing"],"summary":"Creem Webhook","description":"Creem → us. Signed with the webhook secret (header creem-signature, HMAC-SHA256 of the raw body).","operationId":"creem_webhook_api_billing_creem_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/payments":{"get":{"tags":["billing"],"summary":"My Payments","operationId":"my_payments_api_billing_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/payments":{"get":{"tags":["billing"],"summary":"All Payments","operationId":"all_payments_api_admin_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/payments/{payment_id}/refund":{"post":{"tags":["billing"],"summary":"Refund Payment","operationId":"refund_payment_api_admin_payments__payment_id__refund_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/special-plans":{"get":{"tags":["billing"],"summary":"Special Plans","operationId":"special_plans_api_admin_special_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/users/{user_id}/grant":{"post":{"tags":["billing"],"summary":"Grant","operationId":"grant_api_admin_users__user_id__grant_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/ai-requests":{"post":{"tags":["billing"],"summary":"Grant Ai","description":"Add AI requests by hand (paid to the admin in rubles / euro / USDT, or a gift). They do not expire.","operationId":"grant_ai_api_admin_users__user_id__ai_requests_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiGrantIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/revoke":{"post":{"tags":["billing"],"summary":"Revoke","operationId":"revoke_api_admin_users__user_id__revoke_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback":{"get":{"tags":["feedback"],"summary":"My Feedback","operationId":"my_feedback_api_feedback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["feedback"],"summary":"Send Feedback","operationId":"send_feedback_api_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feedback":{"get":{"tags":["feedback"],"summary":"Admin Feedback","operationId":"admin_feedback_api_admin_feedback_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feedback/{fb_id}/answer":{"post":{"tags":["feedback"],"summary":"Admin Answer","operationId":"admin_answer_api_admin_feedback__fb_id__answer_post","parameters":[{"name":"fb_id","in":"path","required":true,"schema":{"type":"integer","title":"Fb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feedback/{fb_id}":{"patch":{"tags":["feedback"],"summary":"Admin Status","operationId":"admin_status_api_admin_feedback__fb_id__patch","parameters":[{"name":"fb_id","in":"path","required":true,"schema":{"type":"integer","title":"Fb Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Access":{"properties":{"role":{"type":"string","title":"Role","default":"editor"},"all_channels":{"type":"boolean","title":"All Channels","default":true},"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids","default":[]}},"type":"object","title":"Access"},"AdminUserPatch":{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"plan_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Days"},"is_blocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Blocked"}},"type":"object","title":"AdminUserPatch"},"AiGrantIn":{"properties":{"requests":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Requests"},"pack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"notify":{"type":"boolean","title":"Notify","default":true}},"type":"object","required":["requests"],"title":"AiGrantIn"},"AnswerIn":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"AnswerIn"},"AuthStart":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"AuthStart"},"Body_change_kind_api_media__media_id__patch":{"properties":{"kind":{"type":"string","title":"Kind"}},"type":"object","required":["kind"],"title":"Body_change_kind_api_media__media_id__patch"},"Body_upload_api_media_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},"type":"object","required":["file"],"title":"Body_upload_api_media_post"},"BotChoice":{"properties":{"bot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bot Id"}},"type":"object","title":"BotChoice"},"BotIn":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"BotIn"},"BulkIn":{"properties":{"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids"},"items":{"items":{"$ref":"#/components/schemas/BulkItem"},"type":"array","title":"Items"},"mode":{"type":"string","pattern":"^(queue|draft|times)$","title":"Mode","default":"queue"}},"type":"object","required":["channel_ids","items"],"title":"BulkIn"},"BulkItem":{"properties":{"text":{"type":"string","title":"Text","default":""},"publish_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publish At"}},"type":"object","title":"BulkItem"},"Button":{"properties":{"text":{"type":"string","title":"Text","default":""},"url":{"type":"string","title":"Url","default":""},"copy":{"type":"string","title":"Copy","default":""},"style":{"type":"string","title":"Style","default":""}},"type":"object","title":"Button"},"CardIn":{"properties":{"plan":{"type":"string","title":"Plan"},"period":{"type":"string","title":"Period","default":"month"}},"type":"object","required":["plan"],"title":"CardIn"},"ChannelPatch":{"properties":{"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","title":"ChannelPatch"},"CommentIn":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"CommentIn"},"ConnectIn":{"properties":{"chat":{"type":"string","title":"Chat","description":"@username, t.me link or numeric id"}},"type":"object","required":["chat"],"title":"ConnectIn"},"CopyIn":{"properties":{"group":{"type":"string","pattern":"^(template|links|watermark|slots|joins)$","title":"Group"},"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids"}},"type":"object","required":["group","channel_ids"],"title":"CopyIn"},"DecideIn":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"approve":{"type":"boolean","title":"Approve","default":true}},"type":"object","required":["ids"],"title":"DecideIn"},"DecisionIn":{"properties":{"approve":{"type":"boolean","title":"Approve"},"when":{"type":"string","title":"When","default":"asked"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["approve"],"title":"DecisionIn"},"DiscoverIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DiscoverItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"DiscoverIn"},"DiscoverItem":{"properties":{"chat_id":{"type":"integer","title":"Chat Id"},"bot_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bot Id"}},"type":"object","required":["chat_id"],"title":"DiscoverItem"},"DupIn":{"properties":{"text":{"type":"string","title":"Text"},"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids"},"post_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Post Id"}},"type":"object","required":["text","channel_ids"],"title":"DupIn"},"EditIn":{"properties":{"action":{"type":"string","title":"Action"},"text":{"type":"string","maxLength":20000,"title":"Text","default":""},"channel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Id"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},"type":"object","required":["action"],"title":"EditIn"},"FeedbackIn":{"properties":{"kind":{"type":"string","enum":["bug","idea"],"title":"Kind"},"text":{"type":"string","title":"Text"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"}},"type":"object","required":["kind","text"],"title":"FeedbackIn"},"GrantIn":{"properties":{"plan":{"type":"string","title":"Plan"},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days","default":30},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"notify":{"type":"boolean","title":"Notify","default":true}},"type":"object","required":["plan"],"title":"GrantIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceIn":{"properties":{"plan":{"type":"string","title":"Plan"},"months":{"type":"integer","title":"Months","default":1}},"type":"object","required":["plan"],"title":"InvoiceIn"},"LinkIn":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"hint":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Hint"},"channel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Channel Id"}},"type":"object","required":["url"],"title":"LinkIn"},"MePatch":{"properties":{"tz":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tz"},"notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify"},"weekly_report":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Weekly Report"},"groups":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Groups"},"rubrics":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Rubrics"},"watch":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Watch"}},"type":"object","title":"MePatch"},"MediaItem":{"properties":{"id":{"type":"integer","title":"Id"},"spoiler":{"type":"boolean","title":"Spoiler","default":false}},"type":"object","required":["id"],"title":"MediaItem"},"OrderIn":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"OrderIn"},"PackIn":{"properties":{"pack":{"type":"string","title":"Pack"},"method":{"type":"string","pattern":"^(stars|crypto)$","title":"Method","default":"stars"}},"type":"object","required":["pack"],"title":"PackIn"},"PlanIn":{"properties":{"channel_id":{"type":"integer","title":"Channel Id"},"hint":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Hint"},"count":{"type":"integer","title":"Count","default":7}},"type":"object","required":["channel_id"],"title":"PlanIn"},"PollIn":{"properties":{"question":{"type":"string","title":"Question"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"anonymous":{"type":"boolean","title":"Anonymous","default":true},"multiple":{"type":"boolean","title":"Multiple","default":false},"quiz":{"type":"boolean","title":"Quiz","default":false},"correct":{"type":"integer","title":"Correct","default":0},"correct_ids":{"items":{"type":"integer"},"type":"array","title":"Correct Ids","default":[]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"revoting":{"type":"boolean","title":"Revoting","default":true},"shuffle":{"type":"boolean","title":"Shuffle","default":false},"hide_results":{"type":"boolean","title":"Hide Results","default":false},"members_only":{"type":"boolean","title":"Members Only","default":false},"close_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Close Hours"}},"type":"object","required":["question","options"],"title":"PollIn"},"PostIn":{"properties":{"text":{"type":"string","title":"Text","default":""},"media":{"items":{"$ref":"#/components/schemas/MediaItem"},"type":"array","title":"Media","default":[]},"poll":{"anyOf":[{"$ref":"#/components/schemas/PollIn"},{"type":"null"}]},"buttons":{"items":{"items":{"$ref":"#/components/schemas/Button"},"type":"array"},"type":"array","title":"Buttons","default":[]},"reactions":{"items":{"type":"string"},"type":"array","title":"Reactions","default":[]},"options":{"additionalProperties":true,"type":"object","title":"Options","default":{}},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids","default":[]},"publish_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Publish At"},"repeat":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Repeat"},"action":{"type":"string","pattern":"^(draft|schedule|publish|review|save)$","title":"Action","default":"draft"}},"type":"object","title":"PostIn"},"RefreshCheck":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"},"digits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Digits"}},"type":"object","required":["url"],"title":"RefreshCheck"},"RevokeIn":{"properties":{"notify":{"type":"boolean","title":"Notify","default":true},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"RevokeIn"},"RoleIn":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"RoleIn"},"ShortLinkIn":{"properties":{"url":{"type":"string","maxLength":2000,"title":"Url"}},"type":"object","required":["url"],"title":"ShortLinkIn"},"SlotIn":{"properties":{"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids"},"count":{"type":"integer","title":"Count","default":1}},"type":"object","required":["channel_ids"],"title":"SlotIn"},"SourceIn":{"properties":{"url":{"type":"string","title":"Url","default":""},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"mode":{"type":"string","pattern":"^(draft|queue|publish)$","title":"Mode","default":"draft"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"active":{"type":"boolean","title":"Active","default":true},"ai":{"type":"boolean","title":"Ai","default":false}},"type":"object","title":"SourceIn"},"StatusIn":{"properties":{"status":{"type":"string","enum":["new","done"],"title":"Status"}},"type":"object","required":["status"],"title":"StatusIn"},"TelegramLogin":{"properties":{"init_data":{"type":"string","title":"Init Data"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},"type":"object","required":["init_data"],"title":"TelegramLogin"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"app__api__channels__InviteIn":{"properties":{"role":{"type":"string","title":"Role","default":"editor"},"max_uses":{"type":"integer","title":"Max Uses","default":1}},"type":"object","title":"InviteIn"},"app__api__stats__InviteIn":{"properties":{"name":{"type":"string","title":"Name"},"join_request":{"type":"boolean","title":"Join Request","default":false},"sub_price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sub Price"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["name"],"title":"InviteIn"},"app__api__team__InviteIn":{"properties":{"role":{"type":"string","title":"Role","default":"editor"},"all_channels":{"type":"boolean","title":"All Channels","default":true},"channel_ids":{"items":{"type":"integer"},"type":"array","title":"Channel Ids","default":[]},"max_uses":{"type":"integer","title":"Max Uses","default":1}},"type":"object","title":"InviteIn"}}}}