Skip to content

Overview of XMTP protocols

Conversations protocol

The conversations protocol contains methods to create groups, and monitor all groups the installation is part of. Each SDK has its own version of this protocol, using the underlying implementation in LibXMTP.

MethodDescription
create_groupCreate a new group chat for multiple account addresses. Syncs automatically.
syncSync for welcome messages, creating new groups if one is found.
listReturns a list of groups matching the chosen time frame and limit. Requires sync.
streamStreams messages from the current group id to a callback function.
stream_all_messagesStreams all messages to a callback function.

Group protocol

The Group protocol contains methods specific to individual groups, identified by their group_id. These methods allow a user to communicate with the group. Each SDK has its own version of this protocol, using the underlying implementation in LibXMTP.

MethodDescription
sendSend a message to this group. Requires sync.
syncQuery for new messages, proposals, and commits, and send unpublished messages related to this group.
find_messagesQuery the database for stored messages, with filters for time frame and limit. Requires sync.
list_membersA list including the inboxId of each member and their associated account addresses. Requires sync.
add_membersAdd multiple group members by account address. Syncs automatically.
add_members_by_inbox_idAdd multiple group members by inboxId. Syncs automatically.
remove_membersRemove multiple group members by account address. Syncs automatically.
remove_members_by_inbox_idRemove multiple group members by inboxId. Syncs automatically.
streamStream messages to a callback function. Syncs automatically.
created_at_nsGroup creation time.
is_activeWhether the group is active. Requires sync.
added_by_inbox_idThe inboxId of the group member who added this user to the group.
group_metadataGroup metadata, such as group title and permissions. Requires sync.