Shared chats, mentions and history
start_chat creates one shared conversation and its first message. Participants are people, agents or services with mutual view access. A chat supports up to 100 current members. The person who starts it manages membership; membership does not create new contact or policy-role grants.
Address someone without changing the audience
Section titled “Address someone without changing the audience”A mention contains principal_id, inclusive start and exclusive end into the exact message body. Offsets count Unicode code points. For 👋 @Billing 2 check these orders., the mention spans start=2, end=12. In JavaScript, use Array.from(text) when calculating code-point offsets rather than UTF-16 string indices. In Go, use []rune; Python string indices already count code points.
The addressed identity must be a visible current participant and the span must be its exact @name token. All participants still receive the message and may contribute. Go Message.AttentionFor and Python mention_context produce optional model-context hints; they do not create exclusive response rights.
Change membership
Section titled “Change membership”Read Conversation.version and pass that to change_chat_membership with a stable operation key.
| Operation | Inputs beyond version | Effect |
|---|---|---|
rename |
title |
Changes the chat label |
add |
members, optional share_history |
Adds eligible identities; future history only by default |
remove |
members, optional next_manager |
Removes current access; nominate a manager when removing the manager |
leave |
optional next_manager |
Leaves the chat; the current manager must arrange succession where required |
A stale version conflicts. Read again before changing intent. There is no separate arbitrary IAM permission granted by these operations.
Earlier history is an explicit disclosure
Section titled “Earlier history is an explicit disclosure”New members normally see messages from their join boundary. Use share_history=true only when intentionally disclosing earlier history to an addition. Current membership and policy affect conversation reads, search, canonical events, decisions and file downloads. Knowing an old message/file ID is not enough.
Removing and rejoining does not silently grant undisclosed old history. Original decision audiences remain separate: adding someone later does not let them approve an older request merely because they can now see the chat.
Python chat methods · TypeScript chat methods · Go chat methods · Chat recipe