Status Draft. Protocol version 1 (sv1) of the Sloppy Voice v2 product
Date 2026-12-04
Depends on 00 (overview), 01 (addressing), 03 (transport), 05 (accounts), 06 (federation), 13 (MLS profile)
Decisions used D-003, D-005, D-007, D-018, D-020, D-021, D-023, D-031, D-032, D-034 to D-037, D-048, D-049, D-054, D-055, D-056, D-057, D-058, D-061, D-062, D-064, D-066, D-068, D-073, D-076, D-078, D-086
Owns Community object and /v1/community…; membership objects and states; Channel object and /v1/channels…; Invite object and /v1/invites…; /v1/me/communities; the join-gate procedure; the channel and server upgrade state machines; which events each member is served (D-007) and the meaning of the retention setting; manual history sharing rules for channels; secure-state pin rules and W9 triggers; community.*, member.*, channel.* and invite.* events and error codes

Conformance. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here. Requirements on "the server" apply to the Server conformance class of 00 §1.5 acting as the hosting server of its own community, or as a home server where the text says so. Requirements on "the client" apply to the Full client and Web client classes, and to the Bot client class where they concern the API. Rationale notes start with "Rationale:" and are informative. Examples are informative; where an example and the normative text disagree, the text wins. Every wire element follows 00 §7 and 03.

1. Scope

This document specifies:

  • the community that every server is (D-003), its settings, and the /v1/community… endpoints;
  • membership of the community and of its channels, the membership states, and how local and remote accounts join (00 §4.4, Matrix B), including the default membership of local accounts (D-068);
  • the community list that a home server keeps for each of its accounts (/v1/me/communities), and the server-to-server membership check that 12 uses for message-request auto-accept;
  • channels: the Channel object, the /v1/channels… endpoints, kinds (D-064), ordering and categories, and the meaning of the retention setting; which events each member is served, including the rule that secure channels show nothing from before a member's join (D-007), and the channel rules for manual history sharing;
  • invites and the /v1/invites… endpoints;
  • the join-gate procedure that maps the security matrix of 00 §4.3 and §4.4 onto the security.* errors, and the client's automatic resume after the gate cards G1 and G2;
  • the channel upgrade and server upgrade state machines (D-018, D-057, D-073), and the downgrade prohibition;
  • the secure-state pins that clients keep, and the exact conditions that raise W9 (D-056);
  • the community.*, member.*, channel.* and invite.* events and error codes.

It does not specify: roles, permissions, kicks, bans, timeouts, reports and the audit log (10); messages, timelines, attachments, webhooks and retention enforcement (11); direct messages, the DM index, auto-accept policy and the effects of a server upgrade on DMs (12); MLS mechanics of bootstrap, external commits and removals (13); history-key mechanics, visibleFromSeq, the HistoryShare and VisibilityGrant mechanism and the key archive (14); calls (15); the exact copy of warnings, gate cards and markers (20). Where this document triggers one of those mechanisms it names the owner and the trigger only.

2. Terminology and conventions

Terms from 00 §2 are used exactly. This document adds:

Term Definition
Local account An account homed on the server that hosts the community.
Remote account An account homed on another server. It reaches the community through a remote session (06).
Community member An account with a CommunityMember record whose state is active or needs_encryption. An account whose record is pending is a requester, not a member; where this document means requesters too, it says so.
Channel member An account with a ChannelMember record whose state is active or needs_encryption.
Opening a channel A client showing a channel's timeline or call because the person chose to (a tap in the channel list, or on a link preview's action, 01 §10.5). Opening a channel the account isn't a member of joins it silently (§4.5).
Server admin A local account that holds 10's admin role. Only a server admin can upgrade the server (§11). manage_community alone doesn't allow it (10).
Gate One check of the join-gate procedure (§9) that can refuse an action with a security.*, member.*, community.*, channel.* or invite.* error.
Upgrade plan The dry-run result that lists who can't follow an upgrade (§10.2, §11.2).
Secure-state pin A client's record that a channel, a server or a group DM has been seen as secure (§13).
Visibility range A closed range of a channel's seq values whose events a member may read (§7.2).
Account stream The durable event sequence a server keeps for one account and delivers with ctx: "me" (00 §7.4, 03 §7.1). On a remote server it holds that account's events at that server only.
Community stream The one durable event sequence per server for events about the community as a whole, delivered with ctx: "community" (03 §7.1).

Conventions.

  • Addresses in every request, response, event and stored record of this document are canonical (01, D-032). A server MUST accept an alias of its own domains in a path parameter and rewrite it (01 §7.7); any other non-canonical address fails with 400 address.non_canonical. A non-canonical address in a request body fails with 400 address.non_canonical (01 §7.6); it is never rewritten. Responses always carry canonical addresses.
  • {id} in /v1/channels/{id} is the channel's UUIDv7 or its full context reference ch:<UUIDv7>. Servers MUST accept both, and the colon percent-encoded or not (00 §7.3).
  • {addr} in a path is a canonical address, percent-encoded as UTF-8 (RFC 3986). @ needn't be encoded.
  • PATCH semantics. A PATCH body names only the members to change. A member set to null resets a nullable setting to "none". Unknown members are ignored (00 §7.2), except that a PATCH whose only members are unknown fails with core.invalid_request. A PATCH MAY carry ifVersion (integer): if it doesn't equal the object's current version, the request fails with 409 community.version_conflict or channel.version_conflict, and data.current carries the current object.
  • Permission failures use 403 core.forbidden (03) with data.permission set to the permission name and, optionally, data.ctx set to the channel or null (10 §6.3). A check for 10's admin role fails with 403 core.forbidden and data.missingRole: "admin".
  • Unknown enum values. Each enum in this document states how a receiver treats an unknown value. The general rule is that a client never treats an unknown value as granting access or as secure.
  • Wire tables follow 00 §7.16: member, type, required, meaning and constraints. "Text(n)" means a JSON string of at most n Unicode scalar values after NFC normalization, containing no C0 or C1 control characters other than LF (U+000A) where the field allows several lines.

ABNF (RFC 5234, core rules from its Appendix B):

channel-id      = uuid7 / ( "ch" ( ":" / "%3A" / "%3a" ) uuid7 )
uuid7           = 8LHEX "-" 4LHEX "-" "7" 3LHEX "-" var 3LHEX "-" 12LHEX
var             = "8" / "9" / "a" / "b"
LHEX            = DIGIT / %x61-66            ; lowercase hex
sv-invite-code    = 12crockford              ; canonical form, see 8.2
crockford         = DIGIT / %x41-48 / %x4A-4B / %x4D-4E / %x50-54 / %x56-5A
                    ; 0-9 A-H J K M N P-T V-Z  (no I, L, O, U)
sv-invite-display = 4crockford "-" 4crockford "-" 4crockford

These rules are named sv-invite-… so they don't collide with 01's URI-level invite-code rule. A link's invite value is opaque to 01 and is normalized by §8.2 before use; it isn't case-sensitive.

3. The community

3.1 One community per server

Every server is exactly one community (D-003). The community has no ID of its own: it is named by the server's canonical domain. A deployment that wants two communities runs two servers (00 §3.4). The community exists from the server's first start; it can't be created or deleted through the API. On first start the server creates it with name set to the canonical domain (its first 64 characters if longer), secure copied from the operator's configuration, which defaults to false (SM-1, 21 §11.1), joinPolicy: "open", and localAccountsAreMembers: true. A server SHOULD also create one text channel and one voice channel so that new members have somewhere to go; their names are the operator's choice.

The Community object and ServerMetadata (02) describe the same entity. A server MUST keep ServerMetadata secure, securedAt and name equal to the Community's secure, securedAt and name, and MUST change them in the same step.

Rationale: making the community the server, rather than an object on it, keeps D-003 literal: guild.sloppyvoice.com pointing at /server2 is a separate community because it is a separate server, and there is never a second ID to keep consistent with the domain.

3.2 The Community object

Member Type Req. Meaning and constraints
domain string Yes The server's canonical domain (lowercase A-label). Immutable (D-032).
name Text(64) Yes Community name shown to people. 1 to 64 scalar values after trimming white space, single line, matching ServerMetadata name (02). A longer name fails with 400 core.invalid_request whose data.errors names the member (source: "body", pointer: "/name", reason: "length", 03 §10.5). Free text: it isn't an address and isn't subject to D-005, so clients always show the domain with it (§3.7).
description Text(1000) Yes Short description, may be empty. Multi-line.
icon object or null Yes Icon descriptor (§3.4), or null.
secure boolean Yes true once the server has been upgraded (§11). Never returns to false (D-073).
securedAt timestamp or null Yes When secure became true, or when the server was created secure. null while insecure. Immutable once set.
joinPolicy string Yes open, invite, request or closed (§3.3). A client that sees an unknown value treats it as invite.
requireRulesAcceptance boolean Yes When true, joining needs the joiner to accept the current rules (§4.3). Default false.
rulesText Text(8000) Yes Community rules, may be empty. Multi-line plain text; clients render it as plain text with links made clickable.
rulesVersion integer Yes Starts at 0 and increases by 1 every time rulesText changes.
localAccountsAreMembers boolean Yes D-068 toggle (§4.4). Default true.
defaultChannel string or null Yes ch: reference of the channel a client opens after joining, when no invite or link names one. MUST be a channel for which previewVisible (10 §6.1) is true; otherwise null.
memberCount integer Yes Number of community members in state active or needs_encryption. MAY be approximate (updated at least every 5 minutes).
version integer Yes Increases by 1 on every change to this object. Used for ifVersion and by clients to drop stale events.
createdAt timestamp Yes
updatedAt timestamp Yes

Example:

{
  "domain": "sloppyvoice.com",
  "name": "Sloppy Voice",
  "description": "The home of Sloppy Voice. Be kind.",
  "icon": {
    "url": "https://chat.sloppyvoice.com/server/v1/community/icon?v=3",
    "sha256": "2c1D8Pz3pXz3WbFjq1JmQ0o8l5f0wq2CkQm1pQx5h4E",
    "mediaType": "image/png",
    "width": 256,
    "height": 256
  },
  "secure": false,
  "securedAt": null,
  "joinPolicy": "open",
  "requireRulesAcceptance": true,
  "rulesText": "1. Be kind.\n2. No spam.",
  "rulesVersion": 2,
  "localAccountsAreMembers": true,
  "defaultChannel": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "memberCount": 1842,
  "version": 57,
  "createdAt": "2026-11-01T09:00:00.000Z",
  "updatedAt": "2026-12-04T10:15:30.123Z"
}

Metadata exposure: every member of the Community object is visible to the server and, through GET /v1/community, to anyone. In a secure community it is still cleartext (00 §5.4). Admin clients SHOULD show a line of informational help text about this on the screen that edits it; the wording belongs to 20, and it isn't a security warning (D-055).

3.3 Join policies

joinPolicy Who can become a member Notes
open (default) Any account that passes the security gates (§9). The common case for public communities. Invites still work and can point at a channel.
invite Accounts presenting a valid invite (§8).
request Any account may ask; the request waits in state pending until a holder of manage_invites approves it (§4.3). A valid invite skips the wait. Pending requests expire after 30 days.
closed Nobody new, except local accounts under D-068 (§4.4). Existing invites stop working; creating invites fails with invite.not_allowed.

Changing joinPolicy affects only later join attempts; existing members and pending requests are kept, except that changing to closed rejects every pending request (member.rejected, reason closed) and changing to open approves them, except bots' requests, which still need approval by a holder of manage_bots and manage_invites (§4.4).

Rationale: four policies cover public, invite-only, moderated and private communities without per-channel join rules. Channel-level access is controlled by view_channel (10), not by joining rules.

Bot accounts have an extra admission rule under every policy (§4.4).

3.4 Community icon

The icon is a public image served by the community's server.

Member Type Req. Meaning
url string Yes Absolute HTTPS URL of the image, under the server's base URL. It changes whenever the image changes.
sha256 string Yes base64url SHA-256 of the image bytes. Clients MAY use it as a cache key and MUST check it after download.
mediaType string Yes image/png, image/jpeg or image/webp.
width, height integer Yes Pixel size; each 16 to 1024, and the image MUST be square.
  • GET /v1/community/icon returns the image bytes with its media type, Cache-Control: public, max-age=86400 and CORS. No authentication.
  • PUT /v1/community/icon (manage_community) takes the raw image as the body with its Content-Type, at most maxCommunityIconBytes (§16). The server MUST decode the image, reject anything that isn't a single-frame PNG, JPEG or WebP image within the size rules (community.icon_invalid), and SHOULD re-encode it to strip metadata. It returns the updated Community object and emits community.updated (§14).
  • DELETE /v1/community/icon (manage_community) sets icon to null and emits community.updated.

3.5 Endpoints

Method and path Auth Permission Purpose
GET /v1/community None — The Community object. Rate-limited per IP. CORS (00 §7.3).
PATCH /v1/community Session manage_community Change settings (§3.6); with secure: true, the server upgrade (§11).
GET, PUT, DELETE /v1/community/icon None / Session / Session — / manage_community / manage_community §3.4
POST /v1/community/join Session — Join (§4.2).
POST /v1/community/leave Session — Leave, or withdraw a pending request (§4.6).
GET /v1/community/members Session Community member List members (§4.7).
GET /v1/community/members/{addr} Session Community member, or the account itself One member.
POST /v1/community/members/{addr}/approve Session manage_invites; for a bot account, manage_invites and manage_bots (§4.4, 10 §4.4) Approve a pending request.
POST /v1/community/members/{addr}/reject Session manage_invites; for a bot account, manage_invites and manage_bots (§4.4, 10 §4.4) Reject a pending request.
POST /v1/community/membership-check S2S — Membership check for another server (§5.2).
GET /v1/community/categories Session — List categories (§6.5).
POST /v1/community/categories Session manage_channels Create a category.
PATCH, DELETE /v1/community/categories/{id} Session manage_channels Rename or delete a category.
PATCH /v1/community/layout Session manage_channels Reorder categories and channels in one step (§6.5).

"Session" means a home session, a remote session (06) or a bot token. Every /v1/community… endpoint used with a session of an account in the state upgrade_required (05) fails with security.upgrade_required, except POST /v1/community/leave.

3.6 Changing community settings

PATCH /v1/community accepts these members: name, description, joinPolicy, requireRulesAcceptance, rulesText, localAccountsAreMembers, defaultChannel, ifVersion, and, for the server upgrade only, secure, dryRun, planVersion, confirmDomain and deletePreUpgradeHistory (§11.4). A request that combines secure with any setting other than ifVersion fails with core.invalid_request. Every setting, including joinPolicy and requireRulesAcceptance, needs manage_community (10 §3); the server upgrade needs the admin role instead (§11.1).

  • secure: false on a secure server fails with 409 security.downgrade_forbidden (§12). secure: false on an insecure server is a no-op that returns the object.
  • Changing rulesText increases rulesVersion by 1. Existing members are not asked to accept the new rules again in v1; clients MAY show a "Rules updated" line in the community header until the member opens the rules.
  • Turning localAccountsAreMembers on applies §4.4 to existing local accounts.
  • defaultChannel naming a channel for which previewVisible (10 §6.1) is false fails with 404 core.not_found (03).

The response is the updated Community object. The server emits community.updated (§14).

PATCH {base}/v1/community

{ "joinPolicy": "request", "requireRulesAcceptance": true, "ifVersion": 57 }

3.7 Showing the community's domain

The community name is free text, so any server can choose any name. Clients MUST show the community's canonical domain next to its name wherever a person decides whether to join (invite preview, link landing screen, join confirmation) and in the community header (D-031: domains are shown). The domain is the part a person can trust; the name is decoration.

4. Membership

There are two kinds of membership record: CommunityMember (an account's membership of the community) and ChannelMember (an account's membership of one channel). A channel membership needs an active or needs_encryption community membership. The glossary's membership states (00 §2.6) are used for both, with the subsets below.

4.1 The CommunityMember object

Member Type Req. Meaning and constraints
addr string Yes Canonical address of the account.
name string Yes Display name, as checked by the receiver against addr (01).
kind string Yes user or bot, from the session (05, 06). Informative: the unforgeable bot badge in secure contexts comes from the IdentityCertificate (07). A client treats an unknown value as user for layout but shows no badge.
inc string Yes The account's incarnation (05 §11.1, D-086) this record belongs to: from the session's HomeAssertion (06) for a remote account, from 05 for a local one. A record never changes inc; a different inc for the same addr is a different account (§4.2).
local boolean Yes true for a local account.
accountSecurity string No insecure or secure: the account security state the server last verified (HomeAssertion sec or IdentityState, 06, 07). Present only in responses to the member itself and to holders of manage_channels or manage_community; never in events. A client treats an unknown value as insecure.
state string Yes active, pending, needs_encryption, banned or left (§4.2). A client treats an unknown value as left.
reason string or null Yes Why the record is in its state (§4.2). null for active and pending. A client treats an unknown value as no reason.
via string Yes How the member joined: auto (D-068), open, invite or request. Unknown values are shown as nothing.
requestedAt timestamp or null Yes When a pending request was made; null otherwise.
joinedAt timestamp or null Yes When the membership last became active; null while pending.
rulesAcceptedVersion integer or null Yes The rulesVersion the member accepted, or null.
roles array of string Yes Role IDs (UUIDv7) held in this community. The Role object and its semantics belong to 10. Empty for non-members.
version integer Yes Increases on every change to this record.
updatedAt timestamp Yes
{
  "addr": "bob@a.com",
  "name": "Bob",
  "kind": "user",
  "inc": "wMHCw8TFxsfIycrLzM3Ozw",
  "local": false,
  "accountSecurity": "insecure",
  "state": "active",
  "reason": null,
  "via": "invite",
  "requestedAt": null,
  "joinedAt": "2026-12-04T18:20:02.410Z",
  "rulesAcceptedVersion": 2,
  "roles": ["01938a10-0000-7000-8000-00000000e001"],
  "version": 1,
  "updatedAt": "2026-12-04T18:20:02.410Z"
}

4.2 Community membership states

State Meaning Can do
(none) No record. Read the public Community object; ask to join.
pending A join request awaits approval (joinPolicy: request, or a bot awaiting approval by a holder of manage_bots and manage_invites, §4.4). The account is a requester, not a member. Withdraw it (POST /v1/community/leave). Nothing else.
active A full member. Everything their roles allow, subject to the channel gates (§9.3).
needs_encryption An insecure account in a community that became secure (§11), or a remote member of a secure community who downgraded (§4.8). Keeps roles and its record. Read the Community object, the channel list and the member lists; read channel history within its visibility ranges (§7.2, §9.3 step H6); leave. Its roles and permissions still apply to 10's role, moderation, ban, report and audit-log endpoints (10 §6.1, §8.2 rule 9). Every other content, MLS, history or call request in a secure channel fails with security.account_required (G1). After it turns on encryption it can delete its own pre-upgrade messages with a sealed delete (11 §4.7 rule 3).
banned Banned by a moderator. The Ban object belongs to 10. No community or channel request succeeds; each fails with 403 moderation.banned (10). A community-scope ban leaves DMs hosted here and report filing working (10 §9.3, §6.3).
left Left, was kicked, or the account was deleted. Kept for the audit trail and for visibility ranges (§7.2). Join again under the join policy.

reason values: for left: left (by choice), kicked, account_deleted, unbanned; for needs_encryption: server_upgraded, account_downgraded; for banned: banned.

State machine (server side). "Ev" names the event the server emits (§14).

From Trigger To Ev
(none), left Join accepted (§9.2) active member.joined
(none), left Join under request without a valid invite, or a bot's join without approval (§4.4) pending member.requested
pending Approved (for a bot, by a holder of both manage_bots and manage_invites); or a valid invite presented (§9.2); or joinPolicy changed to open (not for bots) active member.joined
pending Rejected; or 30 days pass; or joinPolicy changed to closed (none) member.rejected
pending POST /v1/community/leave (none) —
active, needs_encryption POST /v1/community/leave left (left) member.left
active, needs_encryption Kick (10) left (kicked) member.removed
any Ban (10) banned member.removed
banned Unban (10) left (unbanned) member.updated
active, needs_encryption, pending account.deleted (05) or local account deletion left (account_deleted) member.removed
active, needs_encryption, pending The server verifies a HomeAssertion or IdentityState with a different inc for addr (06 §11.6, D-086) left (account_deleted) member.removed
active Server upgrade while the account is insecure (§11) needs_encryption (server_upgraded) member.updated
active A remote account downgrades to insecure while the community is secure (§4.8) needs_encryption (account_downgraded) member.updated
needs_encryption The server learns the account is secure (§4.8) active member.updated

Servers MAY delete left records 90 days after they were last changed; the account then behaves as (none). Servers MUST keep banned records until the ban ends (10). A join by an account whose inc differs from that of an existing left record for its addr starts from (none): the server replaces the record, and nothing in it (roles, channel records and their visibility ranges, rulesAcceptedVersion, via) applies to the new account. A banned record is the exception, because bans match the address alone (10 §9.2): the join fails with moderation.banned as it would have for the earlier account.

4.3 Joining the community

POST /v1/community/join works the same for local and remote accounts (00 §4.4, Matrix B). A remote account first obtains a remote session at the community's server (06); the HomeAssertion's sec and enr claims give the server the account security and device enrolment it needs for the gates.

Request members:

Member Type Req. Meaning
invite string No An invite code in any accepted input form (§8.2).
acceptRules integer No The rulesVersion the person accepted. Required when requireRulesAcceptance is true.

The server runs the community join procedure (§9.2). Responses:

  • 200 { "member": CommunityMember, "community": Community, "openChannel": string or null, "inviteIgnored": string or null } when the member is active or needs_encryption. openChannel is the invite's channel if the invite has one and the member can view it, otherwise defaultChannel. inviteIgnored is the error code of an invite that was supplied but invalid while the join policy didn't need it (§9.2 step C8); otherwise null.
  • 202 with the same shape when the account is a requester (pending).

Joining is idempotent: if the account is already active or needs_encryption, the server returns 200 with the existing record and doesn't consume the invite. If such a request carries acceptRules equal to the current rulesVersion, the server records it in rulesAcceptedVersion first (§9.2 step C6). This is how a member accepts the rules after sign-up (§4.4) or after they changed (§3.6).

POST {base}/v1/community/join

{ "invite": "7kq2-m9xp-4hrt", "acceptRules": 2 }
200 OK

{
  "member": { "addr": "bob@a.com", "name": "Bob", "kind": "user", "inc": "wMHCw8TFxsfIycrLzM3Ozw", "local": false,
              "accountSecurity": "insecure", "state": "active", "reason": null, "via": "invite",
              "requestedAt": null, "joinedAt": "2026-12-04T18:20:02.410Z",
              "rulesAcceptedVersion": 2, "roles": [], "version": 1,
              "updatedAt": "2026-12-04T18:20:02.410Z" },
  "community": { "domain": "sloppyvoice.com", "name": "Sloppy Voice", "secure": false, "version": 57 },
  "openChannel": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "inviteIgnored": null
}

(The community member is abbreviated here; the server returns the full object.)

Rules acceptance. When requireRulesAcceptance is true, a join without acceptRules equal to the current rulesVersion fails with community.rules_acceptance_required, whose data carries rulesVersion and rulesText. The client shows the rules with one button, "Agree and join", and resends with acceptRules. If the rules changed in between, the same error returns with the new rules.

Join requests. Under joinPolicy: request without a valid invite, the server creates a pending record and returns 202. Holders of manage_invites (for a bot, holders of both manage_invites and manage_bots) receive member.requested. POST /v1/community/members/{addr}/approve makes the record active (member.joined, and member.updated on the requester's account stream). POST /v1/community/members/{addr}/reject deletes the record and sends member.rejected (reason rejected) to the requester's account stream. Both return 200 with the record (approve) or 204 (reject). Approving or rejecting a record that isn't pending fails with member.not_pending. Clients show a pending request as "Waiting for approval" in the community list, with "Cancel request".

UX: a secure account that joins an insecure community sees W1 once for that community (00 §4.4); an insecure account sees nothing about security (F2).

4.4 Local accounts are members by default (D-068)

While localAccountsAreMembers is true:

  • When a local user account is created (05), the server creates an active CommunityMember with via: "auto" in the same transaction. On a secure server an account created in the account state upgrade_required with security: insecure (05) gets its record in needs_encryption (server_upgraded) instead, and it becomes active when the account turns on encryption (§4.8). requireRulesAcceptance doesn't block this; the client shows the rules once after sign-up when rulesText isn't empty, and the server records rulesAcceptedVersion when the person taps "OK" (POST /v1/community/join with acceptRules, §4.3).
  • A local user account in state left (for any reason other than a ban) MAY join again whatever the joinPolicy, including closed.
  • Turning the toggle on creates records (via: "auto") for every local user account that has no record: active, or needs_encryption (server_upgraded) for an insecure account on a secure server. It doesn't change records in left or banned.
  • Turning the toggle off removes nobody; it only stops automatic membership and the policy bypass.

Bots. Bot accounts, local or remote, are never made members automatically. A bot joins by calling POST /v1/community/join with its own session, but it becomes active only with the approval of a holder of manage_bots (10 §4.4), given in one of two ways (the second also needs manage_invites):

  1. the bot uses a valid invite whose creator holds manage_bots when the invite is used (the usual way: an admin creates an invite and gives it to the bot's operator); or
  2. the bot's pending record is approved by a member who holds both manage_bots and manage_invites (10 §4.4) (POST /v1/community/members/{addr}/approve).

Without either, the join creates a pending record (202) under the policies open, invite (with any valid invite) and request; it fails with community.invite_required under invite without a valid invite, and with community.closed under closed (§9.2 step C7). Every bot that becomes active is written to 10's audit log as bot_admitted, with the approving actor.

Proposed decision: Bot accounts are never automatic community members under D-068, and a bot becomes a member only with the approval of a manage_bots holder, by an invite that holder created or by approving the bot's request (which also needs manage_invites). Rationale: a bot entering a community (and, in secure channels, raising W6) should be a deliberate act by someone trusted with bots, not a side effect of creating the bot or of an open join policy; this matches 05 P-05-11 and 10 §4.4.

The home server also keeps the community in the account's community list (§5.1) while the account is a member.

4.5 Channel membership

An account becomes a channel member when it opens the channel: the client calls POST /v1/channels/{id}/join the first time the person views the channel's timeline (including by tapping "Open" or "Join" on a link or invite preview, 01 §10.5, 20 §10.2) or joins its call. Activating a link alone never joins anything (01 §10.5). The join itself is silent: there is no separate prompt and no button labelled "Join channel". The channel list shows every channel the account can view (10), whether or not it is a member.

A channel membership determines: whether the account's devices are in the channel's MLS group (13) in a secure channel; the account's visibility ranges (§7.2); whether the channel appears with unread counts; and the account's needs_encryption state after a channel upgrade.

Proposed decision: Channel membership is explicit but silent: a client joins a channel when the person first opens it, and leaves only when the person chooses "Leave channel" or loses access. Rationale: it keeps MLS groups to the people who use a channel (bounding commit cost under D-059) and gives the rule that secure channels show nothing from before a member's join (D-007) a precise start, while people still see a Discord-like list of every channel they can open.

The ChannelMember object:

Member Type Req. Meaning and constraints
ctx string Yes The channel's ch: reference.
addr, name, kind, inc Yes As in CommunityMember. A channel record belongs to the same incarnation as the account's community record.
accountSecurity string No As in CommunityMember, with the same visibility rule.
state string Yes active, needs_encryption or left. A client treats an unknown value as left.
reason string or null Yes For left: left, community_left, kicked, banned, lost_access, account_deleted. For needs_encryption: channel_upgraded, server_upgraded, account_downgraded.
joinedAt timestamp or null Yes When the membership last became active.
joinSeq integer or null Yes The seq of the member.joined event that started the current membership.
visibleFromSeq integer or null Yes In a secure channel, the seq from which the account is served sealed items in its current membership (§7.1, 14): its joinSeq, or the seq of the member.updated that reactivated it from needs_encryption. null in insecure channels and while the state is needs_encryption.
visibleRanges array or absent No §7.2. Present only in HTTP responses to the member itself and to holders of manage_channels; never in events. Each element is [from, to] with to an integer or null (open).
version, updatedAt Yes As in CommunityMember.

Channel membership state machine:

From Trigger To Ev (on the channel stream)
(none), left POST /v1/channels/{id}/join passes §9.3 active member.joined
active, needs_encryption POST /v1/channels/{id}/leave left (left) member.left
active, needs_encryption The community membership leaves the member states (left, kicked, banned, deleted) left (matching reason) member.removed
active, needs_encryption The account can no longer view the channel (10) left (lost_access) member.removed
active Channel upgrade (§10) or server upgrade (§11) while the account is insecure needs_encryption member.updated
active The account downgrades to insecure while the channel is secure needs_encryption (account_downgraded) member.updated
needs_encryption The server learns the account is secure (§4.8), or a join request passes §9.3 active member.updated
any The channel is deleted record deleted channel.deleted

A channel record, and the visibility ranges in it (§7.2), belong to one account incarnation: a later account at the same address starts with none (§4.2, D-086).

Every transition out of active in a secure channel starts the removal of the account's leaves from the channel's group (13): delivery cut, lease revocation and Remove proposals happen at once (D-037). Joining a secure channel is followed by the device's external commit, or by a bootstrap if the group doesn't exist yet (13 §10); a device that is a member but not yet in the group shows 20's "Joining…" state with no marker and never a prompt. Once it is in the group, a newcomer's client shows K6 at its join point (§7.1, 20). K4 appears only on a user's own new device while it restores keys from the key archive, or while messages someone shared with the user load (20).

POST /v1/channels/{id}/join takes an empty JSON object and returns 200 { "member": ChannelMember, "channel": Channel }. It is idempotent. POST /v1/channels/{id}/leave returns 204; leaving a channel the account isn't a member of also returns 204.

4.6 Leaving the community

POST /v1/community/leave (empty body) returns 204. It:

  1. moves the CommunityMember to left (left), or deletes a pending record;
  2. moves every ChannelMember of the account to left (community_left), which starts MLS removal in secure channels (13) and revokes voice leases (15);
  3. ends the account's calls in this community's channels (calls in DMs hosted on the same server are unaffected).

The remote session stays valid (06) but reaches only public endpoints and DMs. The client removes the community from the account's community list (§5.1). A local account can leave its own server's community; its account is unaffected.

4.7 Listing members

GET /v1/community/members?state=&q=&cursor=&limit= returns a collection page (00 §7.10) of CommunityMember objects, ordered by addr byte-wise.

  • state: a comma-separated subset of active, needs_encryption, pending, banned, left. Default active,needs_encryption. Listing pending needs manage_invites; banned needs ban_members; left needs view_audit_log (10).
  • q: optional, 1 to 64 characters. The server maps it with 01's minimalPrepare (01 §3.2; never prepareLocal, so partial names never fail) and matches the result as a prefix of the prepared local part, and as a prefix of minimalPrepare of any word of the display name (which applies 01's case folding). An empty result after mapping matches nothing.
  • Callers must be community members (active or needs_encryption); others get member.not_member.

GET /v1/channels/{id}/members works the same for ChannelMember objects (states active, needs_encryption; left needs manage_channels), for anyone who can view the channel.

GET /v1/community/members/{addr} and GET /v1/channels/{id}/members/{addr} return one record, or member.not_found.

4.8 Effects of account changes

The server learns of account changes through identity.changed, device.revoked and account.deleted (06, 07, 05), through a new remote session whose HomeAssertion carries a different sec or a different inc (06 §11.6), or locally for its own accounts.

Account change Community membership Secure channel memberships Insecure channel memberships
Insecure → secure (D-019) needs_encryption → active needs_encryption → active; devices join the group when they open the channel (13). Its secure visibility starts at this reactivation (§7.1). Unchanged
Identity reset, still secure Unchanged Unchanged, visibility included. Old leaves are removed and new devices join by external commit (13). Silent (D-035). Nothing hands the new identity a history key (D-007), so earlier messages stay unreadable on its devices unless an old device brings its keys back (08 §11.4). Unchanged
Secure → insecure (downgrade, a reset under D-019) On a secure server, for a remote account: active → needs_encryption (account_downgraded). A local account of a secure server can't downgrade (SM-3; 05, 07 refuse it). On an insecure server: unchanged. active → needs_encryption (account_downgraded); all leaves removed (13) Unchanged
Device revoked (D-017) Unchanged Unchanged; that device's leaves removed (13) Unchanged
Account deleted left (account_deleted) left (account_deleted) left (account_deleted)
New account at the address (a different inc, D-086) The earlier account's record: left (account_deleted); the new account has none The earlier account's: left (account_deleted) The earlier account's: left (account_deleted)
Local account enters upgrade_required (§11) needs_encryption (server_upgraded) needs_encryption (server_upgraded) (none remain)

A transition to active from needs_encryption happens without any request from the client. The client still runs its resume procedure (§9.6), which is idempotent.

4.9 Effects of moderation

Moderation actions are defined by 10. Their membership effects are defined here so the states stay in one place:

Action (10) Community membership Channel memberships
Kick left (kicked) all left (kicked)
Ban banned all left (banned)
Unban left (unbanned) unchanged
Timeout, server mute, "Mute for everyone" unchanged unchanged
A role or overwrite change that removes view_channel unchanged that channel left (lost_access)

5. The community list and the membership check

5.1 The community list (/v1/me/communities)

Every home server keeps, for each of its accounts, the list of communities the account belongs to. It is used by every device of the account to show the same sidebar, and by 12 for the message-request auto-accept rule (D-049).

The CommunityListEntry object:

Member Type Req. Meaning
domain string Yes Canonical domain of the community's server. The entry's key.
name string Yes Cached community name, at most 64 scalar values.
iconUrl string or null Yes Cached icon URL.
secure boolean Yes Cached secure flag. Informative only; clients rely on their pins (§13) and on the community's own server.
state string Yes Cached membership state: active, pending or needs_encryption. Unknown values are shown as active.
position integer Yes Sort position in the sidebar, from 0.
local boolean Yes true for the home server's own community.
addedAt, updatedAt timestamp Yes

Endpoints (home session only; bots MAY use them):

Method and path Purpose
GET /v1/me/communities The whole list, ordered by position, as { "items": [...], "nextCursor": null }.
PUT /v1/me/communities/{domain} Add or update an entry. Body: name, iconUrl, secure, state, and optionally position (default: last). Returns the entry.
DELETE /v1/me/communities/{domain} Remove an entry. Returns 204.
PATCH /v1/me/communities Reorder: { "order": ["b.com", "sloppyvoice.com", …] } listing every domain once. Returns the list.

Rules:

  • The home server maintains the local: true entry itself: it exists exactly while the account has a record in the home server's own community in state active, needs_encryption or pending. PUT or DELETE on it fails with core.invalid_request.
  • For every other community, the client keeps the list current. After a join that returns 200 or 202, the client MUST PUT the entry. After the account leaves, or any event ends its membership (member.removed, member.rejected), the client MUST DELETE it. On reconnecting to a community whose name, icon, secure or state changed, it SHOULD update the cached fields. If the home server is unreachable it retries with backoff (1 s doubling to 5 min).
  • {domain} MUST be a canonical domain. The home server MAY check it with discovery (02) and then fails a non-canonical one with address.non_canonical.
  • The list holds at most maxCommunitiesPerAccount entries (§16); more fails with community.list_full.
  • Every change emits community.list_changed on the account stream at the home server (§14), so the account's other devices update their sidebars.

Rationale: the client is the party that joins remote communities, so it records them, and the home server stores them so that every device and the auto-accept rule see the same list. No new server-to-server event is needed. A stale entry is harmless, because the auto-accept rule confirms membership live (§5.2).

5.2 Membership check (server to server)

POST {base}/v1/community/membership-check lets another server ask whether accounts are members of this community, on behalf of one of its own accounts that is a member. Document 12 uses it to evaluate the auto-accept rule: a recipient's home server asks each community on the recipient's list whether the sender is a member.

  • Authentication: Authorization: Bearer <sv-s2s+jwt> (06).
  • Request: { "onBehalfOf": "<canonical address>", "onBehalfOfInc": "<inc>", "addrs": ["<canonical address>", …] } with 1 to 20 addresses. onBehalfOfInc is the asking account's incarnation (05 §11.1, D-086).
  • The server MUST check that the domain of onBehalfOf equals the token's iss, and that onBehalfOf is a community member (active or needs_encryption) whose record has inc equal to onBehalfOfInc. Otherwise it fails with 403 member.not_member. The caller treats that answer as "not shared" for every address in the request, and SHOULD then refresh the onBehalfOf account's community list entry for this domain.
  • Response 200: { "results": [ { "addr": "…", "member": true, "state": "active", "inc": "…" }, … ] } in request order. member is true exactly when the address is a community member; state is then active or needs_encryption, and otherwise null. inc is then the incarnation of that member's record, and otherwise null. A caller that knows the incarnation it is asking about (12 §10.2 (e)) counts a result whose inc differs as not a member. Non-canonical or unknown addresses give member: false, state: null, inc: null. A caller treats an unknown state value as null. A caller that needs only active members (12's auto-accept rule) checks state.
  • Rate limit: at least 60 requests per minute per peer MUST be served; beyond the server's limit it answers 429 (00 §7.11).
  • Caching. A caller MUST NOT cache a positive result for longer than 1 h or a negative result for longer than 10 min, so a kick or ban stops auto-accept within the hour. 12 applies these ceilings.
POST {base}/v1/community/membership-check
Authorization: Bearer eyJhbGciOiJFZERTQSIsInR5cCI6InN2LXMycytqd3QiLCJraWQiOiJkLmNvbSMyMDI2LTEyYSJ9…

{ "onBehalfOf": "dan@d.com", "onBehalfOfInc": "8PHy8_T19vf4-fr7_P3-_w", "addrs": ["alice@a.com"] }
200 OK

{ "results": [ { "addr": "alice@a.com", "member": true, "state": "active", "inc": "sLGys7S1tre4ubq7vL2-vw" } ] }

Rationale: requiring the asking server to name one of its own members limits the check to what that member could see in the member list anyway, so it reveals nothing new and can't be used by unrelated servers to enumerate members.

6. Channels

6.1 The Channel object

Member Type Req. Meaning and constraints
ctx string Yes Context reference ch:<UUIDv7>, assigned by the server at creation. Immutable.
address string Yes Canonical address local@canonicalDomain. Its local part is in the server's shared namespace (D-020).
name string Yes Display name, linked to the local part (D-005, 01).
reservedAddresses array Yes Earlier addresses of this channel that are still reserved for it (§6.3): { "address", "until" }, oldest first. Usually empty.
kind string Yes text or voice (D-064, §6.2). Immutable. A client treats an unknown value as text and offers no call.
security string Yes insecure or secure. Changes only from insecure to secure (§10). A client treats an unknown value as "unavailable": it doesn't post, call or show a lock, and suggests updating the app. An unknown value never raises W9.
securedAt timestamp or null Yes When the channel became secure (its creation time if created secure). null while insecure. Immutable once set.
upgradeSeq integer or null Yes The highest seq assigned before the upgrade (§10.4). null for insecure channels and channels created secure. Immutable once set.
preUpgradeHistory string or null Yes kept or deleted when upgradeSeq is set; otherwise null. Changes from kept to deleted never happen after the upgrade.
retentionDays integer or null Yes 1 to 36,500, or null to keep content until deleted (§7.3). Default null.
topic Text(1024) Yes Single line, may be empty. Cleartext metadata in every mode (00 §5.4).
categoryId string or null Yes UUIDv7 of the channel's category, or null for none (§6.5).
position integer Yes Order within its category, from 0 (§6.5).
memberCount integer Yes Channel members in state active or needs_encryption. MAY be approximate. A change of memberCount alone doesn't change version and emits no event.
membership object or null Yes The caller's own channel membership: { "state": …, "visibleFromSeq": … } (§4.5), or null if the caller has no record or it is left. In events, it is the recipient's own value (the server personalizes it) or is omitted; a client keeps its previous value when it is omitted.
version integer Yes Increases on every change to any member above other than memberCount and membership.
createdAt, updatedAt timestamp Yes
createdBy string Yes Canonical address of the creator.
{
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "address": "publiclobby@sloppyvoice.com",
  "name": "Public Lobby",
  "reservedAddresses": [],
  "kind": "voice",
  "security": "secure",
  "securedAt": "2026-12-04T19:02:11.250Z",
  "upgradeSeq": 4182,
  "preUpgradeHistory": "kept",
  "retentionDays": null,
  "topic": "Say hi!",
  "categoryId": "01938a10-55aa-7c3d-8e9f-0a1b2c3d4e5f",
  "position": 0,
  "memberCount": 312,
  "membership": { "state": "active", "visibleFromSeq": 4001 },
  "version": 19,
  "createdAt": "2026-11-01T09:00:00.000Z",
  "updatedAt": "2026-12-04T19:02:11.250Z",
  "createdBy": "saxonjones@sloppyvoice.com"
}

What the Channel object reveals is metadata: in a secure channel the server and every viewer still see the name, topic, settings and member list (00 §5.4).

6.2 Kinds

kind is chosen at creation and never changes (D-064); a PATCH that names a different kind fails with channel.kind_immutable. Both kinds are contexts with a timeline (00 §2.6): people can post messages in a voice channel as in a text channel. Only voice channels have a call (15). Clients SHOULD present voice channels with a "Join voice" action and their timeline as the call's chat.

Rationale: keeping the timeline in voice channels avoids a second context for in-call chat, and the glossary already defines every channel as a context with a timeline.

6.3 Address and name

  • Creation. The creator gives a display name. The server derives the local part from it with 01's rules (remove white space, apply the PRECIS preparation, validate), checks the shared namespace (D-020), the reserved local parts and the confusable-skeleton rule (D-031), and fails with the matching address.* error from 01 if the name is unavailable. The derived address and the display name are stored together. Members holding manage_channels may use class A and class C reserved local parts for channels (01 §5.4).
  • Display changes. A new name whose derived local part equals the current one changes only spacing and capitalization. It needs manage_channels and is processed as 01 §6.3 says, including the collision check on its collision key: a name that isn't linked fails with 400 address.display_name_mismatch, and a capitalization that collides with another entry fails with 409 address.too_similar (data.field: "name").
  • Address changes. A new name whose derived local part differs is a change of address. It needs manage_channels, passes the same checks as creation, and keeps ctx. channel.updated carries previousAddress. The old local part stays reserved for this channel for 90 days: the server MUST NOT create another channel, or register a user or bot, with it during that time, and the channel may take it back. While reserved, the old address is listed in the Channel's reservedAddresses. Lookups of the old address during the reservation answer as 01 specifies for a moved channel (01 §5.6 item 3: 200 with the channel's AddressInfo, whose address is the channel's current address; once the reservation ends, 410 address.deleted, 01 §5.7). Pins follow the change by ctx and remember the old address (§13.2), and T6 (§13.4) covers the reserved period, so a server can't rename a secure channel and put an insecure one at its old address unnoticed.
  • Lookup. GET /v1/addresses/{local} (01) answers for channels with kind: "channel" and ctx, name, channelKind and security, which MUST equal the Channel object's ctx, name, kind and security (01 §9.3). A channel the requester can't view (H4) is answered as an unseen name (01 §9.4).

6.4 Endpoints

Method and path Auth Permission Purpose
GET /v1/channels Session — Channels the caller can view, plus categories (§6.6).
POST /v1/channels Session manage_channels Create a channel.
GET /v1/channels/{id} Session View One channel.
PATCH /v1/channels/{id} Session View, then manage_channels Change settings; with security, the upgrade (§10).
DELETE /v1/channels/{id} Session View, then manage_channels Delete the channel.
POST /v1/channels/{id}/join Session View Become a channel member (§4.5).
POST /v1/channels/{id}/leave Session — Leave the channel.
GET /v1/channels/{id}/members Session View List channel members (§4.7).
GET /v1/channels/{id}/members/{addr} Session View One channel member.

"View" means the caller passes steps H1 to H4 of §9.3. A caller who can't view a channel gets 404 core.not_found (03), the same as for a channel that doesn't exist. For PATCH and DELETE the view check runs first and the manage_channels check second (403 core.forbidden, data.permission: "manage_channels"), so a caller without manage_channels learns nothing about a channel it can't see.

Create. POST /v1/channels takes:

Member Type Req. Default Constraints
name string Yes — Display name; the local part is derived from it (§6.3).
kind string Yes — text or voice.
security string No insecure on an insecure server, secure on a secure server (SM-1) insecure on a secure server fails with security.server_requires_secure (SM-2).
retentionDays integer or null No null
topic string No ""
categoryId string or null No null Unknown category: channel.category_not_found.
position integer No last in its category Later channels in the category move down by one.
  • A secure channel is created with no MLS group (13 state none, generation 1). Its group is created lazily by the first enrolled member device that opens it (13 §10.1, bootstrapAllowed). A creator on an enrolled device SHOULD open the new channel at once, which joins it silently (§4.5) and bootstraps the group with POST /v1/contexts/{ctx}/mls/bootstrap (13 §7.4). The create request carries no bootstrap, because the client can't build the group's group_id before the server has assigned ctx.
  • A creator whose account is insecure can create a secure channel but can't open it (G1). The creation dialog MAY show a line of informational help text saying so; the wording belongs to 20, and it isn't a security warning (D-055).
  • More than maxChannels channels fails with channel.limit_reached.
  • The response is 201 with the Channel object. The server emits channel.created (§14). The request SHOULD carry Idempotency-Key.
POST {base}/v1/channels

{ "name": "Book Club", "kind": "text", "topic": "One chapter a week" }

Update. PATCH /v1/channels/{id} accepts name, topic, retentionDays, categoryId, position and ifVersion. The upgrade members (security, dryRun, planVersion, deletePreUpgradeHistory, bootstrap) are accepted only on their own, with ifVersion (§10); combining them with a setting fails with core.invalid_request. kind fails with channel.kind_immutable. Changes to securedAt, upgradeSeq, preUpgradeHistory, ctx, address (other than through name) and the counters are ignored. The response is the updated Channel; the server emits channel.updated with the names of the changed members.

Delete. DELETE /v1/channels/{id} returns 204. The server, in order:

  1. ends the channel's call (reason channel_deleted, 15) and revokes every lease;
  2. sequences channel.deleted on the community stream (§14), in the same atomic step as the deletion, so that every community member who could view the channel learns of it, including members who aren't subscribed to the channel;
  3. ends every subscription to the channel's stream with session.subscription_ended (core.gone, 03 §5.6), then deletes every ChannelMember record;
  4. retires the MLS group, if any (13: mls.group_retired, reason context_deleted), and deletes its timeline, attachments, MLS group, handshake log, HistoryShares and VisibilityGrants (11, 13, 14): they stop being served at once and SHOULD be purged from storage within 30 days;
  5. releases the local part under 01 §5.7 (it is quarantined against users and bots, and may be reused as a channel at once);
  6. sets defaultChannel to null if it named this channel, and removes the channel from invites (they then open defaultChannel);
  7. MUST keep a tombstone for at least 400 days: GET /v1/channels/{id} returns 410 channel.deleted with data holding ctx, address, security, securedAt and upgradeSeq, so clients can settle their pins (§13.5).

6.5 Categories and ordering

The Category object:

Member Type Req. Meaning
id string Yes UUIDv7.
name Text(100) Yes 1 to 100 scalar values, single line. Free text, not an address.
position integer Yes Order among categories, from 0.
version, createdAt, updatedAt Yes
  • GET /v1/community/categories returns { "items": [Category…], "nextCursor": null }.
  • POST /v1/community/categories takes name and optional position (default last) and returns 201 with the Category. More than maxCategories fails with channel.limit_reached.
  • PATCH /v1/community/categories/{id} takes name, position, ifVersion.
  • DELETE /v1/community/categories/{id} returns 204. Its channels get categoryId: null and are appended, in their old order, after the uncategorized channels.
  • Every category create, change and delete emits community.layout_changed with the full resulting layout (§14), so every member's sidebar stays current.

Display order (normative for clients). Uncategorized channels first, by position; then each category by position, each with its channels by position. Ties are broken by ctx, byte-wise. Clients don't separate text and voice channels unless the person asks.

Layout changes. PATCH /v1/community/layout replaces the order in one step:

PATCH {base}/v1/community/layout

{
  "categories": ["01938a10-55aa-7c3d-8e9f-0a1b2c3d4e5f", "01938a10-55aa-7c3d-8e9f-0a1b2c3d4e60"],
  "channels": [
    { "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "categoryId": "01938a10-55aa-7c3d-8e9f-0a1b2c3d4e5f" },
    { "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445567", "categoryId": "01938a10-55aa-7c3d-8e9f-0a1b2c3d4e5f" },
    { "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445568", "categoryId": null }
  ]
}

categories MUST list every category exactly once. channels MUST list every channel exactly once; its order within each category (and among uncategorized channels) becomes the new position sequence 0, 1, 2…. Otherwise the request fails with core.invalid_request and nothing changes. The server emits community.layout_changed. A caller who can't view some channels can't reorder: the request needs manage_channels over every channel; otherwise 403 core.forbidden with data.permission: "manage_channels".

6.6 Listing channels

GET /v1/channels returns:

{ "items": [ Channel, … ], "categories": [ Category, … ], "nextCursor": null }

items holds every channel the caller can view. For a caller who isn't a community member (a remote session before joining, or a requester), it holds the channels for which previewVisible (10 §6.1) is true, so the client can show a preview. The list is never paginated; its size is bounded by maxChannels. Categories without any viewable channel are omitted for callers without manage_channels.

7. History visibility, retention and bots

This section fixes which events of a channel each account is served, and what the retention setting means. Their mechanics belong to 11 (serving and retention enforcement) and 14 (history keys, visibleFromSeq, manual history sharing and the key archive).

7.1 What new members can read (D-007)

There is no history setting. What a channel member can read depends only on the channel's security mode:

Channel What a member is served
Insecure The channel's whole stored history, subject to the view permission (10) and retention (§7.3). A rejoin restores it.
Secure Only what was sequenced from the start of the account's current membership on (D-007). Earlier memberships aren't served again; the account's devices keep whatever they stored locally. Nothing hands keys to newcomers, and nobody is prompted. The newcomer's client shows marker K6 at its join point (11 §7.1, 20).
  • Membership start. In a secure channel the account's visibleFromSeq (14), also carried in its ChannelMember (§4.5), is the seq of the member.joined that started its current membership or, for an account reactivated from needs_encryption, the seq of the reactivating member.updated (§4.8).
  • Pre-upgrade plaintext. Accounts that were channel members when the channel was upgraded keep reading the pre-upgrade plaintext under K3 (§10.5). An account whose membership starts after the upgrade, including a former member who rejoins, isn't served anything from before its join, that plaintext included (D-007).
  • Bots follow the same rules as people (§7.4).
  • Own devices. A user's own new devices get everything that user could already read: the server serves the account, not the device, from its visibleFromSeq, and the key archive supplies the keys (D-007, D-054, 08, 14).
  • Identity changes. A reset of a member's identity (07 §15) changes neither the membership nor its visibility. The new identity's devices are served the same ciphertext but receive no key for it from anyone (D-007); they can read it only if an old device of the account brings its keys back (08 §11.4).
  • Manual sharing. A member holding share_history may deliberately share earlier messages with one specific member (§7.5, 14).

Proposed decision: a reactivation from needs_encryption starts the account's secure visibility at the reactivation: its visibleFromSeq becomes the seq of the reactivating member.updated, and its client shows K6 there. Rationale: while needs_encryption the account had no device in the group, so it holds no key for the epochs in between, and nothing hands keys over (D-007); serving that ciphertext would only produce unreadable placeholders. The account keeps the pre-upgrade plaintext it was entitled to as a member before the upgrade.

Rationale: secure channels follow the owner's rule that encrypted contexts show nothing from before a person joined (D-007). Insecure channels keep conventional behaviour, because their server can read everything anyway (D-021).

7.2 Visibility ranges

This section is the only normative definition of which events of a channel each account is served. 11 (timeline pages, attachments, live delivery, sync) and 14 (sealed items, VisibilityGrants) apply it and don't restate it; where their text differs, this section wins.

The server keeps, for every channel member, a list of visibility ranges of seq values. It serves a durable event of the channel (any type, timeline or membership) with sequence number s to an account only if all of these hold:

  1. the account is a channel member in state active or needs_encryption;
  2. s lies in one of its visibility ranges; or, in a secure channel, the event is a sealed item (a SealedMessage, 14), or an attachment bound to one, and s lies in one of the account's VisibilityGrants (§7.5, 14), in which case condition 4 doesn't apply (condition 3 still does: a needs_encryption member is never served a SealedMessage, grants included);
  3. if the member is needs_encryption: s ≤ u + 1, where u is the channel's upgradeSeq; when upgradeSeq is null (a channel created secure), nothing is served. Such a member therefore gets only pre-upgrade plaintext and the channel.security_changed event at u + 1, never a SealedMessage;
  4. if the event is a sealed item, or an attachment bound to one, in a secure channel: s ≥ the account's visibleFromSeq (§7.1, 14). This only narrows what the ranges allow; it never widens them. Plaintext items and non-content events follow the ranges alone;
  5. the event hasn't been deleted (by its author, a moderator, retention, or the upgrade's history deletion).

The ranges are maintained like this. Let j be the seq of the member.joined event that starts a membership, r the seq of a member.updated that reactivates a needs_encryption member, l the seq of the event that ends a membership, u the channel's upgradeSeq, and, for a needs_encryption member, c its cap: u + 1 if it became needs_encryption at an upgrade, or d if it did so by downgrade at seq d.

Event Change to the ranges
Transition into active (first join, or rejoin after left) in an insecure channel Add [1, null].
Transition into active (first join, or rejoin after left) in a secure channel Replace every range with [j, null]: earlier memberships aren't served again (D-007).
Reactivation from needs_encryption at r Keep the capped ranges (the pre-upgrade plaintext) and add [r, null].
Channel upgrade, for a member that stays active No change: it keeps the pre-upgrade plaintext (K3).
Leaving the membership (any reason) at l Replace every open range [a, null] with [a, l].
Becoming needs_encryption at an upgrade (channel.security_changed at u + 1) Replace every open range [a, null], and every range ending after u + 1, with [a, u + 1].
Becoming needs_encryption by downgrade at seq d Replace every open range [a, null] with [a, d].

Overlapping or adjacent ranges are merged. A left member is served nothing, but its ranges are kept (10 §10.4 uses them to judge what a former member may still report). In an insecure channel a rejoin adds [1, null] again, which covers everything. In a secure channel a rejoin replaces the earlier ranges, so the account isn't served its earlier memberships or the time it was away (§17.3 case B); its devices keep what they stored. Ranges survive the left record's deletion only if the server keeps them; a server that deletes a left record (§4.2) also deletes its ranges.

For timeline content items (11) the effective ceiling of a needs_encryption member is u: the event at u + 1 is channel.security_changed, which carries marker K1 and no content.

Gaps and resume. Every subscriber of a stream receives every seq (03 §7.2 D4). An event outside a recipient's ranges is delivered with its owner's reduced payload, never with its content: for this document's events the reduced payload is { "withheld": true }; for 11's and 14's events it is the form they define. session.resync_required is sent only in the cases of 03 §7.4 and §7.5 (for example gap_too_large, expired, access_changed, ahead), never as a substitute for withholding individual events. Timeline pages (11) simply omit invisible events. A needs_encryption member doesn't hold a subscription to the channel stream at all (§14.1); it reads pre-upgrade history over HTTP (11), so it never meets an endless run of withheld events.

In secure channels the ranges only limit what ciphertext the server hands out; what a device can actually decrypt is decided by the keys it holds (14). A newcomer's devices hold no key from before its join, and nothing hands one over (D-007).

7.3 Retention

retentionDays sets how long content stays in the channel. When it is an integer N, each root message whose server timestamp is more than N days old is deleted from service together with its edits, reactions and attachments, whatever their own timestamps (11 §12.2). Membership and channel events MAY be kept longer. Retention applies equally to plaintext and to ciphertext; in a secure channel the server deletes SealedMessages it can't read. Shortening the period applies to existing content within 24 h. null keeps content until someone deletes it. Enforcement, tombstones and what clients delete locally belong to 11; what happens to HistoryShares and VisibilityGrants whose items are all gone belongs to 14.

Clients SHOULD show a retention period in the channel header ("Messages are deleted after 30 days"). Retention is a server promise only: other members' devices may keep copies.

7.4 Bots (D-061)

Bots follow the same rules as people (D-061 as amended by the revised D-007; there is no botsGetHistory setting). In an insecure channel a bot member is served the whole stored history its view permission covers. In a secure channel it is served only what is sequenced from its join on, and receives earlier messages only if a member deliberately shares them with it (§7.5). Clients show W6 whenever a bot joins a secure channel (20).

7.5 Manual history sharing in channels (D-007)

In a secure channel, a member holding share_history (10) MAY share earlier messages it can read with one specific other channel member, through 14's HistoryShare. 14 defines the object, the endpoints /v1/contexts/{ctx}/history/shares and the server's acceptance checks. This section adds the channel rules:

  1. The sharer and the recipient are both channel members in state active. A needs_encryption member can neither share nor receive: it has no device in the group, and H6 refuses its request (§9.3). A bot account never shares, even if it holds share_history (14 §11); it may be a recipient.
  2. The shared range lies within the sharer's own visibility: what §7.2 serves the sharer.
  3. When the server accepts a share it records the recipient's VisibilityGrant, which §7.2 condition 2 applies, and writes the history_shared audit entry (10 §11.3) in the same transaction.
  4. A VisibilityGrant lasts as long as the recipient's current membership. When the recipient leaves, its grants end with the membership; a later membership starts without them (D-007; 14 defines the lifetime).
  5. A grant serves sealed items and their attachments only, never pre-upgrade plaintext or membership events.
  6. Clients offer sharing only as 20 §5.1 describes: never automatically, never as a default, never prompted.

Rationale: sharing is a member's deliberate act; the server only widens which ciphertext it serves, so it never needs a key, and every member sees that it happened (K8).

8. Invites

8.1 The Invite object

Member Type Req. Meaning and constraints
id string Yes UUIDv7.
code string Yes The canonical invite code (§8.2), 12 characters.
channel string or null Yes ch: reference of the channel to open after joining, or null for the community's defaultChannel.
createdBy string Yes Canonical address of the creator.
createdAt timestamp Yes
expiresAt timestamp or null Yes When the invite stops working; null for never.
maxUses integer or null Yes 1 to 10,000, or null for unlimited.
uses integer Yes Number of joins completed with this invite.
state string Yes active, expired, used_up or revoked. A client treats an unknown value as not usable.
allowSignUp boolean Yes Whether the invite can also be used to sign up on this server when its registration policy is invite (05, §8.7). Default true; setting it to false at creation needs manage_invites.
uri string Yes The sloppyv URI carrying the code (01), generated exactly as 01 §10.3 says (display-local form, canonical A-label domain).
shareLink string or null Yes The HTTPS share link built from ServerMetadata links.join (02, 01), expanded from the template as 01 §11.2 says, or null if the server publishes no template.
{
  "id": "01938f40-aaaa-7bbb-8ccc-ddddeeeeffff",
  "code": "7KQ2M9XP4HRT",
  "channel": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "createdBy": "saxonjones@sloppyvoice.com",
  "createdAt": "2026-12-04T18:00:00.000Z",
  "expiresAt": "2026-12-11T18:00:00.000Z",
  "maxUses": null,
  "uses": 3,
  "state": "active",
  "allowSignUp": true,
  "uri": "sloppyv://PublicLobby@sloppyvoice.com?invite=7KQ2M9XP4HRT",
  "shareLink": "https://sloppyvoice.com/j/PublicLobby?invite=7KQ2M9XP4HRT"
}

The exact uri grammar and the share-link template syntax belong to 01 and 02; the values above follow 01 §10.3 and §11.2 with 02's example template. When channel is null, uri uses 01's community form.

8.2 Invite codes

Generation. The server generates 60 bits from a cryptographically secure random generator and encodes them as 12 characters of Crockford's base32 alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ (5 bits per character, most significant first). Codes are unique among the server's invites that haven't been purged.

Display. Clients show codes in three groups of four, 7KQ2-M9XP-4HRT (sv-invite-display in §2).

Input normalization (normative for servers and clients). Given any user- or link-supplied string:

  1. Apply Unicode NFKC (so full-width characters become ASCII).
  2. Remove every character with the Unicode property White_Space, every character of General_Category Pd (dash punctuation, which includes - U+002D, ‐ U+2010, the figure dash U+2012 and the en dash U+2013), and the minus sign U+2212, which phones and word processors often substitute for a hyphen.
  3. Convert ASCII lowercase letters to uppercase.
  4. Replace I and L with 1, and O with 0.
  5. The result MUST match sv-invite-code (§2): exactly 12 characters of the alphabet. Otherwise the code is invalid and is treated exactly like an unknown code (invite.not_found).

Test vectors are in §17.1.

Rationale: 60 random bits make guessing hopeless under the lookup limits of §8.5, and the Crockford alphabet lets people read a code aloud or type it from a screenshot without confusing 0 and O or 1 and I. Invites usually travel as links, so the code length rarely matters to people.

8.3 Endpoints

Method and path Auth Permission Purpose
POST /v1/invites Session create_invites (scope below) Create an invite.
GET /v1/invites?state=&cursor=&limit= Session create_invites at community level, or manage_invites Collection page of invites: all of them for holders of manage_invites, otherwise the caller's own.
GET /v1/invites/{code} None — Public preview (§8.4). Any accepted input form of the code.
DELETE /v1/invites/{code} Session Creator, or manage_invites Revoke. Returns the Invite with state: "revoked".

POST /v1/invites takes:

Member Type Req. Default Constraints
channel string or null No null A channel the creator can view; otherwise 404 core.not_found (03).
maxAgeMs integer or null No 604,800,000 (7 days) 300,000 (5 min) to 31,536,000,000 (365 days), or null for never, which needs manage_invites.
maxUses integer or null No null 1 to 10,000.
allowSignUp boolean No true false needs manage_invites.

create_invites is channel-scoped (10 §3): the caller needs it in the target channel; when channel is null, in defaultChannel; and when defaultChannel is also null, at community level (10's algorithm with no channel). manage_invites additionally covers listing and revoking every invite, never-expiring invites, allowSignUp: false, and approving join requests (§4.3).

It fails with invite.not_allowed when joinPolicy is closed, and with invite.limit_reached when the community already has maxActiveInvites active invites. The response is 201 with the Invite. The server emits invite.created.

Expired, used-up and revoked invites stay listed for 30 days and are then purged; after that their code gives invite.not_found.

8.4 Invite preview

GET /v1/invites/{code} needs no authentication, so a link can show what it leads to before the person signs in. It answers with:

{
  "code": "7KQ2M9XP4HRT",
  "community": {
    "domain": "sloppyvoice.com",
    "name": "Sloppy Voice",
    "icon": null,
    "secure": false,
    "joinPolicy": "invite",
    "requireRulesAcceptance": true,
    "memberCount": 1842
  },
  "channel": {
    "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
    "address": "publiclobby@sloppyvoice.com",
    "name": "Public Lobby",
    "kind": "voice",
    "security": "secure"
  },
  "createdBy": { "addr": "saxonjones@sloppyvoice.com", "name": "Saxon Jones" },
  "expiresAt": "2026-12-11T18:00:00.000Z"
}

channel is null when the invite names no channel or names a channel for which previewVisible (10 §6.1) is false. A code that isn't active fails with the matching error (§15.4). The preview reveals the community's public data and one channel's name and security, nothing about members.

Clients use the preview to decide the path through the join (00 §8 F2): which account to use, whether G1 will appear (an insecure account and a secure channel or community), and whether to show the rules. A secure statement in a preview creates a secure-state pin (§13.3).

8.5 Using an invite

An invite is used by POST /v1/community/join with invite (§4.3). The use counter increases, atomically with creating the active membership, only when the join completes. A join that fails at any gate, or that finds the account already a member, consumes nothing. When uses reaches maxUses, the invite becomes used_up in the same transaction. A valid invite also skips the wait under joinPolicy: request.

After joining, the client opens the invite's channel if the response's openChannel names it; opening joins it silently (§4.5).

Guessing limits. Every lookup, join or sign-up (§8.7) with a code that doesn't name an active invite counts as a failed code attempt. A server MUST allow at most 30 failed code attempts per 10 minutes per IP address and per session, and answers further attempts with 429 core.rate_limited.

8.6 Links

An invite travels as its uri or shareLink; a channel address alone (sloppyv://PublicLobby@sloppyvoice.com) works as a link to an open community without any code. A client that opens either kind of link:

  1. parses it and canonicalizes the address (01), accepting alias domains and showing the canonical form afterwards (HP-8);
  2. fetches the invite preview, or for a plain address the address lookup (01) and GET /v1/community, anonymously if the person isn't signed in yet;
  3. signs in or signs up if needed (05, 20), fetching step 2 again with the session, and creates a remote session if the community isn't on the home server (06);
  4. after the person taps the preview's action (01 §10.5, 20 §10.2), joins the community (§4.3) with the code and, if required, the rules acceptance; an account that is already a community member skips this step (20 §10.1 step 3);
  5. records the community in the community list (§5.1) and opens openChannel, or the linked channel, which joins it silently (§4.5).

If a gate refuses step 4 or the channel join, the client shows the gate card and resumes by itself afterwards (§9.6).

8.7 Sign-up with an invite

When the server's registration policy is invite (05), POST /v1/auth/signup carries an inviteCode. 05 owns the endpoint; this section defines what a valid code is and how it is used:

  1. The code is normalized (§8.2) and MUST name an invite of this server's community in state active with allowSignUp: true. Otherwise the sign-up fails with 05's 400 auth.invite_invalid (403 auth.invite_required when no code is given), the same for every reason, so allowSignUp isn't revealed. An unknown, expired, used-up or revoked code, or one with allowSignUp: false, counts as a failed code attempt (§8.5).
  2. One use is consumed atomically with the account's creation. If that makes uses reach maxUses, the invite becomes used_up in the same transaction.
  3. The automatic community membership that D-068 creates in the same transaction (§4.4) records via: "invite" and consumes no second use.
  4. If the invite names a channel, the link resumes after sign-up (20 §10.1 step 2). When the sign-up already made the account a community member (item 3, D-068), the preview offers "Open", otherwise "Join"; that tap opens the channel, which joins it silently (§4.5).

9. Join gates

The join gates turn the security matrix (00 §4.3, §4.4) into server checks with fixed outcomes. The server runs them in the order given, and the first failing step decides the error. The order matters: it ensures that a hidden channel's existence and security are never revealed, and that a person is asked to do one thing at a time.

9.1 Inputs

For each request, the server knows from the session (05, 06):

  • the canonical address, the account kind, and whether it is local;
  • the account security state sec: for a local account its current state; for a remote account the sec claim of the HomeAssertion that created the session, updated by later identity.changed events (07);
  • whether the session's device is enrolled (enr): for a local account from the device record (05); for a remote account from the HomeAssertion and DeviceProof (06);
  • for a local account, the account state (active or upgrade_required, 05).

Enrolment is fixed per session. A session's enr is the value established when the session was created or renewed: from the HomeAssertion, DeviceProof and IdentityState checks of 06 for a remote account, or from the device record for a local one. It is cleared only by positive evidence: device.revoked for that device, any newer verified IdentityState that doesn't list the device, whatever its source (06 §7.2: identity.changed, a fetch, a probe or another session's request), or the end of the session. The 300 s IdentityState freshness rule of 00 HP-2 applies only where 06 and 13 require it: admitting or updating an MLS leaf, and creating a new secure membership (joining a secure channel or a secure server's community, 06). When that rule can't be met because the home server is unreachable, the server answers 06's retryable 503 federation.home_unreachable (userAction: "wait"), never security.device_not_enrolled. A remote session extended during a home outage (D-062) keeps its enr.

Rationale: a gate card that says "Set up encryption on this device" on a device that is already set up would send people into pairing for nothing. A home outage is a wait, not a device problem.

9.2 Community join procedure

For POST /v1/community/join:

Step Check Failure
C1 The session is valid. 401 core.unauthenticated
C2 The account isn't in state upgrade_required. 403 security.upgrade_required
C3 The account's domain isn't blocked (06), and the account isn't banned (10). The federation error from 06; 403 moderation.banned (10)
C4 If the community is secure, the account is secure (SM-4; Matrix B row 3). The device's enrolment is not checked (Matrix A row A7). 403 security.account_required, data: { "scope": "community", "domain": … }
C5 Invite evaluation. If invite is present: normalize it (§8.2), look it up, and record either "valid" (it names an active invite) or the specific failure code (invite.not_found, invite.expired, invite.used_up or invite.revoked). Nothing fails yet. A failure counts as a failed code attempt (§8.5). If invite is absent, record "absent". —
C6 Already a member. If the account is active or needs_encryption: if acceptRules equals rulesVersion, set rulesAcceptedVersion, increase the record's version and emit member.updated on the account's stream; then stop and return 200 with the record. The invite isn't consumed. —
C7 Bots. If the account's kind is bot (§4.4): it passes only with a valid invite whose creator holds manage_bots now. (The other way in, approval of its pending record by a holder of both manage_bots and manage_invites (10 §4.4), happens through the approve endpoint, not here.) Otherwise: under closed, fail; under invite without a valid invite, fail; in every other case go to C9 and then create or keep a pending record (202). 403 community.closed; 403 community.invite_required
C8 Join policy. Pass for a local user account while localAccountsAreMembers is true (§4.4), and for open; in both cases an invalid supplied invite is ignored and its code returned in inviteIgnored. For invite: a valid invite passes; an invalid one fails with its own code; an absent one fails with community.invite_required. For request: a valid invite passes; an invalid one fails with its own code (the person expected to get in at once); an absent one goes to C9 and then creates a pending record, or, for an account that is already pending, returns 202 with its record. For closed: fail. 404 invite.not_found; 410 invite.expired, invite.used_up or invite.revoked; 403 community.invite_required; 403 community.closed
C9 Rules: if requireRulesAcceptance is true, acceptRules equals rulesVersion. This applies to requests that will become pending too. 403 community.rules_acceptance_required with data: { "rulesVersion": …, "rulesText": … }
C10 Create or reactivate the record (active, or pending from C7 or C8), consume the invite only if the record became active, write bot_admitted to 10's audit log for a bot, emit events. —

A requester who is already pending and supplies a valid invite passes C8 and becomes active at C10. An insecure community applies no security gate to joining (Matrix B rows 1 and 2). A secure account that joins one sees W1 once for that community (D-076: it is never blocked).

Rationale: evaluating the invite before the policy, without failing, lets the policy step decide in one place whether a bad code matters: it is ignored where nobody needed it, and reported precisely where the person expected it to let them in.

9.3 Channel access procedure

For POST /v1/channels/{id}/join, and as the access check of every endpoint that reads or writes a channel's content, MLS state, history or call (the owners 11, 13, 14 and 15 apply it). 15 §2.2 applies H1 to H8 to call joins in this order, without H9 (a timed-out member may still join and listen, and joining needs no speak_and_share; 10 §8.5, 15 §4.1), and adds its call-specific checks: that the context can hold calls right after H4, and the rest after H8. H3 and H4 failures are 404 core.not_found on every endpoint, so a hidden channel answers exactly as an unknown context does (03 §5.6, §18.6; 10 §6.3).

Step Check Failure
H1 The session is valid. 401 core.unauthenticated
H2 The account isn't in state upgrade_required. 403 security.upgrade_required
H3 The channel exists and isn't deleted. A deleted channel answers 410 only to callers who could view it before deletion; others get 404. 404 core.not_found; 410 channel.deleted
H4 The caller can view the channel: view_channel in its effective permissions (10 §6.1) for an active or needs_encryption community member (10's algorithm doesn't depend on needs_encryption), or previewVisible(c) (10 §6.1) for a caller with no membership or a pending one. What a needs_encryption member may do in a secure channel is decided by H6 and H7, not by permissions. 404 core.not_found
H5 The caller is a community member: active or needs_encryption continue; pending and banned fail; no record or left fails. 403 member.pending; 403 moderation.banned (10); 403 member.not_member with data: { "joinPolicy": …, "requireRulesAcceptance": … }
H6 If the channel is secure: the account is secure and the community membership isn't needs_encryption, unless the request is one of these, made by an existing channel member in state needs_encryption: (i) a read of timeline items, attachments or membership events within its visibility ranges (§7.2, so only seq ≤ upgradeSeq + 1 and never a SealedMessage); (ii) GET of the Channel object, the channel's members, the call state or the call's mutes (15 §3.2, §3.6). These pass H6 and H7. 10's moderation, role, ban, report and audit-log requests don't pass through H6 (10 §8.2 rule 9). 403 security.account_required, data: { "scope": "channel", "ctx": … }
H7 If the channel is secure: the device is enrolled (SM-4, D-058), except for the requests H6 lets through. 403 security.device_not_enrolled, data: { "ctx": … }
H8 For content, MLS, history and call endpoints only: the caller is a channel member. 403 channel.join_required
H9 The checks of 10 §6.3 a to e, in that order: timeout, missing permission, hierarchy, new-member restriction, slow mode and rate limits. The codes of 10 §6.3, for example 403 moderation.timed_out, 403 core.forbidden with data.permission, or 403 moderation.new_member_restricted

For the join itself, H8 is skipped and success creates or reactivates the ChannelMember (§4.5). A join is never one of H6's exceptions, so an insecure account can't join a secure channel, nor rejoin one after leaving it. In an insecure channel, H6 and H7 never apply: a secure account on an unenrolled device can use it (D-058), and an insecure account can too (Matrix A rows A1, A2). The exceptions in H6 exist because D-057 and 00 HP-12 step 5 let members who can't follow an upgrade keep reading the pre-upgrade plaintext history; they never reach anything sealed (00 SM-4).

Rationale: H3 and H4 come before every security check, so that a person who can't see a channel learns nothing about it, not even that it is secure. H6 comes before H7 so that an insecure account is offered "Turn on encryption" (G1), which also sets up the device, rather than a device-setup card it can't use.

9.4 Creation gate

A request that would create an insecure channel on a secure server, or keep one, fails with 409 security.server_requires_secure (SM-2, Matrix A row A9). This covers POST /v1/channels with security: "insecure" on a secure server. A secure server MUST NOT hold an insecure channel at any time; §11 ensures that the server upgrade leaves none.

9.5 Client reactions

Error Client reaction
security.account_required G1 in place of the community or channel ("Turn on encryption"); resume afterwards (§9.6).
security.upgrade_required The blocking "Turn on encryption to continue" screen of 00 Matrix A row A10 at the home server; G1 elsewhere.
security.device_not_enrolled G2 inside the channel ("Set up encryption on this device"); resume afterwards.
member.not_member Join the community (§4.3) without asking, unless the rules or an invite are needed; then retry. If the policy is invite and no code is known, say "You need an invite to join this community".
federation.home_unreachable Wait and retry as 06 says; no gate card.
member.pending "Waiting for approval", with "Cancel request".
community.rules_acceptance_required Show the rules with "Agree and join".
community.closed, community.invite_required, invite.* One plain sentence; no retry.
channel.join_required Join the channel silently and retry.

The client MUST NOT show any other security warning on these paths (D-055).

9.6 Resuming after G1 and G2

The gate cards promise that the interrupted action resumes by itself (00 §4.12.2). This is client behaviour; the server keeps no state for it.

  1. When a gate error interrupts something the person started (opening a link, joining a community, opening a channel, joining a call, upgrading a channel), the client records a join intent: the target (community domain or ctx), the invite code if any, the rules version the person accepted if any, the action (join_community, open_channel, join_call or upgrade_channel) and the time. Intents live in device-local storage (not the AccountVault, which an insecure account doesn't have). There is at most one per target, and each expires after 24 h.
  2. After G1. When the account upgrade (08) completes and the home server's IdentityState says sec: secure, the client, for each intent whose server isn't the home server: discards remote sessions to that server created before the upgrade; obtains a fresh HomeAssertion (with sec: secure, enr: true) and DeviceProof; and creates a new remote session (06). Then it retries, in order: the community join, the channel join, joining or bootstrapping the channel's group as 13 §10 directs (GET /v1/contexts/{ctx}/mls, bootstrapAllowed), and the call join if the action was join_call. For upgrade_channel it re-runs the dry run and shows W5 again; it never confirms an upgrade by itself. For the home server's own community the home session already reflects the change, so the session steps are skipped.
  3. After G2. The same, once pairing or the recovery key has enrolled the device (08).
  4. While the retry runs, the client shows a "Joining…" state in place of the card. The person taps nothing.
  5. If a retried step fails with a non-gate error (the invite expired, a ban, the rules changed), the client shows that error in place of the card and drops the intent. Changed rules are shown again with "Agree and join".
  6. An expired intent is dropped silently; the gate card simply appears again if the person goes back.
  7. Invite uses are not reserved while a gate card is open. If the invite runs out meanwhile, step 5 applies.

Rationale: the client already knows everything needed to resume, so keeping intents on the device avoids a server-side "pending join" state that would have to survive account upgrades and new sessions. A fresh remote session is needed because a remote session's security comes from the HomeAssertion that created it.

10. Channel upgrade

A channel goes from insecure to secure through one dry run, one confirmation (W5) and one atomic switch (D-018, D-057, 00 HP-12). There is no way back (§12).

10.1 Preconditions

The server checks these in table order and answers with the first failure:

Requirement Dry run Confirmation Failure
Channel exists and the caller can view it Yes Yes 404 core.not_found (03)
Caller holds manage_channels for the channel (10) Yes Yes 403 core.forbidden, data.permission: "manage_channels"
Channel is insecure Yes Yes 409 channel.already_secure with data (§10.4)
Caller's account is secure No Yes security.account_required
Caller's device is enrolled No Yes security.device_not_enrolled
No other upgrade of this channel, or of the server, is being applied No Yes 409 channel.upgrade_in_progress (retryable: true, retryAfterMs)

The caller needn't be a channel member: the confirmation makes it one, and its device becomes the group's only leaf. The dry run is allowed to an insecure admin, so the client can show who would be affected; the client then shows G1 before W5 if the admin's own account is insecure, and the upgrade flow resumes after the account upgrade like any join intent (§9.6).

10.2 Dry run

PATCH {base}/v1/channels/01938a11-2b3c-7d4e-8f90-112233445566

{ "security": "secure", "dryRun": true }

The server changes nothing, emits nothing, and answers 200 with an UpgradePlan:

Member Type Req. Meaning
scope string Yes channel.
ctx string Yes The channel.
planVersion string Yes §10.6.
memberTotal integer Yes Channel members (active).
cannotFollowCount integer Yes Channel members whose accounts are insecure. They will become needs_encryption.
cannotFollow array Yes Up to 100 of them, ordered by addr: { "addr", "name", "kind", "reason": "insecure_account" }.
cannotFollowTruncated boolean Yes true if cannotFollowCount exceeds the list.
secureBots array Yes Up to 100 secure bot accounts that are active channel members and will follow the upgrade, ordered by addr: { "addr", "name" }. Each one will be able to read everything posted after the upgrade (W6).
secureBotsTruncated boolean Yes true if there are more.
needsDeviceSetupCount integer Yes Secure members with no enrolled device seen in the last 90 days. They can follow after setting up a device (G2). Informative.
historyMessageCount integer Yes Content messages that exist now, for the deletion option. MAY be approximate.
activeCall boolean Yes Whether a call is running; it will restart as a secure call.
webhookCount integer Yes Webhooks that will stop working (11, D-061).
{
  "scope": "channel",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "planVersion": "GCAyvoU41zWFs6KTs76jeQ",
  "memberTotal": 41,
  "cannotFollowCount": 3,
  "cannotFollow": [
    { "addr": "bob@a.com", "name": "Bob", "kind": "user", "reason": "insecure_account" },
    { "addr": "carol@c.com", "name": "Carol", "kind": "user", "reason": "insecure_account" },
    { "addr": "dave@sloppyvoice.com", "name": "Dave", "kind": "user", "reason": "insecure_account" }
  ],
  "cannotFollowTruncated": false,
  "secureBots": [],
  "secureBotsTruncated": false,
  "needsDeviceSetupCount": 1,
  "historyMessageCount": 4120,
  "activeCall": true,
  "webhookCount": 0
}

Clients treat an unknown reason as insecure_account.

10.3 The W5 confirmation

The client shows W5 (copy in 20) with:

  • the people who can't follow, by name (the first few, then "and N others"), and what happens to them: they stay in the channel, can read earlier messages, and can come back in by turning on encryption;
  • the secure bots that will follow, by name, and that each of them will be able to read everything posted from then on (the same fact W6 states later);
  • that people who join the channel later won't see anything sent before they joined, the messages sent before encryption included (D-007);
  • a checkbox, off by default, to also delete the messages sent before encryption was turned on;
  • a note that a running call restarts by itself, if activeCall is true;
  • one confirm button.

W5 is shown even when cannotFollowCount is 0; it is then a plain confirmation. The client sends the confirmation with the dry run's planVersion.

10.4 Confirmation and the atomic switch

PATCH {base}/v1/channels/01938a11-2b3c-7d4e-8f90-112233445566
Idempotency-Key: 6f1d0c2e-upgrade-1

{
  "security": "secure",
  "dryRun": false,
  "planVersion": "GCAyvoU41zWFs6KTs76jeQ",
  "deletePreUpgradeHistory": false,
  "bootstrap": {
    "generation": 1,
    "groupInfo": "AAEABEQAAAA…",
    "ekid": "Xc0mY2n4QbE"
  }
}
Member Type Req. Meaning
security string Yes secure. (insecure on a secure channel fails as §12 says.)
dryRun boolean No Default false.
planVersion string Yes From the dry run the person confirmed.
deletePreUpgradeHistory boolean No Default false.
bootstrap GroupBootstrap (13 §7.4) Yes The caller's one-member group: a GroupBootstrap exactly as 13 §7.4 defines it (generation, groupInfo, ekid). A channel that becomes secure for the first time has generation 1 (13 §4.2), so the client can build the group_id (13 §4.1) before sending.
ifVersion integer No As in §2.

The request MUST carry an Idempotency-Key (00 §7.11); a confirmation without one fails with 400 core.invalid_request. A request whose planVersion is missing fails the same way.

The server validates in this order, after the preconditions of §10.1:

  1. planVersion equals the value recomputed now (§10.6). Otherwise 409 channel.upgrade_plan_stale, with the new UpgradePlan in data.plan. The client shows W5 again with the new names.
  2. bootstrap is present. Otherwise 400 channel.bootstrap_required.
  3. The server runs 13 §7.4's GroupBootstrap checks for the channel's current generation as if the channel were already in 13's state none. Their mls.* errors (for example mls.group_id_mismatch, mls.credential_rejected, mls.policy_violation) are returned unchanged, and nothing changes.

Then, in one transaction with the channel's sequencer (no message can be sequenced in the middle):

Step Action
S1 Let u be the highest seq assigned in the channel so far.
S2 Set security: secure, securedAt to now, upgradeSeq: u, preUpgradeHistory to deleted or kept; increase version.
S3 Allocate generation 1 and store the GroupBootstrap as the group's epoch 0, exactly as 13 §4.3 and §7.4 say for a bootstrap accepted in state none.
S4 Make the caller an active channel member if it isn't one; its device is the group's only leaf.
S5 Move every other active channel member whose account is insecure to needs_encryption (channel_upgraded). Secure members stay active.
S6 If deletePreUpgradeHistory is true, delete every content event with seq ≤ u and its attachments (11). They stop being served at once and SHOULD be purged within 30 days.
S7 Disable the channel's webhooks (11).
S8 Append channel.security_changed to the channel's stream with seq = u + 1. 13's mls.group_created and the member.updated events of S5 follow it, at u + 2 and later.

Immediately after the transaction commits:

Step Action
A1 From now on the channel is secure for 11's carrier rules: every post that would be sequenced after u must be sealed. 11 rejects any insecure post with 409 channel.plaintext_rejected (§15.3; data.security: "secure", data.upgradeSeq). Plaintext posts were sequenced before S1 or are rejected; there is no third case.
A2 End the channel's running call with reason security_upgraded and revoke its leases (15).
A3 Deliver channel.security_changed (seq u + 1) on the channel stream; sequence channel.updated with the new Channel on the community stream; deliver the S5 member.updated events (§14). Then end the channel-stream subscriptions of the members moved to needs_encryption (§14.1).
A4 Answer 200 with the updated Channel.

A repeat of the same request with the same Idempotency-Key returns the same answer. A confirmation for a channel that is already secure fails with 409 channel.already_secure, whose data holds channel (the Channel), by (the canonical address of the admin whose upgrade made it secure, or null after a server upgrade), and groupId, generation and ekid of the group's epoch 0 (null if no group exists yet). A client whose own GroupBootstrap matches those values (its confirmation succeeded but the response was lost) keeps its group. Any other client discards the group it created and joins the existing one by external commit, or bootstraps if none exists (13 §10).

10.5 After the switch

Secure members. Each device joins the group by external commit (13) the next time it syncs the channel or receives channel.security_changed. Nobody is prompted (00 §4.12.5). Members see marker K1 at seq u + 1 and K3 above the pre-upgrade messages (or no K3 if they were deleted). They keep reading the pre-upgrade messages because they were members before the upgrade (D-007). Clients show the closed lock only once they hold the group's state (SM-12).

Pre-upgrade history. Messages with seq ≤ u stay plaintext on the server and are served, as plaintext, only to accounts whose visibility ranges cover them: the accounts that were channel members at the upgrade and haven't left since (§7.2). An account whose membership begins after the upgrade, including a former member who rejoins, isn't served them (D-007). They are never sealed, archived or shared through a HistoryShare (14). Clients display them under K3 and never show a closed lock on them.

Members who can't follow. A needs_encryption member keeps its membership, roles and place in the member list. It can read the channel up to seq u + 1 (unless the history was deleted) and sees G1 in the channel. It can't post, react, upload, join the call or read anything newer. When its account turns on encryption, the server moves it back to active (§4.8) and the client resumes by itself (§9.6).

Unenrolled devices of secure members see G2 in the channel.

Calls. The call ended in A2 with reason security_upgraded. Clients of members who can follow rejoin it as a secure call automatically and keep the microphone and push-to-talk state, because this is a planned migration (00 HP-13 rule 7, 15). Members who can't follow aren't rejoined; their call view shows G1.

Unsent messages. A client whose plaintext post to the channel was rejected with 409 channel.plaintext_rejected (§15.3) MUST NOT resend it as plaintext. If the account is secure and the device enrolled, the client sends it again, automatically, as a SealedMessage with the same mid once it has joined the group (11 §4.7, 'What a client does when the mode changed under a queued entry'). Otherwise it keeps the message unsent and shows it as not delivered (20).

Pins. Every client that receives the Channel or channel.security_changed creates a secure-state pin (§13).

10.6 Plan version

The plan version lets the server detect that the set of people who can't follow changed between the dry run and the confirmation, without keeping state:

planVersion = base64url( SHA-256( "sv1 upgrade plan" || 0x00 || scope || 0x00
                                   || A_1 || 0x0A || A_2 || 0x0A || … || A_n || 0x0A )[0..16] )
  • scope is the channel's context reference (for example ch:01938a11-…) for a channel upgrade, or the server's canonical domain for a server upgrade, as UTF-8.
  • A_1 … A_n are the UTF-8 canonical addresses of every account that can't follow (not just the first 100), without duplicates, sorted in ascending byte-wise order. For a channel these are the S5 accounts; for a server, §11.2 defines the set. With no such account, the input ends after the second 0x00.
  • The output is the first 16 bytes of the hash, base64url without padding (22 characters).

Any change to the set, in either direction, changes the version. Test vectors are in §17.2.

Registry addition (04). sv1 upgrade plan: a hash domain-separation prefix, used only here.

10.7 State machines

Channel security (server side):

State Event Action Next state
insecure PATCH {security: secure, dryRun: true} Return the UpgradePlan insecure
insecure Valid confirmation (§10.4) S1–S8, A1–A4 secure, group present
insecure Server upgrade (§11) §11.4 secure, no group yet
(none) POST /v1/channels with security: secure, or any create on a secure server Create (§6.4) secure, no group yet
secure, no group yet First enrolled member device uploads a GroupBootstrap (13 §7.4, compare-and-set) Store it secure, group present
secure, group present 13 declares the group unrecoverable and starts a new generation 13 secure, no group yet
secure, any PATCH {security: insecure} Refuse, security.downgrade_forbidden unchanged
secure, any PATCH {security: secure} (any dryRun) Refuse, channel.already_secure unchanged
any DELETE §6.4 deleted

Channel member during an upgrade:

Member's account at S5 Before After What the member sees
Secure, enrolled device active active K1, with K3 above the pre-upgrade messages; 20's "Joining…" state while its device joins the group. No K4 or K6: the member was in the channel before the upgrade (D-007).
Secure, no enrolled device active active G2 on each unenrolled device.
Insecure user or bot active needs_encryption K1 and G1; pre-upgrade history under K3.
The caller any active, sole leaf K1.

11. Server upgrade

A server upgrade makes the whole community secure, once and for ever (D-018, D-057, D-073, SM-2, SM-3).

11.1 Preconditions

The server checks these in table order and answers with the first failure:

Requirement Dry run Confirmation Failure
Caller holds 10's admin role (10 §4.2) Yes Yes 403 core.forbidden with data.missingRole: "admin"
Caller is a local account (a server admin, §2) Yes Yes 403 community.local_admin_required
Caller's account is secure No Yes security.account_required
Caller's device is enrolled No Yes security.device_not_enrolled
confirmDomain equals the canonical domain No Yes 400 community.confirmation_mismatch
No other upgrade is being applied No Yes 409 community.upgrade_in_progress (retryable)

Rationale: the upgrade is irreversible and changes every local account, so only an admin (10 reserves it to the admin role; manage_community isn't enough) whose own account lives on this server can do it. confirmDomain is filled in by the client from the W5 dialog; it stops a generic settings tool from setting secure: true by accident.

11.2 Dry run

PATCH /v1/community with { "secure": true, "dryRun": true } answers 200 with a ServerUpgradePlan:

Member Type Req. Meaning
scope string Yes community.
domain string Yes Canonical domain.
planVersion string Yes §10.6, with scope = the canonical domain and the set below.
insecureChannelCount integer Yes Channels that will be upgraded.
localInsecureAccountCount integer Yes Local accounts (users and bots) that are insecure. They will be in the account state upgrade_required (05).
localInsecureBotCount integer Yes How many of those are bots. A bot can't complete the account upgrade ceremony itself; it stops working until its operator re-creates or re-provisions it as a secure bot (05).
remoteInsecureMemberCount integer Yes Remote community members whose accounts are insecure. They will become needs_encryption.
cannotFollow array Yes Up to 100 of the accounts in the set, ordered by addr: { "addr", "name", "kind", "local", "reason": "insecure_account" }.
cannotFollowTruncated boolean Yes true if the set exceeds the list.
secureBots array Yes Up to 100 secure bot accounts that are community members, ordered by addr: { "addr", "name" }. Each can read everything in the channels it joins (W6).
secureBotsTruncated boolean Yes true if there are more.
insecureDmCount integer Yes Insecure DMs and group DMs hosted here, which will be closed or paused (12 §13.1).
activeCallCount integer Yes Calls that will restart (channels) or end (insecure DMs).
webhookCount integer Yes Webhooks that will stop working.
historyMessageCount integer Yes Content messages in insecure channels, for the deletion option. MAY be approximate.

The set of accounts that can't follow is: every local account whose security state is insecure (members or not), plus every remote account that is a community member or requester (active, needs_encryption or pending) and is insecure.

11.3 The W5 confirmation for a server

As §10.3, plus: it says the change can't be undone; that every channel will be encrypted; that people on this server who haven't turned on encryption must do so before they can continue; that the insecure bots counted in localInsecureBotCount stop working until they are re-created as secure bots; and that insecure DMs hosted here will be closed and moved, or paused until everyone in them turns on encryption. The deletion checkbox (off by default) covers the pre-upgrade messages of every channel.

11.4 Confirmation and the switch

PATCH {base}/v1/community
Idempotency-Key: 0b9e3f1a-server-upgrade

{
  "secure": true,
  "dryRun": false,
  "planVersion": "sz7r_QrpM41P2qIZtp3P4w",
  "confirmDomain": "sloppyvoice.com",
  "deletePreUpgradeHistory": false
}
Member Type Req. Meaning
secure boolean Yes true. (false on a secure server fails as §12 says.)
dryRun boolean No Default false.
planVersion string When dryRun is false From the dry run the admin confirmed.
confirmDomain string When dryRun is false The canonical domain, as typed or confirmed in W5.
deletePreUpgradeHistory boolean No Default false.
ifVersion integer No As in §2.

A missing required member fails with 400 core.invalid_request with data.errors (reason: "missing", 03 §10.5). The confirmation MUST carry an Idempotency-Key (00 §7.11), or it fails the same way.

After the preconditions and the planVersion check (community.upgrade_plan_stale with the new plan in data.plan), the server applies the following. It MUST appear atomic to every client: no client can observe the community secure while any channel is insecure, or post plaintext to any channel or hosted DM after the community became secure. A server can achieve this by stopping plaintext ingress server-wide first (T1). Ingress never resumes, because no plaintext path remains afterwards.

Step Action
T1 Stop accepting plaintext content in every channel and every insecure DM and group DM hosted here. Requests that arrive now fail with 409 channel.plaintext_rejected (channels, §15.3) or, for DMs, 409 dm.closed or dm.encryption_pending as 12 §13.1 says.
T2 For every insecure channel, apply S1, S2, S5 (with reason server_upgraded), S6, S7 and S8 of §10.4 without a bootstrap group: the channel becomes secure with generation 1 in 13's state none; channel.security_changed carries cause: "server_upgrade". The caller doesn't become a member of every channel.
T3 Set Community secure: true and securedAt; increase version. ServerMetadata secure becomes true and its securedAt is set to the same value, in the same step (02).
T4 Move every community membership of an insecure account (local or remote, user or bot) from active to needs_encryption (server_upgraded). Reject every pending request from an insecure account (member.rejected, reason closed).
T5 Put every local insecure account into the account state upgrade_required (05).
T6 Apply 12 §13.1 to every insecure DM and group DM hosted here: each is closed read-only with marker K5, except an insecure 1:1 DM whose rule host is a secure server (both of its homes are then secure servers), which becomes encryption_pending in place.
T7 From now on, new local accounts are created in the account state upgrade_required and can do nothing until they turn on encryption (SM-1, SM-3; 05 §8.6, 08).

Then:

Step Action
U1 End every call in the upgraded channels with reason security_upgraded, and every call in the closed and encryption_pending DMs (15, 12).
U2 Sequence community.security_changed and community.updated on the community stream, deliver each channel's channel.security_changed and channel.updated (§10.4 A3), and member.updated for every T4 transition (§14).
U3 Answer 200 with the updated Community.

The server MUST finish T1 to T7 before answering. Clients SHOULD allow 120 s for the response and show progress. A repeat with the same Idempotency-Key, or a confirmation when the server is already secure, answers 200 with the Community.

Lazy bootstrap. No channel has a group right after a server upgrade. The first enrolled member device that opens a channel creates its group and uploads it with 13's compare-and-set; every other device then joins by external commit. A channel nobody opens never gets a group, which costs nothing.

11.5 After the switch

  • Local accounts that were insecure see, at their next sign-in or on the open socket, the blocking "Turn on encryption to continue" screen (00 Matrix A row A10). They can only turn on encryption (08) or delete the account (05). Once secure, their memberships return to active (§4.8) and their join intents resume (§9.6).
  • Remote insecure members see G1 at community level. Their community list entry stays, with state needs_encryption.
  • Secure members see K1 in each channel they open, with K3 above earlier messages, and the "secure community" badge (Matrix A row A8). They are not prompted.
  • Insecure DMs hosted here show K5 and continue at the host 12's rule now selects, or stay in place in encryption_pending (12 §13.1, §13.2).
  • Other servers learn the new state from ServerMetadata (02) and from the events their users' clients receive. No server-to-server event is defined for it.

11.6 State machine

State Event Action Next state
insecure Dry run Return the ServerUpgradePlan insecure
insecure Valid confirmation T1–T7, U1–U3 secure
secure secure: true (any dryRun) Return the Community secure
secure secure: false Refuse, security.downgrade_forbidden secure

A server created secure starts in secure with securedAt equal to its creation time.

12. Downgrade prohibition

  1. PATCH /v1/channels/{id} with security: "insecure" on a secure channel fails with 409 security.downgrade_forbidden (D-018), whatever dryRun says and whoever asks.
  2. PATCH /v1/community with secure: false on a secure server fails with 409 security.downgrade_forbidden (D-073).
  3. A server MUST NOT offer any other API, admin tool or configuration path that changes a secure channel or a secure server back to insecure, clears securedAt or upgradeSeq, or accepts plaintext content in a secure context, or serves plaintext content with seq > upgradeSeq there (pre-upgrade plaintext, §10.5, is the only plaintext a secure channel holds). An operator who edits storage directly breaks this specification; clients then detect the result as W9 (§13).
  4. To go back, an admin creates a new, insecure channel with a new name (D-018), on an insecure server. A secure server can't hold one (SM-2); the only way back for a server is a different server. Admin clients MAY show a line of informational help text saying this where a person looks for "Turn off encryption" (wording in 20; it isn't a security warning, D-055), and MUST NOT offer a control that sends a downgrade.
  5. Deleting a secure channel and creating an insecure channel under the same address is not a downgrade of the same context: it is a new context with a new ctx, no history, and no lock. Clients treat it as §13.5 says, after settling their pin through the deleted channel's tombstone (§6.4).

13. Client secure-state pins and W9

D-018 and D-073 forbid downgrades, but a malicious or broken server could still present a secure channel or server as insecure. Clients therefore remember what they have seen and treat a presented downgrade as a hard error, W9 (D-056, SM-12).

13.1 Who keeps pins

  • A device that can use the AccountVault (an enrolled device of a secure account, including a secure bot) MUST keep secure-state pins (channel, community and group DM pins) and MUST store them in the AccountVault (08) as sec_pin records (§13.2), so that all the account's enrolled devices share them and a new enrolled device starts with them.
  • A device that can't use the AccountVault (an unenrolled device of a secure account, or any device of an insecure account) MUST keep pins in device-local storage and apply §13.3 to §13.6 to them. Such a device receives no secure content to check, but it can still be shown a secure context as insecure, and a pin stops it from posting plaintext into a context that everyone else believes is secure (D-056, D-058).
  • When such a device becomes enrolled, or its account turns on encryption, the client merges its local pins into the vault (§13.2 merge rule) and from then on uses the vault.

13.2 Pin records

A pin is 08's sec_pin vault record (08 §8.6.3). 08 owns the record framing, encryption and record ID; this document owns its meaning and members. A channel pin (kind: "channel"):

Member Type Meaning
t string "sec_pin" (08).
kind string channel. The known kinds are channel, community and group_dm (below); a client ignores a record with any other kind.
host string Canonical domain of the hosting server. With ctx, the record's key.
ctx string The channel's ch: reference.
address string The channel's current canonical address as last seen (below).
previousAddresses array { "address", "replacedAt" } for addresses this channel had before. replacedAt is the ts of the channel.updated event that changed the address, or null when the client learned of the change only from a later Channel object. Entries whose replacedAt is more than 90 days old MAY be dropped.
securedAt timestamp or absent Pinned value; absent until first seen.
upgradeSeq integer, null, or absent Pinned value (null for a channel created secure); absent until first seen in a Channel object or channel.security_changed.
version integer or absent The Channel version in the statement that set securedAt; used to recognise older, historical statements (§13.4).
firstSeenAt, lastSeenAt timestamp Client times.
deletedSeenAt timestamp or null When the client saw the channel deleted (§13.5).

A community pin (kind: "community") covers the whole server:

Member Type Meaning
t, kind string "sec_pin", community.
host string Canonical domain. The record's key (ctx is null).
ctx null
securedAt timestamp or absent Pinned value.
version integer or absent The Community version in the statement that set securedAt.
firstSeenAt, lastSeenAt timestamp Client times.
hidden boolean true after the person chose "Leave" on a W9 for this community (§13.6).

A group DM pin (kind: "group_dm") records that a group DM was seen as secure (12 §11.1): members t ("sec_pin"), kind (group_dm), host (canonical domain of the hosting server; with ctx, the record's key), ctx (the gdm: reference), firstSeenAt and lastSeenAt (client times), and hidden (boolean, true after "Leave group" on a W9). Merging: the earliest firstSeenAt, the latest lastSeenAt, and hidden if either is true. 12 decides when it is created and what it enforces; §13.1's storage rules apply to it. A client MAY delete a group DM pin 400 days after its lastSeenAt.

In this section, P is a channel pin and S a community pin.

Address tracking. Whenever the client receives a Channel object for P.ctx from P.host whose address differs from P.address, it moves P.address into previousAddresses (with replacedAt as defined above) and stores the new address. This covers channel.updated with previousAddress as well as a Channel fetched after a resync.

Merging (for 08 §8.9.3): the union of previousAddresses; the earliest firstSeenAt; the latest lastSeenAt; the earliest non-null deletedSeenAt; hidden if either is true; the address of the version with the later lastSeenAt. securedAt, upgradeSeq and version are taken from whichever version has them; when both have them and they differ, the merged record keeps the values of the version with the earlier firstSeenAt, the client raises W9 (T3) for that context, and reports a diagnostic (§13.6 step 5), because the server presented two different histories to two of the account's devices.

13.3 Creating and updating pins

A client creates or updates a pin whenever it receives, from the server that hosts the channel or community, any statement that it is secure:

  • a Channel object, a channel.* event or a GET /v1/channels entry with security: "secure";
  • an address lookup (01) or an invite preview (§8.4) saying security: "secure" or secure: true;
  • a Community object or ServerMetadata (02) with secure: true;
  • MLS state the client holds for the channel's group.

Rules:

  1. A pin is never removed or weakened because of anything a server says. A client MUST NOT turn a pin into "insecure".
  2. securedAt, upgradeSeq and version are filled in the first time they are seen and are immutable afterwards (except by the merge rule of §13.2). A statement from an unauthenticated source (address lookup, invite preview) can create a pin but can't fill upgradeSeq; only a Channel object or channel.security_changed fills it.
  3. A community pin covers every channel of that server, including channels the client has never seen.
  4. Only address, previousAddresses, lastSeenAt, deletedSeenAt and hidden change over time. A client MAY delete a channel pin 400 days after both its lastSeenAt and its deletedSeenAt (if set) have passed. A client MUST NOT delete a community pin (see Q4).
  5. A client holding a channel pin whose upgradeSeq is absent, or only a community pin for the channel's server, MUST fetch the Channel object before it displays any plaintext content of that channel, so that T2 (§13.4) can be decided. Until it has seen the Channel object, it displays no plaintext content of the channel.

Rationale: pins only ever record "this was secure", so a lying server can at worst create a pin for something that is really insecure, which makes the client refuse to use it there. That server is the same one that could refuse service anyway, so nothing is lost.

13.4 W9 triggers

For a channel X on server D, let P be the client's channel pin for X and S its community pin for D, if any. The client MUST raise W9 for X exactly when one of these happens:

ID Condition Needs
T1 A current Channel object, channel.* event, channel list entry, address lookup or invite preview from D describes X with security: "insecure". P or S
T2 D delivers in X a plaintext content event (11's insecure carrier) with seq > P.upgradeSeq, or any plaintext content event when P.upgradeSeq is null; or D accepts such a post from this client (no channel.plaintext_rejected); or a call join for X returns an insecure call (15). P with upgradeSeq known. Under S alone, the client first creates P from the Channel object (§13.3 rule 5) and then applies T2 by seq.
T3 A current Channel object or channel.* event for X gives a securedAt or upgradeSeq different from the pinned value; or two of the account's devices pinned different values (§13.2). P with the value pinned
T4 A current Community object or ServerMetadata from D says secure: false, or gives a securedAt different from S.securedAt. Raises W9 for the whole community and every channel of D. S
T5 A current Channel object of D presents a channel with security: "insecure" or with no securedAt (a breach of SM-2), or with a non-null upgradeSeq and a securedAt later than S.securedAt + 300 s (a channel that was insecure after the server became secure). Raises W9 for that channel and for the community. S
T6 Resolving P.address, or an entry of P.previousAddresses replaced less than 90 days ago (by address lookup, link or channel list), yields a channel with a different ctx whose security is insecure, while P.deletedSeenAt is null, and the check below confirms it. Raises W9 for that address; the client MUST NOT present the new channel as X. P

Only current statements count. A statement is current only if it is fresh:

  • Before raising T1 or T4 from a cached ServerMetadata, address lookup, invite preview or channel list, the client refetches that object bypassing caches (Cache-Control: no-cache) and raises W9 only if the fresh response still conflicts with the pin.
  • A Channel or Community object, in a response or event, whose version is lower than the pin's version is historical (for example a replayed channel.updated from before the upgrade) and never triggers T1, T3, T4 or T5.

The check before T6. Before raising T6, the client MUST fetch GET /v1/channels/{P.ctx} from D:

  • 410 channel.deleted: set P.deletedSeenAt and treat the new channel as §13.5 says; no W9.
  • 404: the account can no longer view it, which is lost access; no W9.
  • 200 and the resolved address is the pinned channel's current address: the server presents two different channels at one address; raise W9.
  • 200 and the resolved address is in the pinned channel's reservedAddresses, or in P.previousAddresses with a non-null replacedAt less than 90 days ago: the server broke the reservation of §6.3, which an honest server never does; raise W9.
  • 200 otherwise (the channel was renamed and the old address's reservation is over): update P.address (§13.2); no W9, and the channel at the old address is a new conversation.

These are not W9 triggers: the channel or community being deleted; the account leaving or losing access; the person's own account becoming insecure (they get needs_encryption and G1 instead); the server being unreachable; a missing or unknown security value (§6.1); missing MLS state (the client resyncs, 13); pre-upgrade plaintext with seq ≤ upgradeSeq (shown under K3); a change of the server's key set (02); an address change through channel.updated with previousAddress; a historical (older-version) statement.

13.5 Deleted channels and reused addresses

When the client receives channel.deleted for P.ctx, or GET /v1/channels/{id} answers 410 channel.deleted, it sets P.deletedSeenAt. A channel that later appears under P.address with a different ctx is a new conversation: the client shows it with no link to the old timeline and with the lock state of its own security (an open lock for a secure account in an insecure channel, under the usual W1 rules). T6 doesn't fire.

01 §5.7 lets a deleted channel's local part be reused as a channel at once, so clients don't rely on quarantine: the check before T6 (§13.4) and the 400-day tombstone (§6.4, a MUST) are what let a client tell a recreated channel from a downgrade.

13.6 What W9 does

When W9 is raised for a context, the client (copy and layout in 20):

  1. shows a hard error in that context (and, for T4 and T5, across the community);
  2. disables sending, editing, reacting, uploading, joining the call and speaking there, and leaves any call in that context at once without transmitting further;
  3. never displays plaintext content with seq > upgradeSeq, nor, under a community pin without a channel pin, plaintext whose server timestamp ts is later than S.securedAt; it may keep such content only as diagnostic data;
  4. for a member, offers "Leave", which calls POST /v1/channels/{id}/leave, or for T4 and T5 POST /v1/community/leave; leaving a community after W9 also sets S.hidden, which hides the domain from the sidebar and stops automatic connections to it while keeping the pin;
  5. unless the diagnostics setting is off (15 §14.2, §14.4; 20 §17), sends a report of kind security_downgrade_seen through POST /v1/diagnostics (15 §14.3) to the hosting server and to the account's home server. ctx is the channel's reference, or absent for a W9 raised for the whole community. data is {"trigger", "host", "pinned", "observed"}, where: trigger is T1…T6 (a collector stores unknown values as other); host is the hosting server's canonical domain; pinned holds the pin's securedAt, upgradeSeq and version, as far as they are known; and observed holds what was presented, as far as present: the Channel's security (or the Community's secure), securedAt, upgradeSeq and version and, for T2, the content's seq. The report never contains content;
  6. offers no "Ignore" or "Continue anyway".

For a person who isn't a member (a pin from an invite preview or an earlier membership), W9 appears only when they try to open or join the context or community, and the action offered is "Close".

W9 clears only when the server again presents the context consistently with the pin (security: "secure", the pinned securedAt and upgradeSeq, and for T4 secure: true). The client then resumes normal operation, but step 3 still applies to anything received during the inconsistency.

13.7 Relation to the lock

Pins stop downgrades; they don't grant a lock. A pinned channel shows the closed lock only when SM-12 holds (the client holds current MLS state for the group). A pinned channel without MLS state on this device shows 20's "Joining…" state, or G1 or G2 if a gate applies, never W9.

Exception (00 §4.12.6): an insecure account, or an unenrolled device of a secure account, shows the closed lock on a secure context it can't open, together with G1 or G2. That lock means "encrypted, not available to you" and never accompanies content.

14. Events

14.1 Delivery

This document's events travel on the three kinds of durable stream of 03 §7.1 (the community stream is D-078). Every event type here is durable (03 §7.2); none is ephemeral.

Stream Envelope Who may subscribe and receives it
Channel stream ctx = the channel's ch: reference, with seq Sessions that pass §9.3 (H1 to H8) for the channel as an active channel member. Events outside a recipient's visibility ranges carry a reduced payload (§7.2). A member moved to needs_encryption receives channel.security_changed at u + 1 (or, for a downgrade, its own member.updated) as the last event; the server then ends its subscription with session.subscription_ended (security.account_required, 03 §5.6), and a later subscription is refused the same way. It reads pre-upgrade history over HTTP (H6 exceptions).
Community stream ctx: "community", with seq Community members (active or needs_encryption). Anyone else is refused with the problem the equivalent HTTP read would return (member.not_member, member.pending or moderation.banned). Requesters and non-members learn what they need from their account stream and from GET /v1/community.
Account stream ctx: "me", with seq One account, at the server that sends it. For a remote account it holds only that account's events at that server (03 §7.1).

Viewer-dependent payloads on the community stream. Every subscriber receives every seq (03 §7.2 D4). For a channel.* event about a channel the recipient can't view, the server delivers the reduced payload { "withheld": true }, which reveals nothing about the channel; the client only advances its position. community.layout_changed lists only the channels the recipient can view. A Channel object in an event carries the recipient's own membership, or omits it (§6.1).

Visibility changes for one account. When a role or overwrite change (10) makes a channel visible to an account, the server also sends channel.created on that account's stream; when it hides one, channel.deleted with reason: "lost_access". Such a lost_access event doesn't set deletedSeenAt on pins.

Clients ignore unknown event types (00 §7.8), and drop an event whose object version is lower than one they already hold.

Rationale: community-wide changes such as a new channel or a settings change are sequenced once on the community stream, which 03 defines for this purpose, instead of being copied into every member's account stream. Events that concern only a few accounts (a member's own record, join requests, invites) go to those accounts' streams, so the community stream doesn't carry a withheld payload for every member.

14.2 Catalogue

The columns follow 03 §11.2. Every type below is carried on the client WebSocket only (there is no S2S form) and is durable. "Timeline item" is 03 §11.2's term: a durable event that appears as an entry in a channel's timeline.

Type Transport Direction Class Stream(s) Timeline item Recipients Payload d
community.updated Client WebSocket Server to client Durable Community No Community stream subscribers { "community": Community }. Also emitted for icon changes (§3.4).
community.security_changed Client WebSocket Server to client Durable Community No Community stream subscribers { "domain", "secure": true, "securedAt", "version", "cause": "server_upgrade", "by": addr }
community.layout_changed Client WebSocket Server to client Durable Community No Community stream subscribers (viewer-dependent) { "categories": [Category], "channels": [ { "ctx", "categoryId", "position" } ] }, restricted to channels the recipient can view. Emitted by PATCH /v1/community/layout and by every category create, change and delete (§6.5).
community.list_changed Client WebSocket Server to client Durable Account (home server) No The account { "op": "upsert" | "remove", "domain", "entry": CommunityListEntry or null }
member.joined Client WebSocket Server to client Durable Channel (scope channel); community (scope community) Yes, on a channel stream Subscribers of that stream { "scope": "channel" | "community", "member": ChannelMember or CommunityMember }
member.left Client WebSocket Server to client Durable As member.joined Yes, on a channel stream As member.joined { "scope", "addr", "reason" }
member.removed Client WebSocket Server to client Durable Channel (scope channel); community (scope community); and the removed account's account stream Yes, on a channel stream Subscribers, plus the removed account (as the last event of its channel subscriptions) { "scope", "addr", "reason": "kicked" | "banned" | "lost_access" | "account_deleted" | "community_left" }
member.updated Client WebSocket Server to client Durable Channel (scope channel); community (scope community); and the member's own account stream No Subscribers; the member itself { "scope", "member": ChannelMember or CommunityMember }. On the member's own account stream the record includes accountSecurity; elsewhere it doesn't.
member.requested Client WebSocket Server to client Durable Account No Holders of manage_invites (for a bot, holders of both manage_invites and manage_bots) { "member": CommunityMember } (state pending)
member.rejected Client WebSocket Server to client Durable Account No The requester { "reason": "rejected" | "expired" | "closed" }
channel.created Client WebSocket Server to client Durable Community; and account (visibility changes, §14.1) No Community stream subscribers (viewer-dependent) { "channel": Channel }
channel.updated Client WebSocket Server to client Durable Community No Community stream subscribers (viewer-dependent) { "channel": Channel, "changed": [string], "previousAddress": string or absent }
channel.security_changed Client WebSocket Server to client Durable Channel (at seq u + 1) Yes (marker K1) Channel stream subscribers, including members just moved to needs_encryption { "ctx", "security": "secure", "securedAt", "upgradeSeq", "preUpgradeHistory", "cause": "channel_upgrade" | "server_upgrade", "by": addr or null, "version" }
channel.deleted Client WebSocket Server to client Durable Community; and account (visibility changes, §14.1) No Community stream subscribers (viewer-dependent) { "ctx", "address", "security", "securedAt", "upgradeSeq", "reason": "deleted" | "lost_access" }
invite.created Client WebSocket Server to client Durable Account No The creator and holders of manage_invites { "invite": Invite }
invite.revoked Client WebSocket Server to client Durable Account No The creator and holders of manage_invites { "id", "code", "by": addr }

Notes:

  • The cause and reason enums: clients treat an unknown value as no reason.
  • member.removed never says who removed someone; the moderator is recorded in 10's audit log.
  • channel.security_changed is the only event at seq u + 1; clients place K1 there. Community-stream subscribers learn of the same upgrade from channel.updated with the new Channel.
  • Clients render system lines for channel-scope membership items sparingly: W6 when a bot joins a secure channel (member.joined, 20), and a removal line for member.removed with kicked or banned (10). Other membership items MAY be shown compactly or not at all; channel joins are silent (§4.5).
  • In a secure channel each client shows K6 at its own account's join point (11's withheldBeforeSeq), and renders 14's history.shared as K8 for members other than the recipient (20 §5). Neither is a prompt.

14.3 Examples

{
  "v": 1,
  "t": "channel.security_changed",
  "id": "01938f55-0c1d-7e2f-8a3b-4c5d6e7f8091",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "seq": 4183,
  "ts": "2026-12-04T19:02:11.250Z",
  "d": {
    "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
    "security": "secure",
    "securedAt": "2026-12-04T19:02:11.250Z",
    "upgradeSeq": 4182,
    "preUpgradeHistory": "kept",
    "cause": "channel_upgrade",
    "by": "saxonjones@sloppyvoice.com",
    "version": 19
  }
}
{
  "v": 1,
  "t": "member.updated",
  "id": "01938f55-0c1d-7e2f-8a3b-4c5d6e7f8092",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "seq": 4185,
  "ts": "2026-12-04T19:02:11.251Z",
  "d": {
    "scope": "channel",
    "member": {
      "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
      "addr": "bob@a.com", "name": "Bob", "kind": "user", "inc": "wMHCw8TFxsfIycrLzM3Ozw",
      "state": "needs_encryption", "reason": "channel_upgraded",
      "joinedAt": "2026-12-04T18:21:40.002Z", "joinSeq": 4001, "visibleFromSeq": null,
      "version": 3, "updatedAt": "2026-12-04T19:02:11.251Z"
    }
  }
}
{
  "v": 1,
  "t": "community.list_changed",
  "id": "01938f56-1111-7222-8333-444455556666",
  "ctx": "me",
  "seq": 78,
  "ts": "2026-12-04T18:20:03.000Z",
  "d": {
    "op": "upsert",
    "domain": "sloppyvoice.com",
    "entry": {
      "domain": "sloppyvoice.com", "name": "Sloppy Voice", "iconUrl": null, "secure": false,
      "state": "active", "position": 3, "local": false,
      "addedAt": "2026-12-04T18:20:03.000Z", "updatedAt": "2026-12-04T18:20:03.000Z"
    }
  }
}

14.4 Audit entries

In the same transaction as the change, the server writes these entries to 10's audit log (10 §11.3): community_updated for every successful PATCH /v1/community other than the server upgrade, for icon PUT and DELETE (§3.4, §3.6), and for category and layout changes (§6.5); community_secured at step T3 of §11.4; channel_created, channel_updated and channel_deleted for the create, update and delete of §6.4; channel_secured at step S2 of §10.4, and for each channel at step T2 of §11.4; channel_history_deleted at step S6 of §10.4, or at the server upgrade, when deletePreUpgradeHistory is true; invite_revoked when DELETE /v1/invites/{code} is made by someone other than the invite's creator (§8.3); bot_admitted at step C10 of §9.2 and when a bot's pending record is approved (§4.4); history_shared when the server accepts a HistoryShare in a channel (§7.5). Joining, leaving and creating one's own invites are not logged (10 §11.3).

15. Error codes

Every code uses the error object of 00 §7.9. "Retry" is the retryable member.

15.1 community.*

Code HTTP userAction Retry Meaning
community.closed 403 none No The community accepts no new members.
community.invite_required 403 none No The join policy is invite and no valid invite was given.
community.rules_acceptance_required 403 none No The rules must be accepted; data: rulesVersion, rulesText.
community.version_conflict 409 none No ifVersion didn't match; data.current holds the Community. The client refreshes from data.current and re-applies the edit; resending the same request fails again.
community.icon_invalid 400 none No The icon isn't an accepted image, isn't square, or is too big; data.reason.
community.local_admin_required 403 contact_admin No Only a local account can upgrade the server.
community.confirmation_mismatch 400 none No confirmDomain didn't equal the canonical domain.
community.upgrade_plan_stale 409 none No The people who can't follow changed; data.plan holds the new ServerUpgradePlan.
community.upgrade_in_progress 409 wait Yes Another upgrade is being applied.
community.list_full 409 none No The community list has maxCommunitiesPerAccount entries.

15.2 member.*

Code HTTP userAction Retry Meaning
member.not_member 403 none No The account isn't a community member; data: joinPolicy, requireRulesAcceptance. The client joins first (§9.5).
member.pending 403 wait Yes The join request awaits approval.
member.not_found 404 none No No such member record visible to the caller.
member.not_pending 409 none No Approve or reject on a record that isn't pending.

15.3 channel.*

Code HTTP userAction Retry Meaning
channel.deleted 410 none No The channel was deleted; data: ctx, address, security, securedAt, upgradeSeq.
channel.join_required 403 none No The action needs channel membership; the client joins silently and retries.
channel.kind_immutable 409 none No kind can't change.
channel.limit_reached 409 contact_admin No maxChannels or maxCategories reached.
channel.category_not_found 404 none No Unknown categoryId.
channel.version_conflict 409 none No ifVersion didn't match; data.current holds the Channel. The client refreshes from data.current and re-applies the edit.
channel.already_secure 409 none No Upgrade requested on a secure channel; data: channel, by, groupId, generation, ekid (§10.4).
channel.upgrade_plan_stale 409 none No The people who can't follow changed; data.plan holds the new UpgradePlan.
channel.upgrade_in_progress 409 wait Yes Another upgrade of this channel or the server is being applied.
channel.bootstrap_required 400 none No The confirmation lacked bootstrap. Failures of the GroupBootstrap itself are 13's mls.* codes.
channel.plaintext_rejected 409 none No Plaintext (insecure-carrier) content was posted to a secure channel (§10.4 A1), or to any channel of this server while a server upgrade is being applied (§11.4 T1). data: security ("secure"), upgradeSeq (integer, or null for a channel created secure or while the server upgrade is still being applied). The client never resends the entry as plaintext; it re-seals it with the same mid when it can (§10.5, 11 §4.7).

15.4 invite.*

Code HTTP userAction Retry Meaning
invite.not_found 404 none No Unknown or malformed code. Counts as a failed code attempt (§8.5).
invite.expired 410 none No Past expiresAt.
invite.used_up 410 none No uses reached maxUses.
invite.revoked 410 none No Revoked.
invite.not_allowed 403 none No Invites can't be created while joinPolicy is closed.
invite.limit_reached 409 contact_admin No maxActiveInvites reached.

15.5 Codes from other areas used here

security.account_required, security.upgrade_required, security.device_not_enrolled, security.server_requires_secure, security.downgrade_forbidden (00 §4.11); core.* (03), including core.not_found for a channel that doesn't exist or that the caller can't view; core.forbidden with data.permission (03, 10 §6.3); moderation.banned (10); address.* (01); auth.invite_invalid and auth.invite_required (05); dm.closed and dm.encryption_pending (12); mls.credential_rejected, mls.group_id_mismatch, mls.policy_violation and the other GroupBootstrap codes of 13 §7.4; federation codes (06), including federation.home_unreachable. When this document's endpoints return a security.* code, data carries scope (community or channel) and ctx or domain, as in 00 §7.9's example.

{
  "type": "urn:sloppyv:error:channel.already_secure",
  "code": "channel.already_secure",
  "title": "This channel is already end-to-end encrypted",
  "status": 409,
  "detail": "Another admin turned on encryption for this channel.",
  "retryable": false,
  "retryAfterMs": null,
  "userAction": "none",
  "data": {
    "channel": { "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "security": "secure", "upgradeSeq": 4182, "version": 19 },
    "by": "saxonjones@sloppyvoice.com",
    "groupId": "sv1:sloppyvoice.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
    "generation": 1,
    "ekid": "Xc0mY2n4QbE"
  }
}

(The channel member is abbreviated here; the server returns the full Channel.)

16. Limits

Limits advertised in ServerMetadata limits (02, 00 §7.12), owned here:

Limit Default Floor Meaning
maxChannels 500 100 Channels in the community.
maxCategories 50 20 Categories.
maxActiveInvites 1,000 100 Invites in state active.
maxCommunityIconBytes 1 MiB 256 KiB Icon upload size.
maxCommunitiesPerAccount 500 100 Entries in one account's community list (home server).

Fixed values:

Item Value
Community name 1–64 scalar values after trimming white space (as ServerMetadata name, 02)
Category name 1–100 scalar values
Community description ≤ 1,000 scalar values
rulesText ≤ 8,000 scalar values
Channel topic ≤ 1,024 scalar values
retentionDays 1–36,500 or null
Icon size 16–1,024 px, square
Invite maxAgeMs 300,000–31,536,000,000, or null (needs manage_invites); default 604,800,000
Invite maxUses 1–10,000 or null
Invite purge after it stops being active 30 days
Failed invite-code attempts ≤ 30 per 10 min per IP and per session
Pending join request lifetime 30 days
left record retention ≥ 0, MAY delete after 90 days
Upgrade plan names listed 100
Membership check batch 1–20 addresses; ≥ 60 requests/min per peer served
Membership check cache (ceiling, MUST) 1 h positive, 10 min negative
IdentityState freshness 300 s, only where 06 and 13 require it (§9.1); not a per-request rule
Join intent lifetime (client) 24 h
Deleted-content purge SHOULD within 30 days
Channel tombstone (410) MUST, ≥ 400 days
Local-part quarantine after channel deletion As 01 §5.7 (365 days against users and bots; reusable as a channel at once)
Reservation of a renamed channel's old address 90 days (§6.3)
T6 horizon for previous addresses (client) 90 days
Channel pin deletion MAY after 400 days unseen; group DM pin MAY after 400 days unseen; community pin never
Server upgrade response completes before answering; clients allow 120 s
Community memberCount staleness ≤ 5 min

17. Test vectors

17.1 Invite codes

Encoding of a 60-bit random value (written as a hexadecimal integer) into a code (§8.2):

60-bit value Code
0x000000000000000 000000000000
0xFFFFFFFFFFFFFFF ZZZZZZZZZZZZ
0x0123456789ABCDE 04HMASW9NF6Y
0x3A5F0C2E91B7D48 79FGRBMHPZA8

Input normalization:

Input (JSON string) Result
"7KQ2M9XP4HRT" 7KQ2M9XP4HRT
" 7kq2-m9xp-4hrt " 7KQ2M9XP4HRT
"7KQ2‐M9XP‐4HRT" (U+2010 hyphens) 7KQ2M9XP4HRT
"7KQ2–M9XP–4HRT" (U+2013 en dashes) 7KQ2M9XP4HRT
"7KQ2−M9XP−4HRT" (U+2212 minus signs) 7KQ2M9XP4HRT
"7KQ2\u00A0M9XP\u00A04HRT" (no-break spaces) 7KQ2M9XP4HRT
"7KQ2M9XP4HRT" (full-width) 7KQ2M9XP4HRT
"7kq2m9xp4hro" 7KQ2M9XP4HR0
"7KQ2M9XP4HRl" 7KQ2M9XP4HR1
"7KQ2M9XP4HRU" invalid (U isn't in the alphabet) → invite.not_found
"7KQ2M9XP4HR" invalid (11 characters) → invite.not_found
"7KQ2M9XP4HRT0" invalid (13 characters) → invite.not_found

17.2 Plan version

Hash input shown in hexadecimal; output in hexadecimal (first 16 bytes of SHA-256) and base64url.

Vector 1. Channel ch:01938a11-2b3c-7d4e-8f90-112233445566; can't follow: dave@sloppyvoice.com, bob@a.com, carol@c.com (sorted: bob, carol, dave).

input  737631207570677261646520706c616e0063683a30313933386131312d326233632d37
       6434652d386639302d31313232333334343535363600626f6240612e636f6d0a636172
       6f6c40632e636f6d0a6461766540736c6f707079766f6963652e636f6d0a
hash16 182032be8538d73585b3a293b3bea379
planVersion  GCAyvoU41zWFs6KTs76jeQ

Vector 2. Same channel; nobody can't follow.

input  737631207570677261646520706c616e0063683a30313933386131312d326233632d37
       6434652d386639302d31313232333334343535363600
hash16 a1b6fd94c1c9cd822e78707b757fc541
planVersion  obb9lMHJzYIueHB7dX_FQQ

Vector 3. Server upgrade of sloppyvoice.com; can't follow: saxonjones@sloppyvoice.com, bob@a.com.

input  737631207570677261646520706c616e00736c6f707079766f6963652e636f6d00626f
       6240612e636f6d0a7361786f6e6a6f6e657340736c6f707079766f6963652e636f6d0a
hash16 b33eebfd0ae9338d4fdaa219b69dcfe3
planVersion  sz7r_QrpM41P2qIZtp3P4w

Vector 4. Channel as in vector 1; can't follow: zoë@b.com (UTF-8 7a 6f c3 ab), bob@a.com. Byte-wise sorting puts bob@a.com first.

input  737631207570677261646520706c616e0063683a30313933386131312d326233632d37
       6434652d386639302d31313232333334343535363600626f6240612e636f6d0a7a6fc3
       ab40622e636f6d0a
hash16 703db98e0dc1f857bbf111183478d145
planVersion  cD25jg3B-Fe78REYNHjRRQ

(The input lines are wrapped for display; the input is one byte string.)

17.3 Visibility ranges

Case Events Resulting ranges
A Insecure channel. Bob (insecure) joins at 4001. Upgrade with u = 4182. Bob turns on encryption and is reactivated at 5000. After join [[1, null]]; after upgrade [[1, 4183]]; after reactivation [[1, 4183], [5000, null]], visibleFromSeq 5000 (§7.1)
B Secure channel. Carol joins at 120, leaves at 300, rejoins at 900. [[120, null]] → [[120, 300]] (served nothing while left) → [[900, null]] (her earlier membership isn't served again; her devices keep what they stored)
C Insecure channel. Dave (insecure) joins at 50. Upgrade with u = 100. [[1, null]] → [[1, 101]]
D Secure channel. A bot joins at 700. [[700, null]], as for a person (§7.4)
E Insecure channel. Erin joins at 120, leaves at 300, rejoins at 900. [[1, null]] → [[1, 300]] → [[1, null]]
F Insecure channel; Frank (secure) joins at 10. Upgrade with u = 100. Grace joins at 160. Frank [[1, null]], unchanged by the upgrade (pre-upgrade plaintext under K3); Grace [[160, null]] (no pre-upgrade plaintext; K6 at 160)
G As F; Frank leaves at 150 and rejoins at 200. [[1, null]] → [[1, 150]] → [[200, null]] (a join after the upgrade: no pre-upgrade plaintext)
H Secure channel. Ida joins at 120. At 130 Jo, who holds share_history, shares [60, 110] with her. Ranges [[120, null]]; VisibilityGrant [60, 110]: sealed items 60 to 110 and their attachments are served to Ida; plaintext items and membership events in that interval aren't (§7.2 condition 2)
I Upgraded channel, u = 100. Hal (secure), a member since 10, resets his identity at 150 and stays secure. [[1, null]], unchanged: the membership continues (§4.8). His new devices are served the same items but hold no key for earlier epochs unless an old device brings them back (08 §11.4)

17.4 W9 decisions

# Pins held Observation Result
1 Channel pin, upgradeSeq 4182, version 19 channel.updated with a Channel at version 20 and security: "insecure" W9 (T1)
2 Channel pin, upgradeSeq 4182 Plaintext message at seq 4100 No W9; shown under K3
3 Channel pin, upgradeSeq 4182 Plaintext message at seq 4190 W9 (T2); message never shown
4 Channel pin, upgradeSeq 4182 Channel object with upgradeSeq 4300 W9 (T3)
5 Community pin Fresh Community object with secure: false W9 for the community and all its channels (T4)
6 Community pin, no channel pin Fresh channel list entry with security: "insecure" W9 for that channel and the community (T5)
7 Channel pin, deletedSeenAt null The pinned address now resolves to a different ctx with security: "insecure"; GET /v1/channels/{P.ctx} answers 200 at the same address W9 for the address (T6)
8 Channel pin, deletedSeenAt set As 7, but the pinned ctx answers 410 No W9; a new conversation
9 Channel pin Channel object with security: "secure2" (unknown) No W9; channel unavailable, "update the app"
10 Channel pin The person's own account was downgraded; the channel is still secure No W9; needs_encryption and G1
11 Channel pin created from an invite preview, upgradeSeq absent Plaintext message at seq 10 No decision yet: the client fetches the Channel object first (§13.3 rule 5), then applies T2
12 Community pin, securedAt 2026-12-04T19:00:00.000Z Cached ServerMetadata (fetched an hour earlier) says secure: false No W9 yet: the client refetches /meta with Cache-Control: no-cache; the fresh copy says secure: true, so no W9
13 Channel pin, upgradeSeq 4182, version 19 Resume replays a channel.updated on the community stream carrying a Channel at version 17 with security: "insecure" No W9: historical statement
14 Channel pin for lobby@b.com, deletedSeenAt null The channel was renamed to hall@b.com 10 days ago (client missed it); lobby@b.com now resolves to an insecure channel with another ctx; GET /v1/channels/{P.ctx} answers 200 with address: "hall@b.com" and reservedAddresses listing lobby@b.com W9 for lobby@b.com (T6, reservation broken); P.address becomes hall@b.com
15 As 14, but the rename was 200 days ago and reservedAddresses is empty; the client has no previousAddresses entry with a replacedAt As 14 No W9; P.address becomes hall@b.com, and lobby@b.com is a new conversation
16 Community pin, securedAt 2026-12-04T19:00:00.000Z Channel object with upgradeSeq 50 and securedAt 2026-12-20T08:00:00.000Z W9 (T5): the channel was insecure after the server became secure
17 Community pin, securedAt 2026-12-04T19:00:00.000Z Channel object with upgradeSeq: null and securedAt 2026-12-20T08:00:00.000Z No W9: a channel created secure after the upgrade
18 Channel pin, upgradeSeq 4182 An insecure delete at seq 4300 by a needs_encryption member whose target is at seq 4100 W9 (T2): an insecure entry after upgradeSeq, which an honest server refuses (11 §4.7)

17.5 Gate order

# Situation Request Result
1 Insecure account, not a member; secure channel for which previewVisible is false POST /v1/channels/{id}/join 404 core.not_found (H4 before H6)
2 Insecure account, active member; secure channel it can view POST /v1/channels/{id}/join 403 security.account_required (H6)
3 Secure account, unenrolled device, active member; secure channel POST /v1/channels/{id}/join 403 security.device_not_enrolled (H7)
4 Secure account, unenrolled device; secure community, open POST /v1/community/join 200 (C4 doesn't check the device)
5 Insecure account; secure community; expired invite POST /v1/community/join 403 security.account_required (C4 runs before the invite matters)
6 Any account; insecure community, open; expired invite POST /v1/community/join 200 with inviteIgnored: "invite.expired"
7 Local account in upgrade_required POST /v1/channels/{id}/join 403 security.upgrade_required (H2)
8 Banned account with a valid invite POST /v1/community/join 403 moderation.banned (C3)
9 Not a member; insecure community, open; insecure channel POST /v1/channels/{id}/join 403 member.not_member; the client joins the community and retries, silently
10 Insecure community, invite; expired invite POST /v1/community/join 410 invite.expired (C8)
11 Insecure community, invite; unknown code POST /v1/community/join 404 invite.not_found (C8); counts as a failed attempt
12 Insecure community, invite; no code POST /v1/community/join 403 community.invite_required (C8)
13 Insecure community, request; expired invite POST /v1/community/join 410 invite.expired (C8); no pending record
14 Insecure community, request; unknown code POST /v1/community/join 404 invite.not_found (C8)
15 Insecure community, request; no code POST /v1/community/join 202 with a pending record (C8)
16 Insecure community, request; account already pending; valid invite POST /v1/community/join 200, record active, one use consumed
17 Bot account; insecure community, open; no invite POST /v1/community/join 202 with a pending record that needs approval by a holder of manage_bots and manage_invites (C7)
18 Bot account; insecure community, open; valid invite created by a manage_bots holder POST /v1/community/join 200, active; audit bot_admitted
19 Insecure account, needs_encryption channel member of a channel upgraded at u = 4182 GET /v1/contexts/{ctx}/messages?before=4183 (11) 200 with plaintext items only (H6 exception (i))
20 As 19 POST /v1/contexts/{ctx}/messages with content kind message 403 security.account_required (H6)
21 As 19 POST /v1/channels/{id}/join 403 security.account_required (H6: a join is never an exception)
22 Already active member, requireRulesAcceptance, rulesVersion 3, rulesAcceptedVersion 2 POST /v1/community/join with acceptRules: 3 200; rulesAcceptedVersion becomes 3 (C6)

18. Security considerations

  1. The hosting server decides membership. In secure channels the server is the Authentication Service (D-035). It can admit an account it controls, which then appears in the member list and reads what is sent from its admission on. It gets nothing earlier unless a member deliberately shares it (D-007, §7.5). Member lists are the only defence; the lock text says the server decides who is a member (00 §5.5).
  2. Downgrade detection is trust on first sight. Pins (§13) detect a server that presents a context the client has seen as secure as insecure. They can't help a client that never saw the context secure, and they can't stop a server from deleting a secure channel and creating an insecure one with a similar name. They also rely on the server's own deletion signal (the 410 tombstone) for address reuse (§13.5), and a 404 for the pinned channel is read as lost access: a malicious server can claim either. In that case the new channel has no history, no lock and, for secure accounts, the open-lock indicator, so the person can see that it isn't encrypted. Renaming a secure channel and reusing its old address within 90 days is detected (T6), because an honest server never does it (§6.3). Stale caches and replayed events never raise W9 (§13.4), so a false hard error, which would teach people to leave working channels, can't come from ordinary caching.
  3. The upgrade boundary. upgradeSeq is immutable once pinned (T3) and plaintext after it raises W9 (T2), so a server can't relabel later plaintext as pre-upgrade history. The sequencer makes the switch atomic, and clients never resend a rejected plaintext message as plaintext, so no message intended for the insecure channel leaks into, or is mislabelled within, the secure era.
  4. Pre-upgrade plaintext stays plaintext. The server held it in plaintext and may have copies in backups. "Delete messages sent before encryption" depends on the server's honesty; W5 copy (20) must not promise erasure from backups. Members who can't follow keep read access to that history by design (D-057, HP-12). Accounts that join after the upgrade don't get it (D-007).
  5. Server upgrade is irreversible and drastic. A compromised server-admin account could force every insecure local account into upgrade_required. Requiring 10's admin role (not just manage_community), a local, secure account on an enrolled device, and the confirmDomain echo raises the bar; the action is recorded in the audit log (10). The same irreversibility prevents an attacker from downgrading.
  6. Insecure admins. An insecure account with manage_channels can create secure channels and run dry runs, but can't read secure content or perform the confirmation. Moderation by insecure moderators of secure channels is allowed (D-023) and reveals no content.
  7. Invites are bearer tokens. Anyone holding a link can join while it is active. Codes have 60 random bits and failed attempts are limited (§8.5), so guessing is infeasible. The preview reveals public community data, one channel's name and security, and the creator's address; creators should know their address is shown.
  8. Membership check and the community list. The membership check (§5.2) answers only for servers that have a member in the community, and only what that member could see. Its cache ceilings bound how long a kicked or banned member keeps auto-accept status elsewhere (1 h). The home server learns the full list of communities its user belongs to; this is accepted so that every device shows the same list and the auto-accept rule works. People who don't want their home server to know a membership can use a separate account.
  9. Metadata. Community and channel names, topics, rules, settings, member lists, each member's security state and the join and leave history are visible to the server, and most of it to every member, in every mode (00 §5.4). accountSecurity is shown only to the member itself and to people who manage channels or the community, and never travels in events; clients MUST NOT display another member's accountSecurity in channel or community UI, because a per-person "not encrypted" badge would be a warning outside the closed catalogue (D-055). W5's upgrade plan is the only place it is shown. A needs_encryption state in a member list still reveals that someone couldn't follow an upgrade.
  10. Visibility is partly a server promise. In an insecure channel every visibility rule is enforced only by the server. In a secure channel a newcomer's devices hold no key from before its join and nothing hands one over (D-007), so earlier content stays unreadable even if a server served its ciphertext; edits and reactions made after the join on older messages are withheld by the server only (11 §20, 22 RR-26).
  11. Join-gate ordering avoids leaks. Visibility checks come before security checks (§9.3), so a person can't probe whether a hidden channel exists or is secure.
  12. Rules acceptance is a record of consent, not a security control.
  13. Spam through join requests is bounded by per-session rate limits (03), the 30-day expiry, and the closed policy. Document 10 owns further anti-spam measures.
  14. Bots can't walk in. Even an open community admits a bot only with a manage_bots holder's approval (§4.4), so a bot that would read everything in secure channels (W6) is always someone's deliberate choice.
  15. Community names are free text. Anyone can call a server "Sloppy Voice Official". Showing the domain wherever someone decides to join (§3.7) is the defence; the name is never shown alone.
  16. Home outages don't look like device problems. Enrolment is fixed per session (§9.1), so an unreachable home server produces a wait (federation.home_unreachable), never a false G2 that would push people into pairing.
  17. Manual history sharing. A holder of share_history can give one current member the earlier messages it can read (§7.5, D-007). The permission isn't in everyone by default, every member sees K8, the audit log records it (10), and a share needs a deliberate action that nothing prompts. The hosting server only serves ciphertext under a VisibilityGrant; it never holds a key (22 RR-55).
  18. Reused addresses. Membership records, channel records with their visibility ranges, and the roles held through them belong to one account incarnation (inc, D-086). A later account at a deleted address starts with none of them, even at a server that missed account.deleted, because the first HomeAssertion or IdentityState with the new inc ends the earlier account's records (06 §11.6). Bans stay keyed by address (10 §9.2).

19. Open questions

Q1. Pre-upgrade history versus SM-4. SM-4 says only a secure account on an enrolled device can read a secure context, but HP-12 and D-057 let needs_encryption members keep reading pre-upgrade history. This document follows HP-12: messages with seq ≤ upgradeSeq are plaintext history outside the secure era, and the exceptions of §9.3 step H6 never reach a SealedMessage. Resolved: 00 SM-4 now states this exception (HP-12), and 10 §6.1 computes permissions without regard to needs_encryption, so the security door H6 alone limits such members.

Q2. Default join policy of a new server. This document makes a new community open (§3.1), which matches the usability goal but exposes new servers to drive-by joins. Recommendation: keep open as the default; the admin can switch to invite or request in one step.

Q3. Rules re-acceptance. When the rules change, existing members aren't asked to accept them again (§3.6); a member can still record acceptance through the join endpoint (§4.3). Recommendation: keep this for v1; asking every member again is friction for little benefit, and moderators can act on the new rules anyway.

Q4. Retiring a community pin. A community pin is permanent (§13.3 rule 4). If a domain changes hands (for example it expires and is re-registered) and the new owner runs an insecure server, every former visitor gets W9 there for ever. W9 for non-members appears only when they try to open or join (§13.6), and "Leave" hides the community, which limits the harm. Recommendation: allow a client to retire a community pin, after showing W9 once, when the server's key set has changed without keyChain continuity (02) and the person chooses to treat it as a different server; decide the exact rule together with 02 and 20.

20. References

20.1 Normative

  • RFC 2119, RFC 8174 — requirement key words
  • RFC 3339 — timestamps; RFC 3986 — URIs and percent-encoding; RFC 4648 — base64url
  • RFC 5234 — ABNF; RFC 8259 — JSON; RFC 7493 — I-JSON
  • RFC 9457 — problem details; RFC 9562 — UUIDv7
  • RFC 9420 — The Messaging Layer Security (MLS) protocol
  • FIPS 180-4 — SHA-256
  • Unicode Standard Annex #15 — normalization forms (NFC, NFKC)
  • Unicode Standard Annex #44 — character properties (White_Space, General_Category Pd)
  • spec/00-overview.md — architecture, security model (§4), conventions (§7)
  • spec/01-addressing.md — addresses, canonicalize(), address lookup, quarantine, sloppyv URIs, share links
  • spec/02-discovery.md — ServerMetadata (secure, name, limits, links.join), server keys
  • spec/03-transport.md — envelope, streams, resume, errors, pagination, idempotency, rate limits
  • spec/04-crypto-conventions.md — label registry
  • spec/05-accounts-auth.md — accounts, account states, sessions, bots, deletion
  • spec/06-federation.md — HomeAssertion, remote sessions, S2S tokens, blocks
  • spec/07-identity.md — IdentityState, identity.changed, device.revoked, Authentication Service checks
  • spec/08-device-setup-recovery.md — account upgrade, pairing, recovery, AccountVault and its sec_pin record
  • spec/10-roles-moderation.md — permissions and the missing-permission form of §6.3, the admin role, bot admission, kicks, bans, audit log
  • spec/11-messaging-attachments.md — content carriers, timelines, retention, webhooks
  • spec/12-direct-messages.md — DM hosting, auto-accept, DM effects of a server upgrade
  • spec/13-mls-profile.md — GroupBootstrap, group generations and states, external commits, removals, group IDs
  • spec/14-secure-content-history.md — visibleFromSeq, HistoryShare and VisibilityGrant, key archive rules
  • spec/15-calls-control.md — call end reasons, planned migrations, diagnostics
  • spec/20-client-requirements.md — copy for W1, W5, W6, W9, G1, G2, K1, K3, K4, K5, K6, K7, K8 and the share action

20.2 Informative

  • RFC 9750 — MLS architecture
  • Douglas Crockford, "Base32" encoding — the invite-code alphabet
  • spec/DECISIONS.md — decision log
  • spec/22-security-considerations.md — whole-system threat model