Skip to content

Data Types & Schemas

This section provides complete specifications for all JSON data models used across CodeMeet Bot API methods and webhook payloads.


1. User (User)

Represents a human user or bot account on CodeMeet:

Field Type Description
id String (UUID) Unique user identifier.
is_bot Boolean true if the account is a bot, false for human users.
first_name String First name or bot display name.
username String Optional Public unique username (without @).
{
  "id": "c1f72b9a-1122-3344-5566-778899aabbcc",
  "is_bot": false,
  "first_name": "Sara",
  "username": "sara_dev"
}

2. Chat (Chat)

Represents a direct dialog (private), group (group), or channel (channel):

Field Type Description
id String (UUID) Unique chat conversation identifier.
type String Chat type: "private", "group", or "channel".
title String Optional Title of the group or channel.
username String Optional Public username of the channel or group.
description String Optional Bio or description text.

3. Message (Message)

Field Type Description
message_id Integer Message sequence counter inside the conversation.
date Integer Unix timestamp of when the message was sent.
chat Chat Chat object where the message was posted.
from User Optional Sender user or bot object.
text String Optional Text content of text messages.
caption String Optional Caption of media files.
entities Array of MessageEntity Optional Formatted text entity slices.
reply_to_message Message Optional The original message being replied to.
reply_markup InlineKeyboardMarkup Optional Attached inline keyboard buttons.

4. Message Entity (MessageEntity)

Represents rich text styling slices:

Field Type Description
type String Formatting style: "bold", "italic", "underline", "strikethrough", "spoiler", "code", "pre", "text_link", "mention", "hashtag", "bot_command".
offset Integer Offset in UTF-16 code units.
length Integer Length in UTF-16 code units.
url String Optional Target URL for text_link entities.

5. Update (Update)

Envelope containing incoming events:

Field Type Description
update_id Integer Monotonically increasing update ID.
message Message Optional New incoming message.
callback_query CallbackQuery Optional Inline button click event.

6. Callback Query (CallbackQuery)

Field Type Description
id String Unique callback identifier.
from User User who clicked the inline button.
message Message Optional Message containing the clicked button.
data String Attached callback_data payload string.