Skip to main content
Complete reference for all messaging Protocol Buffer messages.

SendMessage

Send a new message to a chat. Request: messages.SendMessageResponse: messages.SentMessage
chat_ref
refs.ChatRef
required
Reference to the target chat (user, channel, or group)
message
string
required
Message text content
reply_to
fixed64
Snowflake ID of message to reply to (optional)
media
media.MediaRef[]
Array of media attachments (optional)
entities
types.MessageEntity[]
Array of text formatting entities (optional)

SentMessage

message_id
fixed64
Snowflake ID of the newly created message

EditMessage

Edit an existing message. Request: messages.EditMessageResponse: ()
chat_ref
refs.ChatRef
required
Reference to the chat containing the message
message_id
fixed64
required
Snowflake ID of the message to edit
message
string
New message text (optional)
remove_media
bool
required
Whether to remove all media attachments
media
media.MediaRef[]
Replacement media attachments (optional)
entities
types.MessageEntity[]
Replacement entities (replaces if not empty or if message is set)

ForwardMessage

Forward message(s) to another chat. Request: messages.ForwardMessageResponse: ()
chat_ref
refs.ChatRef
required
Destination chat reference
from
refs.ChatRef
required
Source chat reference
message_ids
fixed64[]
required
Array of message snowflake IDs to forward

DeleteMessage

Delete one or more messages. Request: messages.DeleteMessageResponse: ()
chat_ref
refs.ChatRef
required
Reference to the chat containing the messages
message_ids
fixed64[]
required
Array of message snowflake IDs to delete

GetHistory

Retrieve message history with pagination. Request: messages.GetHistoryResponse: messages.Messages
chat_ref
refs.ChatRef
required
Reference to the chat
limit
uint32
Number of messages to return (default: 50, split when using around)
offset
oneof
One of: since (fixed64), before (fixed64), or around (fixed64)

Messages

messages
types.Message[]
Array of message objects
users
types.User[]
Array of user objects referenced in messages
members
types.CommunityMember[]
Array of community members (for community channels)
reactions
reactions.MessageReactions[]
Array of reaction data for messages
Search messages in a chat. Request: messages.SearchResponse: messages.Messages
chat_ref
refs.ChatRef
required
Chat to search in
query
string
required
Search query text
scoped
bool
required
If true, search only the specific channel; if false, search entire parent
offset
oneof
One of: since (fixed64) or before (fixed64) for pagination

GetEmbedPreview

Generate embed preview for URLs in message. Request: messages.GetEmbedPreviewResponse: media.MediaEmbed
message
string
required
Message text containing URLs
entities
types.MessageEntity[]
required
Array of message entities

ReportMessage

Report a message for moderation. Request: messages.ReportMessageResponse: ()
message_id
fixed64
required
Snowflake ID of the message to report
chat_ref
refs.ChatRef
required
Reference to the chat containing the message
reason
string
required
Reason for the report

Protocol Definition

syntax = "proto3";

package tangle.client.messages;

import "types.proto";
import "refs.proto";
import "media.proto";
import "reactions.proto";

message SendMessage {
  refs.ChatRef chat_ref = 1;
  string message = 2;
  optional fixed64 reply_to = 3;
  repeated media.MediaRef media = 4;
  repeated types.MessageEntity entities = 5;
}

message SentMessage {
  fixed64 message_id = 1;
}

message EditMessage {
  refs.ChatRef chat_ref = 1;
  fixed64 message_id = 2;
  optional string message = 3;
  bool remove_media = 4;
  repeated media.MediaRef media = 5;
  repeated types.MessageEntity entities = 6;
}

message ForwardMessage {
  refs.ChatRef chat_ref = 1;
  refs.ChatRef from = 2;
  repeated fixed64 message_ids = 3;
}

message DeleteMessage {
  refs.ChatRef chat_ref = 1;
  repeated fixed64 message_ids = 2;
}

message GetHistory {
  refs.ChatRef chat_ref = 1;
  optional uint32 limit = 2;
  oneof offset {
    fixed64 since = 3;
    fixed64 before = 4;
    fixed64 around = 5;
  }
}

message Messages {
  repeated types.Message messages = 1;
  repeated types.User users = 2;
  repeated types.CommunityMember members = 3;
  repeated reactions.MessageReactions reactions = 4;
}

message Search {
  refs.ChatRef chat_ref = 1;
  string query = 2;
  bool scoped = 3;
  oneof offset {
    fixed64 since = 4;
    fixed64 before = 5;
  }
}

message GetEmbedPreview {
  string message = 1;
  repeated types.MessageEntity entities = 2;
}

message ReportMessage {
  fixed64 message_id = 1;
  refs.ChatRef chat_ref = 2;
  string reason = 3;
}

Build docs developers (and LLMs) love