{
  "openapi": "3.1.0",
  "info": {
    "description": "Public Telegram channel data over plain HTTP. No phone number, no api_id, no MTProto client, no session files — one RapidAPI key and you are reading.\n\n**What you get per call**\n\n- Channel facts: member count, description, creation date, verification and boost state.\n- The feed with the numbers that matter: every post carries `views` and `forwards`, so engagement is a division, not a research project.\n- Cursor pagination over the whole history, with `count` telling you how far it goes.\n- Similar-channel recommendations, ready to render as a block.\n- Public directory search, stories, replies and discussion threads: 19 routes in one spec.\n\n**Built for people who tried the alternatives.** Telethon and Pyrogram want a phone number, an api_id and a session you have to keep alive. The Bot API only sees channels your bot already administers. Scraping t.me previews breaks with the next markup change.\n\nThe free plan is 2,500 calls a month, no card.\n\n**Errors** come back in one envelope with a stable machine-readable `code`, so you write one error path. Every example below is a real response, measured 2026-09-16.",
    "title": "tgAtlas — Telegram Channel Data API",
    "version": "1.0.0",
    "summary": "Read any public Telegram channel from your code: size, feed, per-post views and forwards.",
    "contact": {
      "name": "tgAtlas",
      "url": "https://tgatlas.org",
      "email": "starnikovoleg@gmail.com"
    },
    "x-rapidapi-url": "https://rapidapi.com/starnikovoleg/api/telegram155"
  },
  "tags": [
    {
      "name": "Channels",
      "description": "Channel and supergroup profiles, batch lookups, recommendations and members."
    },
    {
      "name": "Messages",
      "description": "Post history, discussion threads and directory-backed search."
    },
    {
      "name": "Stories",
      "description": "Active and specific stories for a channel or user."
    },
    {
      "name": "Identity",
      "description": "Turning a @username, phone number or id into a peer, and user profiles."
    },
    {
      "name": "Files",
      "description": "Downloading media referenced by a message, story or profile photo."
    },
    {
      "name": "Service",
      "description": "Liveness probe and the machine-readable contract."
    }
  ],
  "servers": [
    {
      "url": "https://telegram155.p.rapidapi.com",
      "description": "RapidAPI gateway"
    }
  ],
  "components": {
    "parameters": {
      "CursorQuery": {
        "description": "Opaque pagination cursor obtained from `next_page` or `prev_page` in a previous response. Overrides `offset_id` and `limit` when supplied. Fails with 400 if tampered with.",
        "in": "query",
        "name": "cursor",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "LimitQuery": {
        "description": "Maximum items to return. Defaults to 20 when omitted; values above 100 are clamped to 100.",
        "example": 20,
        "in": "query",
        "name": "limit",
        "required": false,
        "schema": {
          "default": 20,
          "maximum": 100,
          "minimum": 1,
          "type": "integer"
        }
      },
      "MsgIDPath": {
        "description": "Numeric message id within the given peer. Obtain from a prior `/v1/peers/{peer_id}/history` response.",
        "example": 519,
        "in": "path",
        "name": "msg_id",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "PeerIDPath": {
        "description": "Numeric Telegram peer id (channel or user). Obtain from `/v1/usernames/{username}`, `/v1/phones/{phone}`, `/v1/contacts/search`, or any prior response's `peer.user_id` / `peer.channel_id` field.",
        "example": 1006503122,
        "in": "path",
        "name": "peer_id",
        "required": true,
        "schema": {
          "format": "int64",
          "type": "integer"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Invalid request — bad path or query parameter."
      },
      "InternalError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Internal error."
      },
      "NotFound": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "not found",
              "code": "NOT_FOUND"
            }
          }
        },
        "description": "Not found."
      },
      "RateLimited": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Rate limit exceeded."
      },
      "ResourceUnavailable": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The peer id could not be found, so no access hash exists for it. Not transient: seed the id via GET /v1/usernames/{username}, GET /v1/phones/{phone}, or by encountering it in a chat, then retry. Raw MTProto ids only: a Bot-API id like -1001234567890 must be sent as 1234567890 (strip the leading -100), and -123456789 as 123456789. When the request carries such an id, the hint names the exact id to retry with."
      },
      "ServiceUnavailable": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Service temporarily unavailable."
      },
      "UpstreamTimeout": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Request timed out."
      }
    },
    "schemas": {
      "ChannelDetails": {
        "description": "Get-full-channel envelope. `full_chat` carries the extended profile; `chats[0]` carries the regular chat record for cross-reference.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "full_chat": {
            "$ref": "#/components/schemas/ChatFull"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ChannelParticipants": {
        "additionalProperties": true,
        "description": "Channel/supergroup members matching the requested filter.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "count": {
            "description": "Total participant count matching the filter.",
            "type": "integer"
          },
          "participants": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ChannelsBatch": {
        "description": "Batch channels fetch result. Channels that could not be resolved appear in `skipped[]` instead of `chats[]`.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "skipped": {
            "description": "Channel ids that could not be resolved.",
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ChannelsList": {
        "description": "Wrapper carrying a `chats[]` list. Used by channel-recommendations.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Chat": {
        "additionalProperties": true,
        "description": "Telegram chat record. Covers legacy groups, channels, and supergroups; the boolean flags `broadcast`, `megagroup`, and `gigagroup` disambiguate the variant.",
        "properties": {
          "autotranslation": {
            "description": "True if auto-translation is enabled.",
            "type": "boolean"
          },
          "broadcast": {
            "description": "True if this is a broadcast channel.",
            "type": "boolean"
          },
          "date": {
            "description": "Unix timestamp the chat was created.",
            "type": "integer"
          },
          "fake": {
            "description": "True if Telegram has flagged this chat as fake.",
            "type": "boolean"
          },
          "forum": {
            "description": "True if this is a forum (channel with topics).",
            "type": "boolean"
          },
          "gigagroup": {
            "description": "True if this is a gigagroup (broadcast-only supergroup).",
            "type": "boolean"
          },
          "id": {
            "description": "Chat peer id. Pass this as `peer_id` to channel/peer endpoints.",
            "format": "int64",
            "type": "integer"
          },
          "join_request": {
            "description": "True if join requires admin approval.",
            "type": "boolean"
          },
          "join_to_send": {
            "description": "True if posting requires joining.",
            "type": "boolean"
          },
          "left": {
            "description": "True if the viewer has left this chat.",
            "type": "boolean"
          },
          "level": {
            "description": "Boost level.",
            "type": "integer"
          },
          "linked_monoforum_id": {
            "description": "Linked monoforum id (if any).",
            "format": "int64",
            "type": "integer"
          },
          "megagroup": {
            "description": "True if this is a supergroup.",
            "type": "boolean"
          },
          "min": {
            "description": "True if the record is a stripped (min) representation.",
            "type": "boolean"
          },
          "noforwards": {
            "description": "True if content protection (no forwards) is enabled.",
            "type": "boolean"
          },
          "participants_count": {
            "description": "Approximate participant count (may be 0 if not exposed).",
            "type": "integer"
          },
          "photo": {
            "description": "Chat photo metadata.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Photo"
              },
              {
                "type": "null"
              }
            ]
          },
          "restricted": {
            "description": "True if this chat is restricted (see `restriction_reason`).",
            "type": "boolean"
          },
          "restriction_reason": {
            "description": "Reasons for any restriction.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "scam": {
            "description": "True if Telegram has flagged this chat as a scam.",
            "type": "boolean"
          },
          "signatures": {
            "description": "True if posts show their author.",
            "type": "boolean"
          },
          "slowmode_enabled": {
            "description": "True if slow mode is on.",
            "type": "boolean"
          },
          "title": {
            "description": "Public display title of the chat.",
            "type": "string"
          },
          "username": {
            "description": "Primary public @username (empty if private).",
            "type": "string"
          },
          "usernames": {
            "description": "All public usernames bound to this chat.",
            "items": {
              "$ref": "#/components/schemas/UsernameAlias"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "verified": {
            "description": "True if Telegram has verified this chat.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ChatFull": {
        "additionalProperties": true,
        "description": "Extended chat/channel profile. Returned inside `full_chat` of the get-full-channel envelope.",
        "properties": {
          "about": {
            "description": "Description / about text.",
            "type": "string"
          },
          "admins_count": {
            "description": "Admin count.",
            "type": "integer"
          },
          "antispam": {
            "description": "True if antispam is on.",
            "type": "boolean"
          },
          "available_min_id": {
            "description": "Earliest fetchable message id.",
            "type": "integer"
          },
          "available_reactions": {
            "additionalProperties": true,
            "description": "Allowed reactions (all / some / none).",
            "type": [
              "object",
              "null"
            ]
          },
          "banned_count": {
            "description": "Banned-member count.",
            "type": "integer"
          },
          "boosts_applied": {
            "description": "Number of boosts applied to the channel.",
            "type": "integer"
          },
          "boosts_unrestrict": {
            "description": "Boosts required to lift restrictions.",
            "type": "integer"
          },
          "bot_info": {
            "description": "Bot descriptions for bots in this chat.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "call": {
            "additionalProperties": true,
            "description": "Active group call descriptor, null if no call.",
            "type": [
              "object",
              "null"
            ]
          },
          "can_delete_channel": {
            "description": "True if the channel may be deleted.",
            "type": "boolean"
          },
          "can_set_stickers": {
            "description": "True if a sticker set may be assigned.",
            "type": "boolean"
          },
          "can_set_username": {
            "description": "True if the username is editable.",
            "type": "boolean"
          },
          "can_view_participants": {
            "description": "True if participants are listable.",
            "type": "boolean"
          },
          "can_view_revenue": {
            "description": "True if monetisation stats are exposed.",
            "type": "boolean"
          },
          "can_view_stats": {
            "description": "True if statistics are exposed.",
            "type": "boolean"
          },
          "chat_photo": {
            "description": "Full chat photo.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Photo"
              },
              {
                "type": "null"
              }
            ]
          },
          "exported_invite": {
            "additionalProperties": true,
            "description": "Primary chat invite link.",
            "type": [
              "object",
              "null"
            ]
          },
          "folder_id": {
            "description": "Chat folder id, 0 if none.",
            "type": "integer"
          },
          "hidden_prehistory": {
            "description": "True if history is hidden from new members.",
            "type": "boolean"
          },
          "id": {
            "description": "Chat peer id (matches the Chat.id in the same response).",
            "format": "int64",
            "type": "integer"
          },
          "kicked_count": {
            "description": "Kicked-member count.",
            "type": "integer"
          },
          "linked_chat_id": {
            "description": "Linked discussion chat id (for broadcast channels with a comments group).",
            "format": "int64",
            "type": "integer"
          },
          "online_count": {
            "description": "Currently-online member count.",
            "type": "integer"
          },
          "participants_count": {
            "description": "Approximate member count.",
            "type": "integer"
          },
          "pinned_msg_id": {
            "description": "Pinned message id, 0 if none.",
            "type": "integer"
          },
          "slowmode_next_send_date": {
            "description": "Unix timestamp of the next allowed post under slow mode.",
            "type": "integer"
          },
          "slowmode_seconds": {
            "description": "Slow-mode interval in seconds, 0 if disabled.",
            "type": "integer"
          },
          "ttl_period": {
            "description": "Self-destruct period (seconds), 0 if disabled.",
            "type": "integer"
          },
          "unread_count": {
            "description": "Unread message count for the viewer.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ContactsSearch": {
        "description": "Hybrid contact + global directory search. `results[]` are public directory matches; `my_results[]` is reserved for future use and is currently null.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "my_results": {
            "description": "Reserved; currently null.",
            "items": {
              "$ref": "#/components/schemas/Peer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "results": {
            "description": "Matches from the public directory.",
            "items": {
              "$ref": "#/components/schemas/Peer"
            },
            "type": "array"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DiscussionMessage": {
        "description": "Resolved discussion thread root for a channel post. `messages[]` are the thread root(s).",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "flags": {
            "description": "Bitfield of optional Telegram fields.",
            "type": "integer"
          },
          "max_id": {
            "description": "Latest reply message id in the thread.",
            "type": "integer"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array"
          },
          "read_inbox_max_id": {
            "description": "Latest incoming reply read by the viewer.",
            "type": "integer"
          },
          "read_outbox_max_id": {
            "description": "Latest outgoing reply read by the viewer.",
            "type": "integer"
          },
          "unread_count": {
            "description": "Unread reply count.",
            "type": "integer"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Error": {
        "description": "Error envelope returned by all non-2xx responses.",
        "properties": {
          "code": {
            "description": "Stable machine-readable error identifier.",
            "enum": [
              "INVALID_REQUEST",
              "NOT_FOUND",
              "RESOURCE_UNAVAILABLE",
              "RATE_LIMITED",
              "SERVICE_UNAVAILABLE",
              "TIMEOUT",
              "INTERNAL_ERROR"
            ],
            "example": "SERVICE_UNAVAILABLE",
            "type": "string"
          },
          "error": {
            "description": "Short human-readable error message.",
            "example": "service temporarily unavailable",
            "type": "string"
          },
          "hint": {
            "description": "Optional recovery hint suggesting a concrete next call. Set on RESOURCE_UNAVAILABLE (how to seed an unknown peer id) and SERVICE_UNAVAILABLE.",
            "example": "retry shortly, or call /v1/usernames/{username} or /v1/peers/{peer_id}/history first.",
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "type": "object"
      },
      "Message": {
        "additionalProperties": true,
        "description": "Telegram message. Appears in history, replies, channel-message-by-id, and search responses.",
        "properties": {
          "date": {
            "description": "Unix timestamp when sent.",
            "type": "integer"
          },
          "edit_date": {
            "description": "Unix timestamp of the last edit, or 0 if never edited.",
            "type": "integer"
          },
          "entities": {
            "description": "Inline message entities (bold, mention, url, etc.).",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "forwards": {
            "description": "Forward count.",
            "type": "integer"
          },
          "from_id": {
            "description": "Sender peer. Null for channel posts (where the channel itself is the author).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Peer"
              },
              {
                "type": "null"
              }
            ]
          },
          "fwd_from": {
            "additionalProperties": true,
            "description": "Forwarded-from envelope. Present only if the message was forwarded.",
            "type": [
              "object",
              "null"
            ]
          },
          "grouped_id": {
            "description": "Album group id; messages with the same value belong to one album.",
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "description": "Message id within its peer.",
            "type": "integer"
          },
          "media": {
            "additionalProperties": true,
            "description": "Attached media (photo / video / document / poll / webpage). Shape varies by type.",
            "type": [
              "object",
              "null"
            ]
          },
          "media_unread": {
            "description": "True if the media is unread.",
            "type": "boolean"
          },
          "mentioned": {
            "description": "True if the viewer is mentioned in this message.",
            "type": "boolean"
          },
          "message": {
            "description": "Plain-text body of the message.",
            "type": "string"
          },
          "noforwards": {
            "description": "True if forwarding is disabled.",
            "type": "boolean"
          },
          "out": {
            "description": "True if the message was outgoing from the viewer's perspective.",
            "type": "boolean"
          },
          "peer_id": {
            "$ref": "#/components/schemas/Peer",
            "description": "Peer that owns this message."
          },
          "pinned": {
            "description": "True if pinned.",
            "type": "boolean"
          },
          "post": {
            "description": "True if this is a channel post (rather than a chat message).",
            "type": "boolean"
          },
          "post_author": {
            "description": "Display name of the post's author (signed broadcasts).",
            "type": "string"
          },
          "reactions": {
            "additionalProperties": true,
            "description": "Aggregated reaction counts.",
            "type": [
              "object",
              "null"
            ]
          },
          "replies": {
            "additionalProperties": true,
            "description": "Reply thread summary (count, latest reply id). 0 replies if no discussion.",
            "type": [
              "object",
              "null"
            ]
          },
          "reply_markup": {
            "additionalProperties": true,
            "description": "Inline keyboard / reply markup, if attached.",
            "type": [
              "object",
              "null"
            ]
          },
          "reply_to": {
            "additionalProperties": true,
            "description": "Reply / thread reference. Present only if the message is a reply.",
            "type": [
              "object",
              "null"
            ]
          },
          "silent": {
            "description": "True if the message was sent without notification.",
            "type": "boolean"
          },
          "views": {
            "description": "View count (broadcast channels only).",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MessagesEnvelope": {
        "description": "Messages list with related chats/users. Used by history, replies, and channel-messages-by-id endpoints.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "count": {
            "description": "Total number of messages matching the query (may exceed the returned page).",
            "type": "integer"
          },
          "flags": {
            "description": "Bitfield of optional Telegram fields.",
            "type": "integer"
          },
          "inexact": {
            "description": "True if `count` is an estimate.",
            "type": "boolean"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array"
          },
          "next_page": {
            "description": "Opaque cursor for the next (older) page. Pass back as `?cursor=`. Absent when no further page exists.",
            "type": "string"
          },
          "offset_id_offset": {
            "description": "Absolute position of `messages[0]` in the full result set.",
            "type": "integer"
          },
          "prev_page": {
            "description": "Opaque cursor for the previous (newer) page. Pass back as `?cursor=`. Absent when already on the first page.",
            "type": "string"
          },
          "pts": {
            "description": "State-update counter; opaque to callers.",
            "type": "integer"
          },
          "topics": {
            "description": "Forum topics referenced by the messages, if the chat is a forum.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Peer": {
        "additionalProperties": true,
        "description": "Telegram peer reference. Exactly one of `user_id`, `chat_id`, or `channel_id` is set, identifying the peer type.",
        "properties": {
          "channel_id": {
            "description": "Set when this peer is a channel or supergroup.",
            "format": "int64",
            "type": "integer"
          },
          "chat_id": {
            "description": "Set when this peer is a legacy basic group chat.",
            "format": "int64",
            "type": "integer"
          },
          "user_id": {
            "description": "Set when this peer is a user (1:1 chat partner or contact).",
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PeerStories": {
        "additionalProperties": true,
        "description": "Currently active stories for a peer.",
        "properties": {
          "stories": {
            "additionalProperties": true,
            "description": "PeerStories envelope: `peer` reference plus `stories[]`.",
            "properties": {
              "peer": {
                "$ref": "#/components/schemas/Peer"
              },
              "stories": {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "Photo": {
        "additionalProperties": true,
        "description": "Photo metadata. The image bytes are not returned; clients fetch them out-of-band.",
        "properties": {
          "dcid": {
            "description": "Telegram data-center id where the photo lives.",
            "type": "integer"
          },
          "flags": {
            "description": "Bitfield flags.",
            "type": "integer"
          },
          "has_video": {
            "description": "True if the photo has a video preview.",
            "type": "boolean"
          },
          "photo_id": {
            "description": "Photo id.",
            "format": "int64",
            "type": "integer"
          },
          "stripped_thumb": {
            "description": "Base64-ish stripped JPEG thumbnail; can be expanded client-side.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolvedPeer": {
        "description": "Result of a username or phone lookup. Pass `peer.user_id`/`peer.channel_id` to subsequent endpoints to fetch full data.",
        "properties": {
          "chats": {
            "description": "Chat records resolved alongside the peer; may be null when only a cache reference was returned.",
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "peer": {
            "$ref": "#/components/schemas/Peer"
          },
          "users": {
            "description": "User records resolved alongside the peer; may be null when only a cache reference was returned.",
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "peer"
        ],
        "type": "object"
      },
      "StoriesByID": {
        "additionalProperties": true,
        "description": "Specific stories fetched by id for a peer. Story media file references are downloadable via GET /v1/files/{file_id}.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": "array"
          },
          "stories": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "User": {
        "additionalProperties": true,
        "description": "Telegram user record. Appears in `users[]` arrays of nearly every response.",
        "properties": {
          "bot": {
            "description": "True if this account is a bot.",
            "type": "boolean"
          },
          "close_friend": {
            "description": "Close-friend flag.",
            "type": "boolean"
          },
          "contact": {
            "description": "Contact-relationship flag.",
            "type": "boolean"
          },
          "deleted": {
            "description": "True if the account has been deleted.",
            "type": "boolean"
          },
          "fake": {
            "description": "True if Telegram has flagged this account as fake.",
            "type": "boolean"
          },
          "first_name": {
            "description": "First name (may be empty for deleted accounts).",
            "type": "string"
          },
          "id": {
            "description": "User peer id. Pass this as `peer_id` to `/v1/users/{peer_id}`.",
            "format": "int64",
            "type": "integer"
          },
          "lang_code": {
            "description": "BCP-47-ish locale code reported by the client (e.g. \"en\", \"ru\").",
            "type": "string"
          },
          "last_name": {
            "description": "Last name (may be empty).",
            "type": "string"
          },
          "mutual_contact": {
            "description": "True if the contact relationship is mutual.",
            "type": "boolean"
          },
          "phone": {
            "description": "Phone number in international format. Empty unless the caller has visibility.",
            "type": "string"
          },
          "photo": {
            "description": "Profile photo metadata. Null if no photo is set.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Photo"
              },
              {
                "type": "null"
              }
            ]
          },
          "premium": {
            "description": "True if this account has Telegram Premium.",
            "type": "boolean"
          },
          "restricted": {
            "description": "True if this user is restricted (see `restriction_reason`).",
            "type": "boolean"
          },
          "restriction_reason": {
            "description": "Reasons for any restriction. Null when not restricted.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "scam": {
            "description": "True if Telegram has flagged this account as a scam.",
            "type": "boolean"
          },
          "status": {
            "additionalProperties": true,
            "description": "Online status object (varies by privacy settings).",
            "type": [
              "object",
              "null"
            ]
          },
          "username": {
            "description": "Primary public @username (empty if the user has none).",
            "type": "string"
          },
          "usernames": {
            "description": "All public usernames bound to this user (some accounts collect multiple).",
            "items": {
              "$ref": "#/components/schemas/UsernameAlias"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "verified": {
            "description": "True if Telegram has verified this user.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UserDetails": {
        "description": "Get-full-user envelope. `full_user` carries the extended profile; `users[0]` carries the regular user record for cross-reference.",
        "properties": {
          "chats": {
            "items": {
              "$ref": "#/components/schemas/Chat"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "full_user": {
            "$ref": "#/components/schemas/UserFull"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "UserFull": {
        "additionalProperties": true,
        "description": "Extended user profile. Returned inside `full_user` of the get-full-user envelope.",
        "properties": {
          "about": {
            "description": "Bio text shown on the profile.",
            "type": "string"
          },
          "birthday": {
            "additionalProperties": true,
            "description": "Birthday metadata, if shared.",
            "type": [
              "object",
              "null"
            ]
          },
          "blocked": {
            "description": "True if the viewer has blocked this user.",
            "type": "boolean"
          },
          "bot_info": {
            "additionalProperties": true,
            "description": "Bot metadata. Present when the user is a bot.",
            "type": [
              "object",
              "null"
            ]
          },
          "business_intro": {
            "additionalProperties": true,
            "description": "Telegram Business intro card.",
            "type": [
              "object",
              "null"
            ]
          },
          "business_location": {
            "additionalProperties": true,
            "description": "Business address & geolocation.",
            "type": [
              "object",
              "null"
            ]
          },
          "business_work_hours": {
            "additionalProperties": true,
            "description": "Business hours.",
            "type": [
              "object",
              "null"
            ]
          },
          "common_chats_count": {
            "description": "Number of chats this user shares with the viewer.",
            "type": "integer"
          },
          "contact_require_premium": {
            "description": "True if only premium users may DM this account.",
            "type": "boolean"
          },
          "fallback_photo": {
            "description": "Fallback profile photo shown to users who lack access to the primary one.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Photo"
              },
              {
                "type": "null"
              }
            ]
          },
          "has_scheduled": {
            "description": "True if scheduled messages exist with this peer.",
            "type": "boolean"
          },
          "id": {
            "description": "User peer id (matches the User.id in the same response).",
            "format": "int64",
            "type": "integer"
          },
          "notify_settings": {
            "additionalProperties": true,
            "description": "Notification preferences for this peer.",
            "type": [
              "object",
              "null"
            ]
          },
          "personal_channel_id": {
            "description": "Linked personal channel id, if any.",
            "format": "int64",
            "type": "integer"
          },
          "personal_channel_message": {
            "description": "Featured message id in the personal channel.",
            "type": "integer"
          },
          "phone_calls_available": {
            "description": "True if the user accepts phone calls.",
            "type": "boolean"
          },
          "phone_calls_private": {
            "description": "True if call privacy is engaged.",
            "type": "boolean"
          },
          "pinned_msg_id": {
            "description": "Pinned message id, or 0 if no pin.",
            "type": "integer"
          },
          "profile_photo": {
            "description": "Current profile photo.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Photo"
              },
              {
                "type": "null"
              }
            ]
          },
          "settings": {
            "additionalProperties": true,
            "description": "Per-peer settings (report buttons, contact requests, etc.).",
            "type": [
              "object",
              "null"
            ]
          },
          "sponsored_enabled": {
            "description": "True if sponsored messages are enabled.",
            "type": "boolean"
          },
          "translations_disabled": {
            "description": "True if message translation is opt-out for this peer.",
            "type": "boolean"
          },
          "ttl_period": {
            "description": "Self-destruct period (seconds), 0 if disabled.",
            "type": "integer"
          },
          "video_calls_available": {
            "description": "True if video calls are available.",
            "type": "boolean"
          },
          "voice_messages_forbidden": {
            "description": "True if the user rejects voice messages.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UserPhotos": {
        "additionalProperties": true,
        "description": "Profile photo history for a user. `count` is present only when the result is paginated (PhotosPhotosSlice).",
        "properties": {
          "count": {
            "description": "Total photo count when paginated. Absent when the full set is returned.",
            "type": "integer"
          },
          "photos": {
            "items": {
              "$ref": "#/components/schemas/Photo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "UsernameAlias": {
        "additionalProperties": true,
        "description": "One public username alias bound to a user or chat.",
        "properties": {
          "active": {
            "description": "True if the alias is currently active.",
            "type": "boolean"
          },
          "editable": {
            "description": "True if the alias can be edited (only true for the primary one).",
            "type": "boolean"
          },
          "flags": {
            "description": "Bitfield of optional Telegram fields.",
            "type": "integer"
          },
          "username": {
            "description": "The alias text (no leading @).",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "paths": {
    "/health": {
      "get": {
        "description": "Returns 200 if the process is up.",
        "operationId": "health",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "status": "ok"
                },
                "schema": {
                  "properties": {
                    "status": {
                      "example": "ok",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Liveness probe",
        "tags": [
          "Service"
        ]
      }
    },
    "/v1/channels": {
      "get": {
        "description": "Returns channel records for the listed ids. Unresolvable ids appear in `skipped[]`.",
        "operationId": "getChannels",
        "parameters": [
          {
            "description": "Comma-separated list of channel peer ids (e.g. `1006503122,1005640892`). Maximum 100.",
            "example": "1006503122,1005640892",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "pattern": "^\\d+(,\\d+)*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "skipped": []
                },
                "schema": {
                  "$ref": "#/components/schemas/ChannelsBatch"
                }
              }
            },
            "description": "Resolved channels."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Batch fetch channels by id",
        "tags": [
          "Channels"
        ]
      }
    },
    "/v1/channels/recommendations": {
      "get": {
        "description": "Returns channels similar to `peer_id`. Omit `peer_id` for generic recommendations.",
        "operationId": "getChannelRecommendations",
        "parameters": [
          {
            "description": "Channel peer id to seed the recommendation. Omit (or set to 0) for generic recommendations.",
            "example": 1006503122,
            "in": "query",
            "name": "peer_id",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": false,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": false,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": null,
                      "creator": false,
                      "date": 1720755410,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": null,
                      "fake": false,
                      "flags": 139492,
                      "flags2": 12,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 2180851629,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 0,
                      "linked_monoforum_id": 0,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 7995908,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5188221318934426000,
                        "stripped_thumb": "AQgInxem8YfvQnmAjptxnnnr0ooooA8="
                      },
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "CATS Community",
                      "username": "Cats_housewtf",
                      "usernames": null,
                      "verified": true
                    }
                  ],
                  "count": 72
                },
                "schema": {
                  "$ref": "#/components/schemas/ChannelsList"
                }
              }
            },
            "description": "Recommended channels."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get channel recommendations",
        "tags": [
          "Channels"
        ]
      }
    },
    "/v1/channels/{peer_id}": {
      "get": {
        "description": "Returns the extended profile for a channel or supergroup. Fails with 404 if the channel does not exist.",
        "operationId": "getFullChannel",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDetails"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "full_chat": {
                    "about": "Founder of Telegram.",
                    "admins_count": 0,
                    "antispam": false,
                    "available_min_id": 0,
                    "available_reactions": {
                      "reactions": [
                        {
                          "document_id": 5399847211989246000
                        }
                      ]
                    },
                    "banned_count": 0,
                    "blocked": false,
                    "boosts_applied": 0,
                    "boosts_unrestrict": 0,
                    "bot_info": null,
                    "bot_verification": {
                      "bot_id": 0,
                      "description": "",
                      "icon": 0
                    },
                    "call": null,
                    "can_delete_channel": false,
                    "can_set_location": false,
                    "can_set_stickers": false,
                    "can_set_username": false,
                    "can_view_participants": false,
                    "can_view_revenue": false,
                    "can_view_stars_revenue": false,
                    "can_view_stats": false,
                    "chat_photo": {
                      "date": 1725637384,
                      "dcid": 2,
                      "file_reference": "AGqqJZ5xtSdi5IgNQFR8qkpg8E2d",
                      "flags": 0,
                      "has_stickers": false,
                      "id": 5393326112060334000,
                      "sizes": [
                        {
                          "h": 160,
                          "size": 4843,
                          "type": "a",
                          "w": 160
                        }
                      ],
                      "video_sizes": null
                    },
                    "default_send_as": null,
                    "emojiset": {
                      "archived": false,
                      "channel_emoji_status": false,
                      "count": 0,
                      "creator": false,
                      "emojis": false,
                      "flags": 0,
                      "hash": 0,
                      "id": 0,
                      "installed_date": 0,
                      "masks": false,
                      "official": false,
                      "short_name": "",
                      "text_color": false,
                      "thumb_dcid": 0,
                      "thumb_document_id": 0,
                      "thumb_version": 0,
                      "thumbs": null,
                      "title": ""
                    },
                    "exported_invite": null,
                    "flags": 1073741825,
                    "flags2": 4022304,
                    "folder_id": 0,
                    "groupcall_default_join_as": null,
                    "has_scheduled": false,
                    "hidden_prehistory": false,
                    "id": 1006503122,
                    "kicked_count": 0,
                    "linked_chat_id": 0,
                    "location": null,
                    "main_tab": null,
                    "migrated_from_chat_id": 0,
                    "migrated_from_max_id": 0,
                    "notify_settings": {
                      "android_sound": null,
                      "flags": 0,
                      "ios_sound": null,
                      "mute_until": 0,
                      "other_sound": null,
                      "show_previews": false,
                      "silent": false,
                      "stories_android_sound": null,
                      "stories_hide_sender": false,
                      "stories_ios_sound": null,
                      "stories_muted": false,
                      "stories_other_sound": null
                    },
                    "online_count": 0,
                    "paid_media_allowed": true,
                    "paid_messages_available": true,
                    "paid_reactions_available": true,
                    "participants_count": 10739366,
                    "participants_hidden": false,
                    "pending_suggestions": null,
                    "pinned_msg_id": 0,
                    "pts": 1804,
                    "reactions_limit": 5,
                    "read_inbox_max_id": 0,
                    "read_outbox_max_id": 0,
                    "recent_requesters": null,
                    "requests_pending": 0,
                    "restricted_sponsored": false,
                    "send_paid_messages_stars": 5000,
                    "slowmode_next_send_date": 0,
                    "slowmode_seconds": 0,
                    "stargifts_available": true,
                    "stargifts_count": 59472,
                    "stats_dc": 0,
                    "stickerset": {
                      "archived": false,
                      "channel_emoji_status": false,
                      "count": 0,
                      "creator": false,
                      "emojis": false,
                      "flags": 0,
                      "hash": 0,
                      "id": 0,
                      "installed_date": 0,
                      "masks": false,
                      "official": false,
                      "short_name": "",
                      "text_color": false,
                      "thumb_dcid": 0,
                      "thumb_document_id": 0,
                      "thumb_version": 0,
                      "thumbs": null,
                      "title": ""
                    },
                    "stories": {
                      "flags": 0,
                      "max_read_id": 0,
                      "peer": null,
                      "stories": null
                    },
                    "stories_pinned_available": true,
                    "theme_emoticon": "",
                    "translations_disabled": false,
                    "ttl_period": 0,
                    "unread_count": 0,
                    "view_forum_as_messages": false,
                    "wallpaper": null
                  },
                  "users": null
                }
              }
            },
            "description": "Extended channel profile."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get full channel info",
        "tags": [
          "Channels"
        ]
      }
    },
    "/v1/channels/{peer_id}/messages": {
      "get": {
        "description": "Returns the listed message ids from a single channel.",
        "operationId": "getChannelMessages",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "description": "Comma-separated list of message ids (e.g. `519,518,517`). Maximum 100.",
            "example": "519,518",
            "in": "query",
            "name": "ids",
            "required": true,
            "schema": {
              "pattern": "^\\d+(,\\d+)*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesEnvelope"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "count": 1,
                  "flags": 0,
                  "inexact": false,
                  "messages": [
                    {
                      "date": 1789142642,
                      "edit_date": 1789142657,
                      "edit_hide": true,
                      "effect": 0,
                      "entities": [
                        {
                          "document_id": 5463249828450425000,
                          "length": 2,
                          "offset": 0
                        }
                      ],
                      "factcheck": {
                        "country": "",
                        "flags": 0,
                        "hash": 0,
                        "need_check": false,
                        "text": {
                          "entities": null,
                          "text": ""
                        }
                      },
                      "flags": 3270272,
                      "flags2": 0,
                      "forwards": 3291,
                      "from_boosts_applied": 0,
                      "from_id": null,
                      "from_rank": "",
                      "from_scheduled": false,
                      "fwd_from": {
                        "channel_post": 0,
                        "date": 0,
                        "flags": 0,
                        "from_id": null,
                        "from_name": "",
                        "imported": false,
                        "post_author": "",
                        "psa_type": "",
                        "saved_date": 0,
                        "saved_from_id": null,
                        "saved_from_msg_id": 0,
                        "saved_from_name": "",
                        "saved_from_peer": null,
                        "saved_out": false
                      },
                      "grouped_id": 0,
                      "id": 548,
                      "invert_media": false,
                      "legacy": false,
                      "media": {
                        "flags": 0,
                        "force_large_media": false,
                        "force_small_media": false,
                        "manual": false,
                        "safe": false,
                        "webpage": {
                          "attributes": null,
                          "author": "MikeMirzayanov",
                          "cached_page": {
                            "blocks": null,
                            "documents": null,
                            "flags": 0,
                            "part": false,
                            "photos": null,
                            "rtl": false,
                            "url": "",
                            "v2": false,
                            "views": 0
                          },
                          "description": "Hi, Codeforces!",
                          "display_url": "codeforces.com/blog/entry/156620",
                          "document": null,
                          "duration": 0,
                          "embed_height": 0,
                          "embed_type": "",
                          "embed_url": "",
                          "embed_width": 0,
                          "flags": 8479,
                          "has_large_media": true,
                          "hash": 0,
                          "id": 1848272979037921500,
                          "photo": {
                            "date": 1789098340,
                            "dcid": 4,
                            "file_reference": "AGqqJaCxklKFxRU0KTk5J4cPbB3M",
                            "flags": 0,
                            "has_stickers": false,
                            "id": 5847358396393263000,
                            "sizes": [
                              {
                                "bytes": "ASgo2aKKYHBOMUm0gsHmx79m8bvSn1k/8vX/AAP+taD3MUb7GcA+lXJWJg3ImoozmipKEb7p+lQRn94KkMqDfknCnDcVD9otk+YsRg4yVPX0qJRbaY09Cjn/AEv/ALaf1pt//wAfsn4fyFX/AC7bf5mDuznof...",
                                "type": "i"
                              }
                            ],
                            "video_sizes": null
                          },
                          "site_name": "Codeforces",
                          "title": "Telegram Returns as Title Sponsor of Codeforces!",
                          "type": "article",
                          "url": "https://codeforces.com/blog/entry/156620",
                          "video_cover_photo": false
                        }
                      },
                      "media_unread": false,
                      "mentioned": false,
                      "message": "🤝 Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world. \n\n ⚡CodeForces organizes over 100 coding contest...",
                      "noforwards": false,
                      "offline": false,
                      "out": false,
                      "paid_message_stars": 0,
                      "paid_suggested_post_stars": false,
                      "paid_suggested_post_ton": false,
                      "peer_id": {
                        "channel_id": 1006503122
                      },
                      "pinned": false,
                      "post": true,
                      "post_author": "Pavel Durov",
                      "quick_reply_shortcut_id": 0,
                      "reactions": {
                        "can_see_list": false,
                        "flags": 16,
                        "min": false,
                        "reactions_as_tags": false,
                        "recent_reactions": null,
                        "results": [
                          {
                            "chosen_order": 0,
                            "count": 10379,
                            "flags": 0,
                            "reaction": {}
                          }
                        ],
                        "top_reactors": [
                          {
                            "anonymous": false,
                            "count": 6666,
                            "flags": 9,
                            "my": false,
                            "peer_id": {
                              "user_id": 7957547929
                            },
                            "top": true
                          }
                        ]
                      },
                      "replies": {
                        "channel_id": 0,
                        "comments": false,
                        "flags": 0,
                        "max_id": 0,
                        "read_max_id": 0,
                        "recent_repliers": null,
                        "replies": 0,
                        "replies_pts": 0
                      },
                      "reply_markup": null,
                      "reply_to": null,
                      "report_delivery_until_date": 0,
                      "restriction_reason": null,
                      "saved_peer_id": null,
                      "schedule_repeat_period": 0,
                      "silent": true,
                      "suggested_post": {
                        "accepted": false,
                        "flags": 0,
                        "price": null,
                        "rejected": false,
                        "schedule_date": 0
                      },
                      "summary_from_language": "",
                      "ttl_period": 0,
                      "via_bot_id": 0,
                      "via_business_bot_id": 0,
                      "video_processing_pending": false,
                      "views": 1011229
                    }
                  ],
                  "offset_id_offset": 0,
                  "pts": 1804,
                  "topics": null,
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 4,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "Channel",
                      "flags": 33570859,
                      "flags2": 16,
                      "id": 136817688,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 587627495930570600,
                        "stripped_thumb": "AQgIsfL5X+1nNFFFcDOtHw=="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "Channel_Bot",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                }
              }
            },
            "description": "Requested messages."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Fetch specific channel messages by id",
        "tags": [
          "Channels"
        ]
      }
    },
    "/v1/channels/{peer_id}/participants": {
      "get": {
        "description": "Members of a public **group (megagroup)**, paginated.\n\n**Precondition.** Telegram exposes member lists for groups, not for broadcast channels: check `full_chat.can_view_participants` from `GET /v1/channels/{peer_id}` first. `true` means this call returns the list; `false` means it answers `404 NOT_FOUND`, which is Telegram's rule rather than an outage. Discussion groups linked to a channel (`full_chat.linked_chat_id`) normally do allow it.\n\nUse `filter` to narrow the list — `recent` (default), `admins`, `bots`, `kicked`, `banned`, or `search` together with `q`. `limit` defaults to 20 and is clamped to 100. Resolve a `@username` with `/v1/usernames/{username}` first to get the numeric `peer_id`.",
        "operationId": "getChannelParticipants",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "description": "One of `recent` (default), `admins`, `bots`, `kicked`, `banned`, `search`. `kicked`/`banned`/`search` use `q`.",
            "in": "query",
            "name": "filter",
            "schema": {
              "enum": [
                "recent",
                "admins",
                "bots",
                "kicked",
                "banned",
                "search"
              ],
              "type": "string"
            }
          },
          {
            "description": "Search query, used by the `kicked`/`banned`/`search` filters.",
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          },
          {
            "description": "Number of participants to skip.",
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": null,
                  "count": 2,
                  "participants": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": true,
                        "change_info": false,
                        "delete_messages": true,
                        "delete_stories": true,
                        "edit_messages": false,
                        "edit_stories": true,
                        "flags": 383032,
                        "invite_users": true,
                        "manage_call": true,
                        "manage_direct_messages": false,
                        "manage_ranks": true,
                        "manage_topics": false,
                        "other": true,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": true
                      },
                      "can_edit": false,
                      "date": 1705605083,
                      "flags": 0,
                      "inviter_id": 0,
                      "promoted_by": 2112945353,
                      "rank": "",
                      "self": false,
                      "user_id": 6660998254
                    }
                  ],
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 2,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "KILL BOT",
                      "flags": 33570859,
                      "flags2": 16,
                      "id": 6660998254,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 5384252555560864000,
                        "stripped_thumb": "AQgIoHy/IGMbh19c0UUUJAc="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "Killbotcrypto_bot",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/ChannelParticipants"
                }
              }
            },
            "description": "Matching participants."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get channel participants",
        "tags": [
          "Channels"
        ]
      }
    },
    "/v1/contacts/search": {
      "get": {
        "description": "Returns matching peers from the public directory.\n\n`q` must be at least 4 characters: Telegram's directory search ignores shorter queries and answers with an empty result rather than an error, so this API rejects them up front (400 `INVALID_REQUEST`, `query too short`) instead of returning an empty page you would have to interpret.\n\nA shorter term still works if you pad it to four characters with spaces: `?q=gta%20` searches for `gta` and returns GTA-prefixed peers. Telegram measures the query as sent but trims it before matching, and `q` is forwarded to it byte-for-byte.",
        "operationId": "searchContacts",
        "parameters": [
          {
            "description": "Search query — username substring, full name, or phone fragment. Minimum 4 characters as sent; pad a shorter term with spaces (`gta%20`). Telegram returns nothing for shorter queries.",
            "example": "durov",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "minLength": 4,
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsSearch"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": false,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": null,
                      "creator": false,
                      "date": 1677009269,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": null,
                      "fake": false,
                      "flags": 1187876,
                      "flags2": 327693,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": true,
                      "id": 1892497462,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 0,
                      "linked_monoforum_id": 1071892497462,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 130848,
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5116105648352464000,
                        "stripped_thumb": "AQgIoHy/IGMbh19c0UUUkgM="
                      },
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "@crypto",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": false,
                          "flags": 2,
                          "username": "crypto"
                        }
                      ],
                      "verified": false
                    }
                  ],
                  "my_results": null,
                  "results": [
                    {
                      "channel_id": 1892497462
                    }
                  ],
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 56196,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 29,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "°°°° 𝐍𝐄𝐖 𝐕𝐈𝐃𝐄𝐎 𝐇𝐃 °°°°",
                      "flags": 33570859,
                      "flags2": 4112,
                      "id": 8987056927,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 5,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 6147949928941033000,
                        "stripped_thumb": "AQgIzR5P2U5I8z05zRRRTbA/"
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "Moviesiubbot",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                }
              }
            },
            "description": "Matching peers."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Search Telegram contacts and the public directory",
        "tags": [
          "Identity"
        ]
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "description": "Streams the bytes of a file referenced by `file_id`. The id is obtained from a prior message, channel, or user response (look for `media.photo.id` or `media.document.id` in `/v1/peers/{peer_id}/history`, or `photo.id` on a user / channel profile). For photo files, an explicit `thumb_size` may be requested; if omitted, the largest available size is returned.",
        "operationId": "downloadFile",
        "parameters": [
          {
            "description": "Numeric file id obtained from a prior response (e.g. `media.photo.id`, `media.document.id`). File ids exceed 2^53, so a JSON parser that reads numbers as doubles (`JSON.parse` in JavaScript, among others) will silently round them. Read id fields as strings or big integers — from the raw response body — or the id you send back will not be the one we returned. A rounded id is repaired automatically when it names exactly one file we have seen; when several files round to the same value the response is 409 and you should add `peer_id` and `msg_id`.",
            "example": 1234567890,
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Peer the file was seen in. Optional; used only to disambiguate a `file_id` that lost precision in your JSON parser.",
            "in": "query",
            "name": "peer_id",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "Message the file was seen in. Optional; used with `peer_id` to disambiguate a `file_id` that lost precision in your JSON parser.",
            "in": "query",
            "name": "msg_id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Photo files only: requested thumbnail size code (e.g. `s`, `m`, `x`, `y`). Omit to receive the largest available size. Ignored for documents.",
            "in": "query",
            "name": "thumb_size",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "File bytes streamed as a binary response. `Content-Type` reflects the file's media type when known, otherwise `application/octet-stream`."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Download a file by id",
        "tags": [
          "Files"
        ]
      }
    },
    "/v1/messages/search": {
      "get": {
        "deprecated": true,
        "description": "Resolves a query against Telegram's public directory and returns the matching **entities** (`users`, `chats`, `results`) — the same response shape as `GET /v1/contacts/search`, which is the route to use directly in new integrations. `q` and `limit` are forwarded; `offset_id` and `cursor` are ignored. Kept in place so existing integrations keep working unchanged.",
        "operationId": "searchMessages",
        "parameters": [
          {
            "description": "Search query (forwarded to the public-directory search). Minimum 4 characters as sent; pad a shorter term with spaces (`gta%20`).",
            "example": "telegram",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "minLength": 4,
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactsSearch"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": false,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": false,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": null,
                      "creator": false,
                      "date": 1618340054,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": null,
                      "fake": false,
                      "flags": 139364,
                      "flags2": 12,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1362553581,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 0,
                      "linked_monoforum_id": 0,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 585338,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5382222487732560000,
                        "stripped_thumb": "AQgIo5XyPvDfnp3ooorZMlo/"
                      },
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "ПУТИН в Telegram",
                      "username": "Putin_tg_Russia",
                      "usernames": null,
                      "verified": false
                    }
                  ],
                  "my_results": [
                    {
                      "user_id": 777000
                    }
                  ],
                  "results": [
                    {
                      "channel_id": 1362553581
                    }
                  ],
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": false,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 0,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "Telegram",
                      "flags": 42074227,
                      "flags2": 16,
                      "id": 777000,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "42777",
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 3337190045231036,
                        "stripped_thumb": "AQgIk+Tyz13/AKUUUV1WOM8="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": {
                        "expires": 2147483647
                      },
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": true,
                      "username": "",
                      "usernames": null,
                      "verified": true
                    }
                  ]
                }
              }
            },
            "description": "Public-directory entity results (same shape as `searchContacts`)."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Missing or blank `q`, or a `q` shorter than 4 characters."
          }
        },
        "summary": "Deprecated — aliases Search Contacts",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/openapi.json": {
      "get": {
        "description": "Returns this OpenAPI document. Cache-friendly.",
        "operationId": "getOpenAPIDocument",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "OpenAPI 3.0 spec."
          }
        },
        "summary": "OpenAPI document",
        "tags": [
          "Service"
        ]
      }
    },
    "/v1/peers/{peer_id}/history": {
      "get": {
        "description": "Returns paginated message history for a peer. Use the `next_page`/`prev_page` cursors from the response, or pass `offset_id` directly.",
        "operationId": "getHistory",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          },
          {
            "$ref": "#/components/parameters/CursorQuery"
          },
          {
            "description": "Return messages with `id < offset_id`. Ignored when `cursor` is supplied.",
            "in": "query",
            "name": "offset_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Return messages strictly older than this Unix timestamp.",
            "in": "query",
            "name": "offset_date",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Items to skip relative to `offset_id`. Negative values shift toward newer messages.",
            "in": "query",
            "name": "add_offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Return messages with `id < max_id`.",
            "in": "query",
            "name": "max_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Return messages with `id > min_id`.",
            "in": "query",
            "name": "min_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Cache-busting hash; leave 0 unless you are reusing a prior result.",
            "in": "query",
            "name": "hash",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesEnvelope"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "count": 481,
                  "flags": 0,
                  "inexact": false,
                  "messages": [
                    {
                      "date": 1789142642,
                      "edit_date": 1789142657,
                      "edit_hide": true,
                      "effect": 0,
                      "entities": [
                        {
                          "document_id": 5463249828450425000,
                          "length": 2,
                          "offset": 0
                        }
                      ],
                      "factcheck": {
                        "country": "",
                        "flags": 0,
                        "hash": 0,
                        "need_check": false,
                        "text": {
                          "entities": null,
                          "text": ""
                        }
                      },
                      "flags": 3270272,
                      "flags2": 0,
                      "forwards": 3291,
                      "from_boosts_applied": 0,
                      "from_id": null,
                      "from_rank": "",
                      "from_scheduled": false,
                      "fwd_from": {
                        "channel_post": 0,
                        "date": 0,
                        "flags": 0,
                        "from_id": null,
                        "from_name": "",
                        "imported": false,
                        "post_author": "",
                        "psa_type": "",
                        "saved_date": 0,
                        "saved_from_id": null,
                        "saved_from_msg_id": 0,
                        "saved_from_name": "",
                        "saved_from_peer": null,
                        "saved_out": false
                      },
                      "grouped_id": 0,
                      "id": 548,
                      "invert_media": false,
                      "legacy": false,
                      "media": {
                        "flags": 0,
                        "force_large_media": false,
                        "force_small_media": false,
                        "manual": false,
                        "safe": false,
                        "webpage": {
                          "attributes": null,
                          "author": "MikeMirzayanov",
                          "cached_page": {
                            "blocks": null,
                            "documents": null,
                            "flags": 0,
                            "part": false,
                            "photos": null,
                            "rtl": false,
                            "url": "",
                            "v2": false,
                            "views": 0
                          },
                          "description": "Hi, Codeforces!",
                          "display_url": "codeforces.com/blog/entry/156620",
                          "document": null,
                          "duration": 0,
                          "embed_height": 0,
                          "embed_type": "",
                          "embed_url": "",
                          "embed_width": 0,
                          "flags": 8479,
                          "has_large_media": true,
                          "hash": 0,
                          "id": 1848272979037921500,
                          "photo": {
                            "date": 1789098340,
                            "dcid": 4,
                            "file_reference": "AGqqJaAkSITJF/KIzNeK3r2Tjz6F",
                            "flags": 0,
                            "has_stickers": false,
                            "id": 5847358396393263000,
                            "sizes": [
                              {
                                "bytes": "ASgo2aKKYHBOMUm0gsHmx79m8bvSn1k/8vX/AAP+taD3MUb7GcA+lXJWJg3ImoozmipKEb7p+lQRn94KkMqDfknCnDcVD9otk+YsRg4yVPX0qJRbaY09Cjn/AEv/ALaf1pt//wAfsn4fyFX/AC7bf5mDuznof...",
                                "type": "i"
                              }
                            ],
                            "video_sizes": null
                          },
                          "site_name": "Codeforces",
                          "title": "Telegram Returns as Title Sponsor of Codeforces!",
                          "type": "article",
                          "url": "https://codeforces.com/blog/entry/156620",
                          "video_cover_photo": false
                        }
                      },
                      "media_unread": false,
                      "mentioned": false,
                      "message": "🤝 Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world. \n\n ⚡CodeForces organizes over 100 coding contest...",
                      "noforwards": false,
                      "offline": false,
                      "out": false,
                      "paid_message_stars": 0,
                      "paid_suggested_post_stars": false,
                      "paid_suggested_post_ton": false,
                      "peer_id": {
                        "channel_id": 1006503122
                      },
                      "pinned": false,
                      "post": true,
                      "post_author": "Pavel Durov",
                      "quick_reply_shortcut_id": 0,
                      "reactions": {
                        "can_see_list": false,
                        "flags": 16,
                        "min": false,
                        "reactions_as_tags": false,
                        "recent_reactions": null,
                        "results": [
                          {
                            "chosen_order": 0,
                            "count": 10379,
                            "flags": 0,
                            "reaction": {}
                          }
                        ],
                        "top_reactors": [
                          {
                            "anonymous": false,
                            "count": 6666,
                            "flags": 9,
                            "my": false,
                            "peer_id": {
                              "user_id": 7957547929
                            },
                            "top": true
                          }
                        ]
                      },
                      "replies": {
                        "channel_id": 0,
                        "comments": false,
                        "flags": 0,
                        "max_id": 0,
                        "read_max_id": 0,
                        "recent_repliers": null,
                        "replies": 0,
                        "replies_pts": 0
                      },
                      "reply_markup": null,
                      "reply_to": null,
                      "report_delivery_until_date": 0,
                      "restriction_reason": null,
                      "saved_peer_id": null,
                      "schedule_repeat_period": 0,
                      "silent": true,
                      "suggested_post": {
                        "accepted": false,
                        "flags": 0,
                        "price": null,
                        "rejected": false,
                        "schedule_date": 0
                      },
                      "summary_from_language": "",
                      "ttl_period": 0,
                      "via_bot_id": 0,
                      "via_business_bot_id": 0,
                      "video_processing_pending": false,
                      "views": 1011229
                    }
                  ],
                  "next_page": "djEuaC41NDYuMC4wLjAuMC4wLjM",
                  "offset_id_offset": 0,
                  "pts": 1804,
                  "topics": null,
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 4,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "Channel",
                      "flags": 33570859,
                      "flags2": 16,
                      "id": 136817688,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 587627495930570600,
                        "stripped_thumb": "AQgIsfL5X+1nNFFFcDOtHw=="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "Channel_Bot",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                }
              }
            },
            "description": "Paginated message history."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get message history",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/peers/{peer_id}/messages/{msg_id}/discussion": {
      "get": {
        "description": "Returns the root message of a channel post's linked discussion thread. Fails with 404 if the post has no discussion thread.\n\n**Precondition.** Only posts with comments enabled have a thread. In `GET /v1/peers/{peer_id}/history` each message carries `replies.comments`: `true` means this call returns the thread, `false` means 404 `NOT_FOUND`. A channel without a linked discussion group (`full_chat.linked_chat_id` = 0) never has one.",
        "operationId": "getDiscussionMessage",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "$ref": "#/components/parameters/MsgIDPath"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscussionMessage"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": false,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": false,
                      "broadcast_messages_allowed": false,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": null,
                      "creator": false,
                      "date": 1680182888,
                      "default_banned_rights": {
                        "change_info": true,
                        "edit_rank": true,
                        "embed_links": true,
                        "flags": 100533636,
                        "invite_users": false,
                        "manage_topics": true,
                        "pin_messages": true,
                        "send_audios": true,
                        "send_docs": true,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": true,
                        "send_messages": false,
                        "send_photos": true,
                        "send_plain": false,
                        "send_polls": true,
                        "send_roundvideos": true,
                        "send_stickers": false,
                        "send_videos": true,
                        "send_voices": true,
                        "until_date": 2147483647,
                        "view_messages": false
                      },
                      "emoji_status": null,
                      "fake": false,
                      "flags": 1319172,
                      "flags2": 13,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": true,
                      "id": 1965425283,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 0,
                      "linked_monoforum_id": 0,
                      "megagroup": true,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5006025692386800000,
                        "stripped_thumb": "AQgIz22eQu3bnv8A3s/4UUUVoQkf"
                      },
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "@crypto community!",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": false,
                          "flags": 2,
                          "username": "cryptoofficial"
                        }
                      ],
                      "verified": false
                    }
                  ],
                  "flags": 5,
                  "max_id": 404662,
                  "messages": [
                    {
                      "date": 1789500082,
                      "edit_date": 1789500707,
                      "edit_hide": true,
                      "effect": 0,
                      "entities": [
                        {
                          "document_id": 5062083368854751000,
                          "length": 2,
                          "offset": 77
                        }
                      ],
                      "factcheck": {
                        "country": "",
                        "flags": 0,
                        "hash": 0,
                        "need_check": false,
                        "text": {
                          "entities": null,
                          "text": ""
                        }
                      },
                      "flags": 28346244,
                      "flags2": 0,
                      "forwards": 21,
                      "from_boosts_applied": 0,
                      "from_id": {
                        "channel_id": 1892497462
                      },
                      "from_rank": "",
                      "from_scheduled": false,
                      "fwd_from": {
                        "channel_post": 4027,
                        "date": 1789500079,
                        "flags": 21,
                        "from_id": {
                          "channel_id": 1892497462
                        },
                        "from_name": "",
                        "imported": false,
                        "post_author": "",
                        "psa_type": "",
                        "saved_date": 0,
                        "saved_from_id": null,
                        "saved_from_msg_id": 4027,
                        "saved_from_name": "",
                        "saved_from_peer": {
                          "channel_id": 1892497462
                        },
                        "saved_out": false
                      },
                      "grouped_id": 0,
                      "id": 403831,
                      "invert_media": false,
                      "legacy": false,
                      "media": {
                        "alt_documents": [
                          {
                            "attributes": [
                              {
                                "duration": 8.867,
                                "flags": 34,
                                "h": 720,
                                "nosound": false,
                                "preload_prefix_size": 0,
                                "round_message": false,
                                "supports_streaming": true,
                                "video_codec": "av01",
                                "video_start_ts": 0,
                                "w": 1280
                              }
                            ],
                            "date": 1789500078,
                            "dcid": 4,
                            "file_reference": "AnUmAoMABil3aqol6yzFKUdMbVMfXABbN0SRWYY=",
                            "flags": 1,
                            "id": 5859477526627231000,
                            "mime_type": "video/mp4",
                            "size": 937857,
                            "thumbs": [
                              {
                                "bytes": "ARYoylU9RSuexH60n0pV5bPp7UIZKyRC1DANv9c8VGq8dRinZBwCwwaYQQcLyB3FNqwXuBOD0FFIwx1zRUgCHrihmzjNFFMBMipIkZo2cEYWiimxIjY5oooqRn8=",
                                "type": "i"
                              }
                            ],
                            "video_thumbs": null
                          }
                        ],
                        "document": {
                          "attributes": [
                            {
                              "duration": 8.867,
                              "flags": 34,
                              "h": 720,
                              "nosound": false,
                              "preload_prefix_size": 0,
                              "round_message": false,
                              "supports_streaming": true,
                              "video_codec": "h264",
                              "video_start_ts": 0,
                              "w": 1280
                            }
                          ],
                          "date": 1789500076,
                          "dcid": 4,
                          "file_reference": "AnUmAoMABil3aqol626YpPUdQYn8cxEmINd0dkA=",
                          "flags": 1,
                          "id": 5857189966915839000,
                          "mime_type": "video/mp4",
                          "size": 1742693,
                          "thumbs": [
                            {
                              "bytes": "ARYoylU9RSuexH60n0pV5bPpQhkrJELUMA2/1zxUarx1GKdkHALDBphBBwvIHcU2rBe4E4PQUUjDHXNFSAIeuKGbOM0UUwE4qSJGaNnBGFoopsSI2OaKKKkZ",
                              "type": "i"
                            }
                          ],
                          "video_thumbs": null
                        },
                        "flags": 97,
                        "nopremium": false,
                        "round": false,
                        "spoiler": false,
                        "ttl_seconds": 0,
                        "video": true,
                        "video_cover": null,
                        "video_timestamp": 0,
                        "voice": false
                      },
                      "media_unread": false,
                      "mentioned": false,
                      "message": "Senator Elizabeth Warren calls on Congress to block the Crypto Clarity Act.\n\n🦘 Roobet – The #1 Crypto Casino & Sportsbook.",
                      "noforwards": false,
                      "offline": false,
                      "out": false,
                      "paid_message_stars": 0,
                      "paid_suggested_post_stars": false,
                      "paid_suggested_post_ton": false,
                      "peer_id": {
                        "channel_id": 1965425283
                      },
                      "pinned": true,
                      "post": false,
                      "post_author": "",
                      "quick_reply_shortcut_id": 0,
                      "reactions": {
                        "can_see_list": false,
                        "flags": 16,
                        "min": false,
                        "reactions_as_tags": false,
                        "recent_reactions": null,
                        "results": [
                          {
                            "chosen_order": 0,
                            "count": 1,
                            "flags": 0,
                            "reaction": {}
                          }
                        ],
                        "top_reactors": [
                          {
                            "anonymous": false,
                            "count": 1,
                            "flags": 9,
                            "my": false,
                            "peer_id": {
                              "channel_id": 2324680154
                            },
                            "top": true
                          }
                        ]
                      },
                      "replies": {
                        "channel_id": 0,
                        "comments": false,
                        "flags": 4,
                        "max_id": 404662,
                        "read_max_id": 0,
                        "recent_repliers": null,
                        "replies": 23,
                        "replies_pts": 665564
                      },
                      "reply_markup": null,
                      "reply_to": null,
                      "report_delivery_until_date": 0,
                      "restriction_reason": null,
                      "saved_peer_id": null,
                      "schedule_repeat_period": 0,
                      "silent": false,
                      "suggested_post": {
                        "accepted": false,
                        "flags": 0,
                        "price": null,
                        "rejected": false,
                        "schedule_date": 0
                      },
                      "summary_from_language": "",
                      "ttl_period": 0,
                      "via_bot_id": 0,
                      "via_business_bot_id": 0,
                      "video_processing_pending": false,
                      "views": 2463
                    }
                  ],
                  "read_inbox_max_id": 0,
                  "read_outbox_max_id": 404662,
                  "unread_count": 23,
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 4,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "Channel",
                      "flags": 33570859,
                      "flags2": 16,
                      "id": 136817688,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 587627495930570600,
                        "stripped_thumb": "AQgIsfL5X+1nNFFFcDOtHw=="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "Channel_Bot",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                }
              }
            },
            "description": "Discussion-thread root with related chats/users."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Resolve a channel post to its discussion thread root",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/peers/{peer_id}/messages/{msg_id}/replies": {
      "get": {
        "description": "Returns the discussion thread for a channel post. Use the `next_page`/`prev_page` cursors from the response to paginate. Fails with 404 if the post has no discussion thread.\n\n**Precondition.** Only posts with comments enabled have a thread. In `GET /v1/peers/{peer_id}/history` each message carries `replies.comments`: `true` means this call returns the thread, `false` means 404 `NOT_FOUND`. A channel without a linked discussion group (`full_chat.linked_chat_id` = 0) never has one.",
        "operationId": "getReplies",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "$ref": "#/components/parameters/MsgIDPath"
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          },
          {
            "$ref": "#/components/parameters/CursorQuery"
          },
          {
            "description": "See /history.",
            "in": "query",
            "name": "offset_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "See /history.",
            "in": "query",
            "name": "add_offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "See /history.",
            "in": "query",
            "name": "max_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "See /history.",
            "in": "query",
            "name": "min_id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "See /history.",
            "in": "query",
            "name": "hash",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesEnvelope"
                },
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": false,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": false,
                      "broadcast_messages_allowed": false,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": null,
                      "creator": false,
                      "date": 1680182888,
                      "default_banned_rights": {
                        "change_info": true,
                        "edit_rank": true,
                        "embed_links": true,
                        "flags": 100533636,
                        "invite_users": false,
                        "manage_topics": true,
                        "pin_messages": true,
                        "send_audios": true,
                        "send_docs": true,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": true,
                        "send_messages": false,
                        "send_photos": true,
                        "send_plain": false,
                        "send_polls": true,
                        "send_roundvideos": true,
                        "send_stickers": false,
                        "send_videos": true,
                        "send_voices": true,
                        "until_date": 2147483647,
                        "view_messages": false
                      },
                      "emoji_status": null,
                      "fake": false,
                      "flags": 1319172,
                      "flags2": 13,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": true,
                      "id": 1965425283,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 0,
                      "linked_monoforum_id": 0,
                      "megagroup": true,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5006025692386800000,
                        "stripped_thumb": "AQgIz22eQu3bnv8A3s/4UUUVoQkf"
                      },
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "@crypto community!",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": false,
                          "flags": 2,
                          "username": "cryptoofficial"
                        }
                      ],
                      "verified": false
                    }
                  ],
                  "count": 23,
                  "flags": 0,
                  "inexact": false,
                  "messages": [
                    {
                      "date": 1789527426,
                      "edit_date": 0,
                      "edit_hide": false,
                      "effect": 0,
                      "entities": [
                        {
                          "length": 32,
                          "offset": 3
                        }
                      ],
                      "factcheck": {
                        "country": "",
                        "flags": 0,
                        "hash": 0,
                        "need_check": false,
                        "text": {
                          "entities": null,
                          "text": ""
                        }
                      },
                      "flags": 968,
                      "flags2": 0,
                      "forwards": 0,
                      "from_boosts_applied": 0,
                      "from_id": {
                        "user_id": 8820547023
                      },
                      "from_rank": "",
                      "from_scheduled": false,
                      "fwd_from": {
                        "channel_post": 0,
                        "date": 0,
                        "flags": 0,
                        "from_id": null,
                        "from_name": "",
                        "imported": false,
                        "post_author": "",
                        "psa_type": "",
                        "saved_date": 0,
                        "saved_from_id": null,
                        "saved_from_msg_id": 0,
                        "saved_from_name": "",
                        "saved_from_peer": null,
                        "saved_out": false
                      },
                      "grouped_id": 0,
                      "id": 404662,
                      "invert_media": false,
                      "legacy": false,
                      "media": {
                        "alt_documents": null,
                        "document": {
                          "attributes": [
                            {
                              "duration": 4.634,
                              "flags": 42,
                              "h": 464,
                              "nosound": true,
                              "preload_prefix_size": 0,
                              "round_message": false,
                              "supports_streaming": true,
                              "video_codec": "h264",
                              "video_start_ts": 0,
                              "w": 848
                            }
                          ],
                          "date": 1788594227,
                          "dcid": 4,
                          "file_reference": "AnUmAoMABiy2aqol6/clpnSJVXlRm7U+Oz2pUkM=",
                          "flags": 1,
                          "id": 5829106468552445000,
                          "mime_type": "video/mp4",
                          "size": 479062,
                          "thumbs": [
                            {
                              "bytes": "ARYorxDahbuaWALI7Z7dqYZgRz2qssrRtuFbOSsUabHAxT3O2M9qoJdb5FyCBVvflcE9exFRFaXGV5ZMIrgE+pop0hA4GMe1FS2IILqCKJY3jywGCdinPPvUn262I/1P/kNaKKpokX7fBgAxn/v2tB1KAAARs...",
                              "type": "i"
                            }
                          ],
                          "video_thumbs": null
                        },
                        "flags": 1,
                        "nopremium": false,
                        "round": false,
                        "spoiler": false,
                        "ttl_seconds": 0,
                        "video": false,
                        "video_cover": null,
                        "video_timestamp": 0,
                        "voice": false
                      },
                      "media_unread": false,
                      "mentioned": false,
                      "message": "👇 Д​​​​​€ᛠርKO€ ​ᛖΘΛΘԿK0 ᛠYᛠ ​👇\n~  https://telegra.ph/AKTUALNAYA-SSYLKA-NA-NASHEGO-BOTA-09-16-35",
                      "noforwards": false,
                      "offline": false,
                      "out": false,
                      "paid_message_stars": 0,
                      "paid_suggested_post_stars": false,
                      "paid_suggested_post_ton": false,
                      "peer_id": {
                        "channel_id": 1965425283
                      },
                      "pinned": false,
                      "post": false,
                      "post_author": "",
                      "quick_reply_shortcut_id": 0,
                      "reactions": {
                        "can_see_list": false,
                        "flags": 0,
                        "min": false,
                        "reactions_as_tags": false,
                        "recent_reactions": null,
                        "results": null,
                        "top_reactors": null
                      },
                      "replies": {
                        "channel_id": 0,
                        "comments": false,
                        "flags": 0,
                        "max_id": 0,
                        "read_max_id": 0,
                        "recent_repliers": null,
                        "replies": 0,
                        "replies_pts": 0
                      },
                      "reply_markup": {
                        "rows": [
                          {
                            "buttons": [
                              {
                                "flags": 1024,
                                "style": {
                                  "bg_danger": false,
                                  "bg_primary": false,
                                  "bg_success": true,
                                  "flags": 4,
                                  "icon": 0
                                },
                                "text": "👉 ОТКРЫТЬ НАШЕГО БОТА 👈",
                                "url": "https://telegra.ph/AKTUALNAYA-SSYLKA-NA-NASHEGO-BOTA-09-16-35"
                              }
                            ]
                          }
                        ]
                      },
                      "reply_to": {
                        "flags": 18,
                        "forum_topic": false,
                        "poll_option": null,
                        "quote": false,
                        "quote_entities": null,
                        "quote_offset": 0,
                        "quote_text": "",
                        "reply_from": {
                          "channel_post": 0,
                          "date": 0,
                          "flags": 0,
                          "from_id": null,
                          "from_name": "",
                          "imported": false,
                          "post_author": "",
                          "psa_type": "",
                          "saved_date": 0,
                          "saved_from_id": null,
                          "saved_from_msg_id": 0,
                          "saved_from_name": "",
                          "saved_from_peer": null,
                          "saved_out": false
                        },
                        "reply_media": null,
                        "reply_to_msg_id": 404661,
                        "reply_to_peer_id": null,
                        "reply_to_scheduled": false,
                        "reply_to_top_id": 403831,
                        "todo_item_id": 0
                      },
                      "report_delivery_until_date": 0,
                      "restriction_reason": null,
                      "saved_peer_id": null,
                      "schedule_repeat_period": 0,
                      "silent": false,
                      "suggested_post": {
                        "accepted": false,
                        "flags": 0,
                        "price": null,
                        "rejected": false,
                        "schedule_date": 0
                      },
                      "summary_from_language": "",
                      "ttl_period": 0,
                      "via_bot_id": 0,
                      "via_business_bot_id": 0,
                      "video_processing_pending": false,
                      "views": 0
                    }
                  ],
                  "next_page": "djEuci40MDQ2NTEuMC4wLjAuMC4z",
                  "offset_id_offset": 0,
                  "pts": 665564,
                  "topics": null,
                  "users": [
                    {
                      "apply_min_photo": false,
                      "attach_menu_enabled": false,
                      "bot": false,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 0,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": true,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "",
                      "flags": 8193,
                      "flags2": 0,
                      "id": 8820547023,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": null,
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": false,
                      "support": false,
                      "username": "",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                }
              }
            },
            "description": "Reply thread messages."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get replies thread for a channel post",
        "tags": [
          "Messages"
        ]
      }
    },
    "/v1/peers/{peer_id}/stories": {
      "get": {
        "description": "Active stories of a public channel or user. Answers `200` with a `stories` object for the peer; when nothing is live at that moment its inner `stories` field is `null` rather than an array, so read it as \"no active stories\" and not as an error (measured 16 September 2026 on channel id 1006503122). Story ids from this list stay resolvable afterwards through `GET /v1/peers/{peer_id}/stories/{ids}`. Resolve a `@username` with `/v1/usernames/{username}` first to get the numeric `peer_id`.",
        "operationId": "getPeerStories",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "stories": {
                    "flags": 0,
                    "max_read_id": 0,
                    "peer": {
                      "channel_id": 1006503122
                    },
                    "stories": null
                  },
                  "users": null
                },
                "schema": {
                  "$ref": "#/components/schemas/PeerStories"
                }
              }
            },
            "description": "Active stories."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get a peer's active stories",
        "tags": [
          "Stories"
        ]
      }
    },
    "/v1/peers/{peer_id}/stories/{ids}": {
      "get": {
        "description": "Specific stories of a peer by id. `ids` is a comma-separated list of story ids (for example `1,2,3`), and the answer carries `count` plus the matching story objects with caption, entities, date and media. Ids are permanent: a request for `1,2,3` on channel id 1006503122 returned `count: 3` including a story posted 3 December 2023, so archived stories remain readable long after the 24-hour window in which they are \"active\" (measured 16 September 2026). An id nobody posted answers `200` with `count: 0` and `stories: null`; a list that cannot be parsed answers `400 INVALID_REQUEST`. Story media file references are downloadable via `GET /v1/files/{file_id}`. Resolve a `@username` with `/v1/usernames/{username}` first to get the numeric `peer_id`.",
        "operationId": "getStoriesByID",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "description": "Comma-separated list of story ids (e.g. `42,41`). Maximum 100.",
            "example": "42",
            "in": "path",
            "name": "ids",
            "required": true,
            "schema": {
              "pattern": "^\\d+(,\\d+)*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "_note": "Shape derived from gotd StoriesStories; small hand-built example, not captured live.",
                  "_synthetic": true,
                  "chats": [],
                  "stories": [
                    {
                      "date": 1748962479,
                      "expire_date": 1749048879,
                      "id": 42,
                      "media": {
                        "photo_id": 5393326112060334000
                      }
                    }
                  ],
                  "users": []
                },
                "schema": {
                  "$ref": "#/components/schemas/StoriesByID"
                }
              }
            },
            "description": "Requested stories."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Fetch specific stories by id",
        "tags": [
          "Stories"
        ]
      }
    },
    "/v1/phones/{phone}": {
      "get": {
        "description": "Returns the peer reference for a phone number in international format. Fails with 404 if no public profile is associated with the number.",
        "operationId": "resolvePhone",
        "parameters": [
          {
            "description": "Phone number in international format. URL-encode the leading `+` as `%2B`.",
            "example": "+12025550100",
            "in": "path",
            "name": "phone",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": null,
                  "peer": {
                    "user_id": 5445071716
                  },
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": false,
                      "bot_active_users": 0,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": false,
                      "bot_info_version": 0,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": false,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "Maqsud",
                      "flags": 33554471,
                      "flags2": 16,
                      "id": 5445071716,
                      "lang_code": "",
                      "last_name": "Eshqobilov",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 5357454729887742000,
                        "stripped_thumb": "AQgIIpYYbePzSxcjnAooopDP"
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "",
                      "usernames": null,
                      "verified": false
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/ResolvedPeer"
                }
              }
            },
            "description": "Peer reference."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Resolve a Telegram phone number",
        "tags": [
          "Identity"
        ]
      }
    },
    "/v1/usernames/{username}": {
      "get": {
        "description": "Returns the peer reference for a public username. Fails with 404 if the username is not registered.",
        "operationId": "resolveUsername",
        "parameters": [
          {
            "description": "Public @username, with or without leading @. Case-insensitive.",
            "example": "durov",
            "in": "path",
            "name": "username",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "chats": [
                    {
                      "admin_rights": {
                        "add_admins": false,
                        "anonymous": false,
                        "ban_users": false,
                        "change_info": false,
                        "delete_messages": false,
                        "delete_stories": false,
                        "edit_messages": false,
                        "edit_stories": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_call": false,
                        "manage_direct_messages": false,
                        "manage_ranks": false,
                        "manage_topics": false,
                        "other": false,
                        "pin_messages": false,
                        "post_messages": false,
                        "post_stories": false
                      },
                      "autotranslation": true,
                      "banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "bot_verification_icon": 0,
                      "broadcast": true,
                      "broadcast_messages_allowed": true,
                      "call_active": false,
                      "call_not_empty": false,
                      "color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 12,
                        "flags": 3
                      },
                      "creator": false,
                      "date": 1446056458,
                      "default_banned_rights": {
                        "change_info": false,
                        "edit_rank": false,
                        "embed_links": false,
                        "flags": 0,
                        "invite_users": false,
                        "manage_topics": false,
                        "pin_messages": false,
                        "send_audios": false,
                        "send_docs": false,
                        "send_games": false,
                        "send_gifs": false,
                        "send_inline": false,
                        "send_media": false,
                        "send_messages": false,
                        "send_photos": false,
                        "send_plain": false,
                        "send_polls": false,
                        "send_roundvideos": false,
                        "send_stickers": false,
                        "send_videos": false,
                        "send_voices": false,
                        "until_date": 0,
                        "view_messages": false
                      },
                      "emoji_status": {
                        "center_color": 3553080,
                        "collectible_id": 5821047735515611000,
                        "document_id": 5228932931224887000,
                        "edge_color": 921359,
                        "flags": 0,
                        "pattern_color": 7104616,
                        "pattern_document_id": 5440687192718467000,
                        "slug": "PartySparkler-5277",
                        "text_color": 9211793,
                        "title": "Party Sparkler #5277",
                        "until": 0
                      },
                      "fake": false,
                      "flags": 8356,
                      "flags2": 362381,
                      "forum": false,
                      "forum_tabs": false,
                      "gigagroup": false,
                      "has_geo": false,
                      "has_link": false,
                      "id": 1006503122,
                      "join_request": false,
                      "join_to_send": false,
                      "left": true,
                      "level": 100,
                      "linked_monoforum_id": 1071006503122,
                      "megagroup": false,
                      "min": false,
                      "monoforum": false,
                      "noforwards": false,
                      "participants_count": 0,
                      "photo": {
                        "dcid": 2,
                        "flags": 2,
                        "has_video": false,
                        "photo_id": 5393326112060334000,
                        "stripped_thumb": "AQgIuMSuqKA8hDA7hg7enAooooA/"
                      },
                      "profile_color": {
                        "background_emoji_id": 5424912684078348000,
                        "color": 15,
                        "flags": 3
                      },
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "send_paid_messages_stars": 0,
                      "signature_profiles": false,
                      "signatures": false,
                      "slowmode_enabled": false,
                      "stories_hidden": false,
                      "stories_hidden_min": true,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "subscription_until_date": 0,
                      "title": "Pavel Durov",
                      "username": "",
                      "usernames": [
                        {
                          "active": true,
                          "editable": true,
                          "flags": 3,
                          "username": "durov"
                        }
                      ],
                      "verified": true
                    }
                  ],
                  "peer": {
                    "channel_id": 1006503122
                  },
                  "users": null
                },
                "schema": {
                  "$ref": "#/components/schemas/ResolvedPeer"
                }
              }
            },
            "description": "Peer reference. `chats[]` and `users[]` may be null."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Resolve a public Telegram @username",
        "tags": [
          "Identity"
        ]
      }
    },
    "/v1/users/{peer_id}": {
      "get": {
        "description": "Returns the extended profile for a user. Fails with 404 if the user does not exist.",
        "operationId": "getFullUser",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDetails"
                },
                "example": {
                  "chats": null,
                  "full_user": {
                    "about": "BotFather is the one bot to rule them all. Use it to create new bot accounts and manage your existing bots.",
                    "birthday": {
                      "day": 0,
                      "flags": 0,
                      "month": 0,
                      "year": 0
                    },
                    "blocked": false,
                    "blocked_my_stories_from": false,
                    "bot_broadcast_admin_rights": {
                      "add_admins": false,
                      "anonymous": false,
                      "ban_users": false,
                      "change_info": false,
                      "delete_messages": false,
                      "delete_stories": false,
                      "edit_messages": false,
                      "edit_stories": false,
                      "flags": 0,
                      "invite_users": false,
                      "manage_call": false,
                      "manage_direct_messages": false,
                      "manage_ranks": false,
                      "manage_topics": false,
                      "other": false,
                      "pin_messages": false,
                      "post_messages": false,
                      "post_stories": false
                    },
                    "bot_can_manage_emoji_status": false,
                    "bot_group_admin_rights": {
                      "add_admins": false,
                      "anonymous": false,
                      "ban_users": false,
                      "change_info": false,
                      "delete_messages": false,
                      "delete_stories": false,
                      "edit_messages": false,
                      "edit_stories": false,
                      "flags": 0,
                      "invite_users": false,
                      "manage_call": false,
                      "manage_direct_messages": false,
                      "manage_ranks": false,
                      "manage_topics": false,
                      "other": false,
                      "pin_messages": false,
                      "post_messages": false,
                      "post_stories": false
                    },
                    "bot_info": {
                      "app_settings": {
                        "background_color": 1712166,
                        "background_dark_color": 1712166,
                        "flags": 30,
                        "header_color": 2173491,
                        "header_dark_color": 2173491,
                        "placeholder_path": null
                      },
                      "commands": [
                        {
                          "command": "newbot",
                          "description": "create a new bot"
                        }
                      ],
                      "description": "BotFather is the one bot to rule them all. Use it to create new bot accounts and manage your existing bots.\n\nAbout Telegram bots:\nhttps://core.telegram.org/b...",
                      "description_document": null,
                      "description_photo": null,
                      "flags": 270,
                      "has_preview_medias": false,
                      "menu_button": {
                        "text": "Open",
                        "url": "https://webappinternal.telegram.org/botfather"
                      },
                      "privacy_policy_url": "",
                      "user_id": 0,
                      "verifier_settings": {
                        "can_modify_custom_description": false,
                        "company": "",
                        "custom_description": "",
                        "flags": 0,
                        "icon": 0
                      }
                    },
                    "bot_manager_id": 0,
                    "bot_verification": {
                      "bot_id": 0,
                      "description": "",
                      "icon": 0
                    },
                    "business_away_message": {
                      "flags": 0,
                      "offline_only": false,
                      "recipients": {
                        "contacts": false,
                        "exclude_selected": false,
                        "existing_chats": false,
                        "flags": 0,
                        "new_chats": false,
                        "non_contacts": false,
                        "users": null
                      },
                      "schedule": null,
                      "shortcut_id": 0
                    },
                    "business_greeting_message": {
                      "no_activity_days": 0,
                      "recipients": {
                        "contacts": false,
                        "exclude_selected": false,
                        "existing_chats": false,
                        "flags": 0,
                        "new_chats": false,
                        "non_contacts": false,
                        "users": null
                      },
                      "shortcut_id": 0
                    },
                    "business_intro": {
                      "description": "",
                      "flags": 0,
                      "sticker": null,
                      "title": ""
                    },
                    "business_location": {
                      "address": "",
                      "flags": 0,
                      "geo_point": null
                    },
                    "business_work_hours": {
                      "flags": 0,
                      "open_now": false,
                      "timezone_id": "",
                      "weekly_open": null
                    },
                    "can_pin_message": true,
                    "can_view_revenue": false,
                    "common_chats_count": 0,
                    "contact_require_premium": false,
                    "disallowed_gifts": {
                      "disallow_limited_stargifts": false,
                      "disallow_premium_gifts": false,
                      "disallow_stargifts_from_channels": false,
                      "disallow_unique_stargifts": false,
                      "disallow_unlimited_stargifts": false,
                      "flags": 0
                    },
                    "display_gifts_button": false,
                    "fallback_photo": null,
                    "flags": 142,
                    "flags2": 0,
                    "folder_id": 0,
                    "has_scheduled": false,
                    "id": 93372553,
                    "main_tab": null,
                    "noforwards_my_enabled": false,
                    "noforwards_peer_enabled": false,
                    "note": {
                      "entities": null,
                      "text": ""
                    },
                    "notify_settings": {
                      "android_sound": null,
                      "flags": 0,
                      "ios_sound": null,
                      "mute_until": 0,
                      "other_sound": null,
                      "show_previews": false,
                      "silent": false,
                      "stories_android_sound": null,
                      "stories_hide_sender": false,
                      "stories_ios_sound": null,
                      "stories_muted": false,
                      "stories_other_sound": null
                    },
                    "personal_channel_id": 0,
                    "personal_channel_message": 0,
                    "personal_photo": null,
                    "phone_calls_available": false,
                    "phone_calls_private": false,
                    "pinned_msg_id": 0,
                    "private_forward_name": "",
                    "profile_photo": {
                      "date": 1435136511,
                      "dcid": 1,
                      "file_reference": "AGqqJaali0lQdF0vj5OEVcXTmkzd",
                      "flags": 0,
                      "has_stickers": false,
                      "id": 401032061935265700,
                      "sizes": [
                        {
                          "h": 160,
                          "size": 12700,
                          "type": "a",
                          "w": 160
                        }
                      ],
                      "video_sizes": null
                    },
                    "read_dates_private": false,
                    "saved_music": null,
                    "send_paid_messages_stars": 0,
                    "settings": {
                      "add_contact": false,
                      "autoarchived": false,
                      "block_contact": false,
                      "business_bot_can_reply": false,
                      "business_bot_id": 0,
                      "business_bot_manage_url": "",
                      "business_bot_paused": false,
                      "charge_paid_message_stars": 0,
                      "flags": 0,
                      "geo_distance": 0,
                      "invite_members": false,
                      "name_change_date": 0,
                      "need_contacts_exception": false,
                      "phone_country": "",
                      "photo_change_date": 0,
                      "registration_month": "",
                      "report_geo": false,
                      "report_spam": false,
                      "request_chat_broadcast": false,
                      "request_chat_date": 0,
                      "request_chat_title": "",
                      "share_contact": false
                    },
                    "sponsored_enabled": false,
                    "stargifts_count": 0,
                    "starref_program": {
                      "bot_id": 0,
                      "commission_permille": 0,
                      "daily_revenue_per_user": null,
                      "duration_months": 0,
                      "end_date": 0,
                      "flags": 0
                    },
                    "stars_my_pending_rating": {
                      "current_level_stars": 0,
                      "flags": 0,
                      "level": 0,
                      "next_level_stars": 0,
                      "stars": 0
                    },
                    "stars_my_pending_rating_date": 0,
                    "stars_rating": {
                      "current_level_stars": 0,
                      "flags": 0,
                      "level": 0,
                      "next_level_stars": 0,
                      "stars": 0
                    },
                    "stories": {
                      "flags": 0,
                      "max_read_id": 0,
                      "peer": null,
                      "stories": null
                    },
                    "stories_pinned_available": false,
                    "theme": null,
                    "translations_disabled": false,
                    "ttl_period": 0,
                    "unofficial_security_risk": false,
                    "video_calls_available": false,
                    "voice_messages_forbidden": false,
                    "wallpaper": null,
                    "wallpaper_overridden": false
                  },
                  "users": [
                    {
                      "apply_min_photo": true,
                      "attach_menu_enabled": false,
                      "bot": true,
                      "bot_active_users": 8872315,
                      "bot_attach_menu": false,
                      "bot_business": false,
                      "bot_can_edit": false,
                      "bot_can_manage_bots": false,
                      "bot_chat_history": false,
                      "bot_forum_can_manage_topics": false,
                      "bot_forum_view": false,
                      "bot_has_main_app": true,
                      "bot_info_version": 28,
                      "bot_inline_geo": false,
                      "bot_inline_placeholder": "",
                      "bot_nochats": true,
                      "bot_verification_icon": 0,
                      "close_friend": false,
                      "color": null,
                      "contact": false,
                      "contact_require_premium": false,
                      "deleted": false,
                      "emoji_status": null,
                      "fake": false,
                      "first_name": "BotFather",
                      "flags": 33767467,
                      "flags2": 12304,
                      "id": 93372553,
                      "lang_code": "",
                      "last_name": "",
                      "min": false,
                      "mutual_contact": false,
                      "phone": "",
                      "photo": {
                        "dcid": 1,
                        "flags": 2,
                        "has_video": false,
                        "personal": false,
                        "photo_id": 401032061935265700,
                        "stripped_thumb": "AQgIn89/tBfsZNlFFFAWPw=="
                      },
                      "premium": false,
                      "profile_color": null,
                      "restricted": false,
                      "restriction_reason": null,
                      "scam": false,
                      "self": false,
                      "send_paid_messages_stars": 0,
                      "status": null,
                      "stories_hidden": false,
                      "stories_max_id": {
                        "flags": 0,
                        "live": false,
                        "max_id": 0
                      },
                      "stories_unavailable": true,
                      "support": false,
                      "username": "BotFather",
                      "usernames": null,
                      "verified": true
                    }
                  ]
                }
              }
            },
            "description": "Extended user profile."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get full user profile",
        "tags": [
          "Identity"
        ]
      }
    },
    "/v1/users/{peer_id}/photos": {
      "get": {
        "description": "Returns the profile photo history for a user.",
        "operationId": "getUserPhotos",
        "parameters": [
          {
            "$ref": "#/components/parameters/PeerIDPath"
          },
          {
            "$ref": "#/components/parameters/LimitQuery"
          },
          {
            "description": "Number of photos to skip from the most recent.",
            "in": "query",
            "name": "offset",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Return photos with id < max_id.",
            "in": "query",
            "name": "max_id",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "_note": "Shape derived from gotd PhotosPhotosSlice; small hand-built example, not captured live.",
                  "_synthetic": true,
                  "count": 1,
                  "photos": [
                    {
                      "date": 1725637384,
                      "dcid": 2,
                      "has_video": false,
                      "photo_id": 5393326112060334000,
                      "sizes": [
                        {
                          "h": 160,
                          "size": 4843,
                          "type": "a",
                          "w": 160
                        },
                        {
                          "h": 640,
                          "size": 22411,
                          "type": "c",
                          "w": 640
                        }
                      ]
                    }
                  ]
                },
                "schema": {
                  "$ref": "#/components/schemas/UserPhotos"
                }
              }
            },
            "description": "Profile photo history."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/ResourceUnavailable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/UpstreamTimeout"
          }
        },
        "summary": "Get a user's profile photos",
        "tags": [
          "Identity"
        ]
      }
    }
  }
}
