Skip to main content
Groups are the core of XMTP conversations. This guide covers creating groups, managing membership, and working with direct messages.

Creating Groups

Basic Group Creation

Create a new group with default settings:
When you create a group, you are automatically:
  • Added as the only member
  • Designated as a super admin
  • Required to update installations before other operations

Create Group with Members

Add members at creation time using wallet addresses:
Or use inbox IDs directly:

Group Metadata

Set group name, description, and image:

Managing Members

Direct Messages (DMs)

DMs are a special type of group limited to two participants.

Find or Create DM

The recommended approach automatically handles duplicate DMs:
find_or_create_dm prevents duplicate DMs by:
  1. Checking for existing active DMs with the target inbox
  2. Returning the existing DM if found
  3. Creating a new DM only if none exists

DM Metadata

Customize DM settings:

Syncing Groups

Sync Welcomes

Fetch groups you’ve been added to:

Sync Group Messages

Update a specific group:
Sync all groups:

Combined Sync

Sync welcomes and all groups in one call:

Querying Groups

Find Groups

Query with filters:

Get Specific Group

Look up by group ID:
Get DM by target inbox:

List Conversations

Get conversations with last message:

Updating Group Metadata

Group admins can update metadata:
Metadata updates are governed by the group’s permission policies. See Permissions and Policies for details.

Group Properties

Error Handling

Common group management errors:

Best Practices

Next Steps

Sending Messages

Send and receive messages in groups

Permissions and Policies

Configure who can perform actions in groups