What Is a Branch?
Every Branch belongs to one of two modes, determined at creation time by theispm flag:
- Direct message (DM) —
ispm: true. Exactly two participants: you and one friend. No additional members can be added later. - Group chat —
ispm: false. You plus any number of friends. New friends can be invited after the Branch is created.
members must already be on your friends list. If any member ID you supply is not a friend, the server returns 403 Forbidden.
Branch Lifecycle
1
Create the Branch
Send a The server responds with the new Branch object and emits an
POST /api/branch/create request with the IDs of the friends you want to include. For a group chat, you can optionally supply a name.added_branch Socket.IO event to every member.2
Add More Members (group chats only)
Any current member can invite additional friends using
POST /api/branch/add_member. The new member must be a friend of the person doing the inviting.You cannot add members to a DM Branch (
ispm: true).3
Chat
Send messages with
POST /api/bm/create. Messages can contain up to 5 000 characters and up to 10 file attachments. See the Messaging guide for the full message workflow.4
Rename the Branch
Any member can rename the group with
POST /api/branch/rename. Pass name: null to clear the name.5
Leave or Kick
- Non-owners leave with
POST /api/branch/leave. The remaining members receive aleft_branchevent. - The owner can remove any non-owner with
POST /api/branch/kick. The removed member receives akicked_from_branchevent.
Message Features
Permissions
Real-Time Events
Clody pushes Branch activity to all members over Socket.IO. You receive these events on the default/ namespace. See Real-Time Events for connection details.