Every Sloppy Voice server is one community. This page covers what a client, bot or server needs to work with it: the Community object, membership and its states, the join gates, channels and their layout, invites, the account's community list, and the one-way upgrade of a channel or a whole server to secure. The authoritative rules are in document 09; roles and permissions are in Roles and moderation, and messages and timelines in Messaging.

One community per server

A server is exactly one community, and the community has no ID of its own: it is named by the server's canonical domain (09 §3.1). A deployment that wants two communities runs two servers. The community exists from the server's first start and 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;
  • joinPolicy: "open";
  • localAccountsAreMembers: true.

A server SHOULD also create one text channel and one voice channel, so that new members have somewhere to go.

The Community object and ServerMetadata (Discovery) describe the same thing. A server MUST keep ServerMetadata secure, securedAt and name equal to the Community's and change them in the same step (09 §3.1), because clients read either one to decide whether the server is secure.

The Community object

GET /v1/community returns the Community to anyone, without authentication. It is rate-limited per IP and served with CORS.

{
  "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"
}

The members that need care (09 §3.2):

Member What to know
domain The canonical domain, lowercase A-label. Immutable.
name 1 to 64 scalar values after trimming, single line. Free text, not an address.
secure, securedAt secure becomes true at the server upgrade and never returns to false. securedAt is immutable once set.
joinPolicy open, invite, request or closed. Treat an unknown value as invite.
rulesText, rulesVersion Up to 8,000 scalar values of plain text. rulesVersion starts at 0 and increases by 1 on every change to rulesText.
defaultChannel The ch: reference a client opens after joining when no invite or link names a channel. It is always a channel with previewVisible true, or null.
memberCount Members in state active or needs_encryption. MAY be approximate, but is updated at least every 5 minutes.
version Increases by 1 on every change. Use it for ifVersion and to drop stale events.

Everything in the Community object is public and stays cleartext in a secure community (00 §5.4).

Warning

Any server can call itself anything. 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 (09 §3.7). The domain is the part a person can trust; the name is decoration.

Changing settings

PATCH /v1/community needs manage_community and accepts name, description, joinPolicy, requireRulesAcceptance, rulesText, localAccountsAreMembers, defaultChannel and ifVersion (09 §3.6). The same endpoint carries the server upgrade (secure, dryRun, planVersion, confirmDomain, deletePreUpgradeHistory), which needs the admin role instead and is covered below. A request that combines secure with any setting other than ifVersion fails with core.invalid_request.

PATCH {base}/v1/community

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

The PATCH rules are the same for every object on this page (09 §2):

  • Name only the members you change. null resets a nullable setting.
  • Unknown members are ignored, but a body made only of unknown members fails with core.invalid_request.
  • If ifVersion doesn't equal the current version, the request fails with 409 community.version_conflict (or channel.version_conflict for a channel), and data.current holds the current object. Re-apply the edit on top of data.current; resending the same request fails again.
  • Addresses are canonical in every request body, response and event. A non-canonical address in a body fails with 400 address.non_canonical and is never rewritten; in a path, the server rewrites an alias of its own domains and fails any other non-canonical address with 400 address.non_canonical.

The response is the updated Community, and the server emits community.updated. A defaultChannel naming a channel without previewVisible fails with 404 core.not_found. Changing rulesText increases rulesVersion, but existing members aren't asked to accept the new rules in v1.

The icon has its own endpoints (09 §3.4). PUT /v1/community/icon takes the raw image as the body with its Content-Type: a single-frame PNG, JPEG or WebP, square, 16 to 1,024 px per side, and at most maxCommunityIconBytes (default 1 MiB). Anything else fails with 400 community.icon_invalid, and the server SHOULD re-encode an accepted image to strip metadata. PUT returns the updated Community and emits community.updated. DELETE /v1/community/icon sets icon to null and emits community.updated. GET /v1/community/icon serves the image bytes without authentication, with Cache-Control: public, max-age=86400 and CORS. Clients MAY use sha256 as a cache key and MUST check the downloaded image against it.

Join policies

joinPolicy Who can become a member
open (default) Any account that passes the security gates. Invites still work and can point at a channel.
invite Accounts presenting a valid invite.
request Anyone may ask; the request waits in pending until a holder of manage_invites approves it. A valid invite skips the wait. Pending requests expire after 30 days.
closed Nobody new, except local accounts while localAccountsAreMembers is on. Existing invites stop working.

A policy change affects only later join attempts (09 §3.3). Two changes also act on pending requests: changing to closed rejects every pending request, and changing to open approves them all except bots' requests, which still need someone who holds manage_bots and manage_invites.

Access to individual channels is controlled by view_channel (Roles and moderation), not by join policies. There is no per-channel join rule.

Membership

There are two kinds of membership record (09 §4):

Only the states active and needs_encryption count as membership. An account whose community record is pending is a requester, not a member. A channel membership needs a community membership in one of those two states.

Community membership states

State Meaning What the account can do
(none) No record. Read the public Community object; ask to join.
pending A join request awaits approval. Withdraw it with POST /v1/community/leave. Nothing else.
active A full member. Everything its roles allow, subject to the channel gates.
needs_encryption An insecure account in a community that became secure, or a remote member of a secure community who downgraded. Keeps its roles and record. Read the Community object, channel list and member lists; read channel history within its visibility ranges, which in a secure channel means pre-upgrade plaintext only; leave. Its roles still apply to the role, moderation, ban, report and audit-log endpoints of Roles and moderation. Every other content, MLS, history or call request in a secure channel fails with security.account_required.
banned Banned by a moderator. No community or channel request succeeds; each fails with 403 moderation.banned. A community-scope ban leaves DMs hosted here and report filing working.
left Left, kicked, or the account was deleted. Join again under the join policy.

reason explains the state: left, kicked, account_deleted or unbanned for left; server_upgraded or account_downgraded for needs_encryption; banned for banned. The full state machine, with the event each transition emits, is in 09 §4.2.

{
  "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"
}

Three members of the record need attention:

  • inc is the account's incarnation. A record never changes inc, and a different inc at the same address is a different account: the server ends the earlier account's records (left, reason account_deleted) and the new account starts with no roles, channel records or visibility (09 §4.2). Bans are the exception, because they match the address alone.
  • accountSecurity is present only in responses to the member itself and to holders of manage_channels or manage_community. Clients MUST NOT display another member's accountSecurity in channel or community UI (09 §18 item 9), because a per-person "not encrypted" badge would be a warning outside the closed catalogue.
  • via records how the member joined: auto, open, invite or request.

Treat unknown values conservatively: an unknown state as left, an unknown kind as user with no badge, an unknown accountSecurity as insecure (09 §4.1).

Joining the community

POST /v1/community/join works the same for local and remote accounts (09 §4.3). A remote account first gets a remote session at the community's server (Federation); the HomeAssertion in that session tells the server whether the account is secure and whether the device is enrolled.

The body has two optional members:

  • invite: an invite code in any accepted input form (Invites);
  • acceptRules: the rulesVersion the person accepted, required when requireRulesAcceptance is true.
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. The response is 200 when the account ends up active or needs_encryption, and 202 with the same shape when it is pending. In both:

  • openChannel is the invite's channel if it 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 policy didn't need one, otherwise null.

Joining is idempotent. An account that is already a member gets 200 with its existing record, and no invite use is consumed. If that request carries acceptRules equal to the current rulesVersion, the server records it in rulesAcceptedVersion first and emits member.updated on the account's stream; this is how a member accepts the rules after sign-up or after they changed.

Rules acceptance. When requireRulesAcceptance is true, a join without the current rulesVersion in acceptRules fails with 403 community.rules_acceptance_required, whose data carries rulesVersion and rulesText. Show the rules with one button, "Agree and join", and resend with acceptRules. If the rules changed in between, the same error comes back with the new rules.

The community join gates

The server runs a fixed sequence of checks, and the first one that fails decides the error (09 §9.2). The order matters, so a server must not rearrange it:

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, and the account isn't banned. Federation error; 403 moderation.banned
C4 In a secure community, the account is secure. The device's enrolment is not checked. 403 security.account_required, data: { "scope": "community", "domain": … }
C5 Evaluate the invite (valid, a specific failure code, or absent). Nothing fails yet. —
C6 Already a member: record acceptRules if it matches, return 200. —
C7 Bot admission rules. 403 community.closed; 403 community.invite_required
C8 Join policy. The invite's own code; community.invite_required; community.closed
C9 Rules acceptance, including for requests that will become pending. 403 community.rules_acceptance_required
C10 Create or reactivate the record; consume the invite only if the record became active. —

C5 evaluates the invite without failing so that C8 can decide in one place whether a bad code matters. For a user account, the invite and policy combine like this:

joinPolicy Valid invite Invalid invite No invite
open, or a local user while localAccountsAreMembers is on 200 200, code in inviteIgnored 200
invite 200 Its own code 403 community.invite_required
request 200, skipping the wait Its own code 202, pending
closed 403 community.closed 403 community.closed 403 community.closed

An invalid invite's own code is 404 invite.not_found, or 410 invite.expired, invite.used_up or invite.revoked. A requester who is already pending and presents a valid invite becomes active.

An insecure community applies no security gate to joining. A secure account that joins one sees W1 once for that community and is never blocked; an insecure account sees nothing about security (09 §4.3).

Note

C4 runs before C6, so an insecure needs_encryption member of a secure community that calls the join endpoint to record rules acceptance gets security.account_required, not the 200 that the idempotency rule describes. The spec doesn't address this case; see 09 §9.2.

Local accounts and bots

While localAccountsAreMembers is on, the server makes every new local user account an active member with via: "auto", in the same transaction that creates the account (09 §4.4). On a secure server, a new insecure account starts in the account state upgrade_required, so its record is created in needs_encryption (reason server_upgraded) and becomes active when the account turns on encryption. requireRulesAcceptance doesn't block this: the client shows the rules once after sign-up when rulesText isn't empty, and records the person's "OK" with POST /v1/community/join and acceptRules. A local user in left (for any reason other than a ban) may join again under any policy, closed included. Turning the toggle on creates via: "auto" records for every local user that has none (needs_encryption for an insecure account on a secure server) and leaves left and banned records alone; turning it off removes nobody.

Bots, local or remote, are never made members automatically. A bot calls the join endpoint with its own session and becomes active only with the approval of a holder of manage_bots, in one of two ways:

  1. it presents a valid invite whose creator holds manage_bots at the time of use, which is the usual way: an admin creates an invite and gives it to the bot's operator;
  2. a member who holds both manage_bots and manage_invites approves its pending record.

Without either, the bot gets a pending record (202) under open, invite with any valid invite, and request; it gets community.invite_required under invite without a valid invite, and community.closed under closed. Every bot admission is written to the audit log as bot_admitted, with the approving actor. The rule exists so that a bot entering a community, which in secure channels raises W6, is a deliberate act by someone trusted with bots rather than a side effect of creating the bot or of an open policy.

Join requests

Under joinPolicy: request without a valid invite, the server creates a pending record and returns 202 (09 §4.3). Holders of manage_invites (for a bot, holders of both manage_invites and manage_bots) receive member.requested on their account streams.

Either one on a record that isn't pending fails with member.not_pending. A request also ends with member.rejected when it expires after 30 days (expired), or when the policy changes to closed or a server upgrade rejects it (closed). Clients show a pending request as "Waiting for approval" in the community list, with "Cancel request", which calls the leave endpoint.

Leaving

POST /v1/community/leave takes an empty body and returns 204 (09 §4.6). It works even for an account in upgrade_required, unlike every other /v1/community… endpoint. The server:

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

A remote session stays valid afterwards but reaches only public endpoints and DMs. A local account can leave its own server's community without affecting the account. After leaving, the client removes the community from the account's community list.

Kicks, bans and permission changes also end memberships; their effects on both kinds of record are listed in 09 §4.9, and the actions themselves in Roles and moderation.

Listing members

GET /v1/community/members returns a collection page of CommunityMember records ordered by addr byte-wise (09 §4.7). The caller must be a community member, otherwise it gets member.not_member.

Query parameter Meaning
state Comma-separated subset of active, needs_encryption, pending, banned, left. Default active,needs_encryption. pending needs manage_invites, banned needs ban_members, left needs view_audit_log.
q 1 to 64 characters. Matches as a prefix of the local part, or of any word of the display name, after 01's minimalPrepare, so a partial name never fails to parse.
cursor, limit Paging, as in HTTP API.

GET /v1/channels/{id}/members works the same way for ChannelMember records, for anyone who can view the channel; listing left needs manage_channels. The single-record forms, GET /v1/community/members/{addr} and GET /v1/channels/{id}/members/{addr}, return one record or member.not_found.

Channels

A channel is a context with a timeline, identified by a ch:<UUIDv7> reference and an address in the server's shared namespace (09 §6.1).

{
  "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"
}

The members that carry rules:

Member What to know
ctx Assigned by the server at creation. Immutable. {id} in /v1/channels/{id} accepts either the bare UUIDv7 or the full ch: reference, with the colon percent-encoded or not.
kind text or voice. Immutable. Treat an unknown value as text and offer no call.
security insecure or secure; changes only from insecure to secure. Treat an unknown value as "unavailable": don't post, call or show a lock, suggest updating the app, and never raise W9 for it.
securedAt, upgradeSeq, preUpgradeHistory Set at the upgrade and immutable afterwards. upgradeSeq is the highest seq before the upgrade, null for a channel created secure. preUpgradeHistory is kept or deleted.
retentionDays 1 to 36,500, or null to keep content until deleted.
membership The caller's own { "state", "visibleFromSeq" }, or null. In events it is personalized for the recipient or omitted; keep your previous value when it is omitted.
version Increases on every change except to memberCount and membership.

The name, topic, settings and member list of a secure channel are metadata that the server and every viewer can see (09 §6.1).

Kinds

kind is chosen at creation and never changes; a PATCH naming a different kind fails with channel.kind_immutable (09 §6.2). Both kinds have a timeline, so people can post in a voice channel as in a text channel. Only voice channels have a call (Calls). Clients SHOULD present a voice channel with a "Join voice" action and its timeline as the call's chat.

Address and name

The creator gives a display name, and the server derives the local part from it with 01's rules, checks it against the shared namespace, the reserved local parts and the confusable-skeleton rule, and fails with the matching address.* error if it is unavailable (09 §6.3; see Addresses).

A later name change is one of two things:

  • A display change. The derived local part stays the same, so only spacing and capitalization change. An unlinked name fails with 400 address.display_name_mismatch, and a capitalization that collides with another entry with 409 address.too_similar.
  • An address change. The derived local part differs. It passes the same checks as creation and keeps ctx. channel.updated carries previousAddress, and the old local part stays reserved for this channel for 90 days, listed in reservedAddresses. During that time nobody else can take it, so a server can't rename a secure channel and put an insecure one at its old address without clients noticing.

Creating a channel

POST /v1/channels needs manage_channels and SHOULD carry an Idempotency-Key (09 §6.4).

Member Req. Default Notes
name Yes — The local part is derived from it.
kind Yes — text or voice.
security No The server's mode insecure on a secure server fails with 409 security.server_requires_secure.
retentionDays No null
topic No ""
categoryId No null An unknown category fails with channel.category_not_found.
position No Last in its category Later channels in the category move down by one.
POST {base}/v1/channels
Idempotency-Key: 3c2a7b90-create-book-club

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

The response is 201 with the Channel, and the server emits channel.created. More than maxChannels (default 500) fails with channel.limit_reached.

Secure contexts only

A secure channel is created with no MLS group. The group is created by the first enrolled member device that opens the channel (09 §6.4). A creator on an enrolled device SHOULD open the new channel at once, which joins it silently and bootstraps the group with POST /v1/contexts/{ctx}/mls/bootstrap. The create request carries no bootstrap, because the client can't build the group's group_id before the server assigns ctx. An insecure creator can create a secure channel but can't open it. See MLS and sealed messages.

Updating and deleting

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; combining them with a setting fails with core.invalid_request. Changes to securedAt, upgradeSeq, preUpgradeHistory, ctx, address and the counters are ignored. The server emits channel.updated with the names of the changed members in changed.

For PATCH and DELETE, the view check runs before the manage_channels check (09 §6.4). A caller who can't view the channel gets 404 core.not_found, the same as for a channel that doesn't exist, so a caller without manage_channels learns nothing about a channel it can't see.

DELETE /v1/channels/{id} returns 204. The server ends the channel's call, sequences channel.deleted on the community stream, ends every subscription to the channel stream, retires the MLS group and deletes the timeline, attachments and history records, releases the local part, sets defaultChannel to null if it named the channel, and removes the channel from invites that named it, so they open defaultChannel instead. The full order is in 09 §6.4.

The server MUST keep a tombstone for at least 400 days: GET /v1/channels/{id} then answers callers who could view the channel with 410 channel.deleted with ctx, address, security, securedAt and upgradeSeq in data. Clients use the tombstone to tell a recreated channel from a downgrade (09 §13.5).

Listing channels

GET /v1/channels returns every channel the caller can view, with the categories, in one response that is never paginated (09 §6.6):

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

For a caller who isn't a community member yet (a remote session before joining, or a requester), items holds the channels with previewVisible true, so the client can show a preview. Categories without any viewable channel are omitted for callers without manage_channels.

Opening a channel

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 or joins its call (09 §4.5). The join is silent. There is no prompt and no button labelled "Join channel", and activating a link alone never joins anything. The channel list shows every channel the account can view, member or not.

The join takes an empty JSON object, is idempotent, and returns 200 with { "member": ChannelMember, "channel": Channel }. POST /v1/channels/{id}/leave returns 204, also for an account that isn't a member.

Channel membership exists because it decides who is in a secure channel's MLS group, where each member's visible history starts, which channels show unread counts, and who becomes needs_encryption at an upgrade. Keeping it explicit keeps MLS groups to the people who use a channel. Its states are active, needs_encryption and left; the state machine is in 09 §4.5.

Secure contexts only

Joining a secure channel is followed by the device's external commit, or by a bootstrap if the group doesn't exist yet (MLS and sealed messages). While the device is a member but not yet in the group, the client shows a "Joining…" state, with no marker and no prompt. Every transition out of active starts removal of the account's leaves from the group.

The channel access gates

The same sequence of checks guards the channel join and every endpoint that reads or writes a channel's content, MLS state, history or call (09 §9.3):

Step Check Failure
H1 The session is valid. 401 core.unauthenticated
H2 The account isn't in upgrade_required. 403 security.upgrade_required
H3 The channel exists. 404 core.not_found; 410 channel.deleted only to callers who could view it before
H4 The caller can view the channel. 404 core.not_found
H5 The caller is a community member. 403 member.pending, moderation.banned, or member.not_member with data: { "joinPolicy": …, "requireRulesAcceptance": … }
H6 In a secure channel, the account is secure and its community membership isn't needs_encryption. A needs_encryption channel member is let through for reads only: timeline items, attachments and membership events within its visibility ranges, and GET of the Channel, its members, the call state and the call's mutes. 403 security.account_required, data: { "scope": "channel", "ctx": … }
H7 In a secure channel, the device is enrolled, except for the reads H6 lets through. 403 security.device_not_enrolled, data: { "ctx": … }
H8 For content, MLS, history and call endpoints: the caller is a channel member. Skipped for the join itself. 403 channel.join_required
H9 Timeout, permission, hierarchy, new-member restriction, slow mode and rate limits. The codes of 10 §6.3

H3 and H4 come before every security check, so a hidden channel answers exactly like an unknown one and nobody can probe whether it exists or is secure. H6 comes before H7 so that an insecure account is offered "Turn on encryption", which also sets up the device, rather than a device-setup card it can't use. A join is never one of H6's exceptions: 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 session's device enrolment is set when the session is created or renewed, and is cleared only by positive evidence: device.revoked for that device, a newer verified IdentityState that doesn't list the device, or the end of the session (09 §9.1). The 300 s IdentityState freshness rule applies only to admitting or updating an MLS leaf and to creating a new secure membership. When that rule can't be met because the account's home server is unreachable, the server answers 503 federation.home_unreachable, never security.device_not_enrolled, because an outage is a wait, not a device problem.

How a client reacts

Each gate error has one fixed client reaction (09 §9.5), and the client MUST NOT show any other security warning on these paths:

Error Client reaction
security.account_required G1 ("Turn on encryption") in place of the community or channel; resume afterwards.
security.upgrade_required The blocking "Turn on encryption to continue" screen at the home server; G1 elsewhere.
security.device_not_enrolled G2 ("Set up encryption on this device") inside the channel; resume afterwards.
member.not_member Join the community 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".
channel.join_required Join the channel silently and retry.
member.pending "Waiting for approval", with "Cancel request".
community.rules_acceptance_required Show the rules with "Agree and join".
federation.home_unreachable Wait and retry; no gate card.
community.closed, community.invite_required, invite.* One plain sentence; no retry.

The copy for G1, G2 and the other cards is in Client requirements.

Resuming after G1 and G2

The gate cards promise that the interrupted action resumes by itself; this is client behaviour with no server state (09 §9.6). The client records a join intent in device-local storage (target, invite code, accepted rules version, action and time; one per target, expiring after 24 h). When the account turns on encryption or the device is enrolled, it replaces any remote session created before the change, because a remote session's security comes from the HomeAssertion that created it, then retries the community join, the channel join, joining or bootstrapping the channel's group, and, if the action was join_call, the call join, in that order, showing "Joining…" in place of the card. If a retried step fails with a non-gate error (an expired invite, a ban, changed rules), the client shows that error in place of the card and drops the intent. For an interrupted upgrade it re-runs the dry run and shows W5 again; it never confirms an upgrade by itself.

What members can read

There is no history setting (09 §7.1). In an insecure channel a member is served the whole stored history, and a rejoin restores it. In a secure channel a member, bot or person, is served only what was sequenced from the start of its current membership, and its client shows marker K6 at the join point; nothing hands keys to newcomers and nobody is prompted. The server enforces this with per-member visibility ranges of seq values, whose only normative definition is 09 §7.2. An event outside a recipient's ranges is still delivered at its seq, with a reduced payload ({ "withheld": true } for this page's events) and never with its content. Manual history sharing and the key archive are covered in MLS and sealed messages.

retentionDays deletes each root message older than N days, with its edits, reactions and attachments, in plaintext and ciphertext alike; shortening it applies to existing content within 24 h (09 §7.3). It is a server promise only, since other members' devices may keep copies.

Categories and layout

A Category has an id (UUIDv7), a name of 1 to 100 scalar values, a position, and the usual version, createdAt and updatedAt (09 §6.5).

Endpoint What it does
GET /v1/community/categories { "items": [Category…], "nextCursor": null }
POST /v1/community/categories Takes name and optional position (default last); 201 with the Category. More than maxCategories (default 50) fails with channel.limit_reached.
PATCH /v1/community/categories/{id} Takes name, position, ifVersion.
DELETE /v1/community/categories/{id} 204. Its channels get categoryId: null and are appended, in their old order, after the uncategorized channels.

Writes need manage_channels. Every category create, change and delete emits community.layout_changed with the full resulting layout, restricted to the channels each recipient can view.

Display order is normative for clients: uncategorized channels first, by position; then each category by position, each with its channels by position. Break ties by ctx, byte-wise. Don't separate text and voice channels unless the person asks.

PATCH /v1/community/layout replaces the whole 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, and channels every channel exactly once; the order within each category, and among uncategorized channels, becomes the new position sequence 0, 1, 2…. Anything else fails with core.invalid_request and nothing changes. The caller needs manage_channels over every channel, so someone who can't view some channels can't reorder; otherwise the request fails with 403 core.forbidden, data.permission: "manage_channels". A successful change emits community.layout_changed.

Invites

An Invite is a bearer token: anyone holding the link can join while it is active (09 §8.1).

{
  "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"
}

state is active, expired, used_up or revoked; treat an unknown value as not usable. channel is the channel to open after joining, or null for defaultChannel. uri and shareLink are built as Addresses describes; shareLink is null when the server publishes no join-link template.

Invite codes

A code is 60 random bits encoded as 12 characters of Crockford's base32 alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ, so it can be read aloud or typed from a screenshot without confusing 0 and O or 1 and I (09 §8.2). Clients display it in three groups of four: 7KQ2-M9XP-4HRT.

Servers and clients normalize any user- or link-supplied code the same way:

  1. Apply Unicode NFKC, so full-width characters become ASCII.
  2. Remove every White_Space character, every dash punctuation character (General_Category Pd), and the minus sign U+2212.
  3. Convert ASCII lowercase to uppercase.
  4. Replace I and L with 1, and O with 0.
  5. The result MUST be exactly 12 characters of the alphabet; anything else is treated like an unknown code, invite.not_found.

So " 7kq2-m9xp-4hrt ", "7KQ2–M9XP–4HRT" with en dashes and the full-width "7KQ2M9XP4HRT" all become 7KQ2M9XP4HRT, and "7kq2m9xp4hro" becomes 7KQ2M9XP4HR0. The full test vectors are in 09 §17.1.

Creating and managing invites

POST /v1/invites takes:

Member Default Constraints
channel null A channel the creator can view; otherwise 404 core.not_found.
maxAgeMs 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 null 1 to 10,000, or null for unlimited.
allowSignUp true false needs manage_invites.
POST {base}/v1/invites

{ "channel": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "maxUses": 25 }

The response is 201 with the Invite, and the server emits invite.created to the creator and holders of manage_invites. create_invites is channel-scoped (09 §8.3): the caller needs it in the target channel, in defaultChannel when channel is null, and at community level when defaultChannel is also null. Creation fails with invite.not_allowed while joinPolicy is closed, and with invite.limit_reached at maxActiveInvites (default 1,000).

GET /v1/invites needs create_invites at community level or manage_invites, and lists all invites for holders of manage_invites, otherwise the caller's own. DELETE /v1/invites/{code} revokes an invite (creator or manage_invites), returns it with state: "revoked" and emits invite.revoked. Expired, used-up and revoked invites stay listed for 30 days and are then purged; after that their code gives invite.not_found.

The invite preview

GET /v1/invites/{code} needs no authentication, so a link can show what it leads to before the person signs in (09 §8.4):

{
  "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 one without previewVisible. A code that isn't active fails with its error code. The preview reveals the community's public data, one channel's name and security, and the creator's address, nothing about members. Use the preview to plan the join: which account to use, whether G1 will appear (an insecure account and a secure channel or community), and whether to show the rules. A preview that says something is secure creates a secure-state pin.

Using an invite

An invite is used through POST /v1/community/join with invite (09 §8.5). The use counter increases atomically with creating the active membership, and only when the join completes: a join that fails at any gate, or finds the account already a member, consumes nothing. When uses reaches maxUses, the invite becomes used_up in the same transaction. Invite uses aren't reserved while a gate card is open.

Every lookup, join or sign-up with a code that doesn't name an active invite counts as a failed code attempt. A server MUST allow at most 30 failed attempts per 10 minutes per IP address and per session, and answers further attempts with 429 core.rate_limited. With 60 random bits, that makes guessing infeasible.

A client that opens an invite link or a plain channel address (09 §8.6):

  1. parses it and canonicalizes the address;
  2. fetches the invite preview, or for a plain address the address lookup and GET /v1/community, anonymously if the person isn't signed in;
  3. signs in or signs up if needed, fetches step 2 again with the session, and creates a remote session if the community isn't on the home server;
  4. after the person taps the preview's action, joins the community with the code and, if required, the rules acceptance (skipped if the account is already a member);
  5. records the community in the community list and opens openChannel or the linked channel, which joins it silently.

A plain channel address such as sloppyv://PublicLobby@sloppyvoice.com works as a link to an open community without any code.

When the server's registration policy is invite, POST /v1/auth/signup carries an inviteCode (09 §8.7). The code must name an active invite with allowSignUp: true; otherwise the sign-up fails with 400 auth.invite_invalid for every reason, so allowSignUp isn't revealed, and with 403 auth.invite_required when no code is given. Each such failure counts as a failed code attempt. Sign-up consumes one use, and the automatic community membership created in the same transaction records via: "invite" without consuming a second one. See Accounts.

The community list

Every home server keeps, for each of its accounts, the list of communities the account belongs to (09 §5.1). Every device of the account uses it to show the same sidebar, and the direct-message auto-accept rule uses it to decide whether two people share a community (Direct messages).

{
  "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"
}

A CommunityListEntry caches the community's name, icon URL, secure flag and the account's membership state (active, pending or needs_encryption; show an unknown value as active). The cached secure flag is informative only: clients rely on their own pins and on the community's server.

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

These use the home session; bots MAY use them. The division of work is fixed (09 §5.1):

  • The home server maintains the local: true entry for its own community. PUT or DELETE on it fails with core.invalid_request.
  • The client keeps every other entry current, because the client is the party that joins remote communities. After a join that returns 200 or 202, it MUST PUT the entry. After leaving, or after member.removed or member.rejected, it MUST DELETE it. If the home server is unreachable, it retries with backoff from 1 s doubling to 5 min.
  • {domain} MUST be canonical. The list holds at most maxCommunitiesPerAccount entries (default 500); more fails with community.list_full.

Every change emits community.list_changed on the account stream at the home server, so the account's other devices update their sidebars.

A stale entry is harmless, because the auto-accept rule confirms membership live with POST /v1/community/membership-check, a server-to-server request (09 §5.2). The asking server must name one of its own accounts that is a member of the community (onBehalfOf and onBehalfOfInc), and may ask about 1 to 20 addresses at once. That limits the answer to what the member could see in the member list anyway. If the named account isn't a member with that inc, the answer is 403 member.not_member, which the caller treats as "not shared" for every address in the request. Callers MUST NOT cache a positive result for more than 1 h or a negative one for more than 10 min, so a kick or ban stops auto-accept within the hour.

Events

This document's events are all durable and travel on three kinds of stream (09 §14.1; see Events):

Stream Who receives it Events
Channel stream (ctx: "ch:…") active channel members who pass H1 to H8 member.* with scope channel, and channel.security_changed at the upgrade
Community stream (ctx: "community") Community members (active or needs_encryption) community.updated, community.security_changed, community.layout_changed, channel.created, channel.updated, channel.deleted, and member.* with scope community
Account stream (ctx: "me") One account community.list_changed (home server), member.requested, member.rejected, invite.created, invite.revoked, the account's own member.updated and member.removed, and channel.created or channel.deleted when a role change shows or hides a channel

On the community stream, a channel.* event about a channel the recipient can't view arrives as { "withheld": true }; the client only advances its position. A channel.deleted with reason: "lost_access" on the account stream means a role change hid the channel, not that it was deleted. Clients ignore unknown event types and drop an event whose object version is lower than one they already hold.

Upgrading a channel to secure

A channel goes from insecure to secure through one dry run, one confirmation (W5) and one atomic switch (09 §10). There is no way back.

Preconditions

The server checks these in order and answers with the first failure (09 §10.1):

Requirement Dry run Confirmation Failure
The channel exists and the caller can view it Yes Yes 404 core.not_found
The caller holds manage_channels for it Yes Yes 403 core.forbidden, data.permission: "manage_channels"
The channel is insecure Yes Yes 409 channel.already_secure
The caller's account is secure No Yes security.account_required
The caller's device is enrolled No Yes security.device_not_enrolled
No other upgrade of this channel or the server is running No Yes 409 channel.upgrade_in_progress, retryable

The caller needn't be a channel member: the confirmation makes it one, and its device becomes the group's only leaf. An insecure admin may run the dry run, so the client can show who would be affected; the client then shows G1 before W5, and the upgrade resumes after the account upgrade like any join intent.

Dry run

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

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

The server changes nothing, emits nothing, and returns an UpgradePlan (09 §10.2):

{
  "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
}
  • cannotFollow lists up to 100 active channel members whose accounts are insecure; they will become needs_encryption. Treat an unknown reason as insecure_account.
  • secureBots lists up to 100 secure bots that will follow, each of which will read everything posted after the upgrade.
  • needsDeviceSetupCount counts secure members with no enrolled device seen in the last 90 days. It is informative.
  • activeCall says whether a call will restart, and webhookCount how many webhooks will stop working.

The W5 confirmation

The client shows W5 even when cannotFollowCount is 0, in which case it is a plain confirmation (09 §10.3). It shows:

  • the people who can't follow, by name (the first few, then "and N others"), and that they stay in the channel, can read earlier messages, and can come back in by turning on encryption;
  • the secure bots that will follow, and that each will be able to read everything posted from then on;
  • that people who join later won't see anything sent before they joined, the messages sent before encryption included;
  • 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.

The copy is in Client requirements. The deletion option depends on the server's honesty, so W5 must not promise erasure from backups (09 §18 item 4).

Confirmation

The client builds a one-member GroupBootstrap before sending the confirmation. That is possible here, unlike at creation, because a channel that becomes secure for the first time has generation 1 and an existing ctx, so the client can compute the group_id (09 §10.4).

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"
  }
}

The Idempotency-Key is required, and so is planVersion; without either the request fails with 400 core.invalid_request. After the preconditions, the server checks:

  1. planVersion equals the value it recomputes now. Otherwise 409 channel.upgrade_plan_stale with the new UpgradePlan in data.plan; show W5 again with the new names.
  2. bootstrap is present. Otherwise 400 channel.bootstrap_required.
  3. The GroupBootstrap passes 13's checks. Failures come back as mls.* errors such as mls.group_id_mismatch, and nothing changes.

Plan version

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

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 ch: reference for a channel upgrade, or the 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 byte-wise. With none, the input ends after the second 0x00.
  • The output is the first 16 bytes of the hash, base64url without padding: 22 characters.

A client only echoes the dry run's value; a server computes it, and the test vectors are in 09 §17.2.

The atomic switch

In one transaction with the channel's sequencer, so no message can be sequenced in the middle, the server (09 §10.4):

  1. takes u, the highest seq assigned so far;
  2. sets security: "secure", securedAt, upgradeSeq: u and preUpgradeHistory, and increases version;
  3. stores the bootstrap as the group's epoch 0;
  4. makes the caller an active member, its device the only leaf;
  5. moves every other active member whose account is insecure to needs_encryption (channel_upgraded);
  6. deletes every content event with seq ≤ u, with its attachments, if deletePreUpgradeHistory is true;
  7. disables the channel's webhooks;
  8. appends channel.security_changed at seq u + 1, followed by 13's mls.group_created and the member.updated events.

Then it rejects every later plaintext post with 409 channel.plaintext_rejected, ends the running call with reason security_upgraded, delivers the events (including channel.updated on the community stream), ends the channel-stream subscriptions of members moved to needs_encryption, and answers 200 with the updated Channel.

{
  "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
  }
}

A repeat with the same Idempotency-Key returns the same answer. If two admins race, the loser gets 409 channel.already_secure, whose data holds the Channel, by (the admin whose upgrade made it secure, or null after a server upgrade), and the groupId, generation and ekid of the group's epoch 0 (null if no group exists yet). A client whose own bootstrap matches those values had its confirmation succeed and lost the response, so it keeps its group; any other client discards the group it built and joins the existing one by external commit, or bootstraps if none exists.

After the switch

Each member's experience follows from its account and device at step 5 (09 §10.7):

Member's account After What the member sees
Secure, enrolled device active K1 at u + 1, K3 above the pre-upgrade messages, and "Joining…" while its device joins the group by external commit. Nobody is prompted.
Secure, no enrolled device active G2 on each unenrolled device.
Insecure user or bot needs_encryption K1 and G1; pre-upgrade history under K3.
The caller active, sole leaf K1.

A needs_encryption member keeps its membership, roles and place in the member list. It can read the channel up to seq u + 1 over HTTP, unless the history was deleted, but 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 and the client resumes by itself.

Pre-upgrade messages stay plaintext on the server. They are served only to accounts that were members at the upgrade and haven't left since, and they are never sealed, archived or shared. Clients show them under K3 and never with a closed lock.

Members who can follow rejoin the restarted call automatically as a secure call and keep their microphone and push-to-talk state, because this is a planned migration (Calls). Members who can't follow aren't rejoined; their call view shows G1. Clients show the closed lock only once they hold the group's state.

Warning

A client whose plaintext post was rejected with channel.plaintext_rejected MUST NOT resend it as plaintext (09 §10.5). If the account is secure and the device enrolled, it sends it again automatically as a SealedMessage with the same mid once it has joined the group. Otherwise it keeps the message unsent and shows it as not delivered. See Messaging.

Upgrading a server

A server upgrade makes the whole community secure, once and for ever (09 §11). It changes every local account, so the bar is higher than for a channel.

Preconditions

The server checks these in order and answers with the first failure (09 §11.1):

Requirement Dry run Confirmation Failure
The caller holds the admin role (manage_community isn't enough) Yes Yes 403 core.forbidden, data.missingRole: "admin"
The caller is a local account Yes Yes 403 community.local_admin_required
The caller's account is secure No Yes security.account_required
The 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 running No Yes 409 community.upgrade_in_progress, retryable

confirmDomain is filled in from the W5 dialog, where the admin types or confirms the domain. It stops a generic settings tool from setting secure: true by accident.

Dry run

PATCH /v1/community with { "secure": true, "dryRun": true } returns a ServerUpgradePlan (09 §11.2). Its counts tell the admin what will change:

  • insecureChannelCount: channels that will be upgraded;
  • localInsecureAccountCount and localInsecureBotCount: local accounts that will be put in upgrade_required, and how many of them are bots, which stop working until their operator re-creates them as secure bots;
  • remoteInsecureMemberCount: remote members who will become needs_encryption;
  • insecureDmCount: insecure DMs and group DMs hosted here, which will be closed or paused;
  • activeCallCount, webhookCount and historyMessageCount.

cannotFollow and secureBots list up to 100 accounts each, as for a channel; cannotFollow entries also carry local. The set of accounts that can't follow, which feeds planVersion with the domain as scope, is every insecure local account (member or not) plus every insecure remote account that is active, needs_encryption or pending.

The server W5 adds to the channel W5 that the change can't be undone, that every channel will be encrypted, and what happens to insecure local accounts, bots and DMs; its deletion checkbox, off by default, covers the pre-upgrade messages of every channel (09 §11.3).

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
}

planVersion, confirmDomain and the Idempotency-Key are required; a missing one fails with 400 core.invalid_request. A stale plan fails with 409 community.upgrade_plan_stale with the new plan in data.plan. There is no bootstrap: no channel gets a group at the upgrade.

The switch MUST appear atomic to every client: nobody can see the community secure while any channel is insecure, or post plaintext anywhere after it became secure (09 §11.4). The server:

  1. stops accepting plaintext in every channel and every insecure DM and group DM hosted here (T1); such posts fail with 409 channel.plaintext_rejected in channels, or 409 dm.closed or dm.encryption_pending in DMs;
  2. applies the channel switch to every insecure channel without a group, moving insecure channel members to needs_encryption with reason server_upgraded and sending channel.security_changed with cause: "server_upgrade" (T2); the caller doesn't become a member of every channel;
  3. sets the Community and ServerMetadata secure: true and securedAt in the same step (T3);
  4. moves every insecure account's membership to needs_encryption (server_upgraded) and rejects every insecure pending request with reason closed (T4);
  5. puts every insecure local account into upgrade_required (T5), and creates future local accounts in that state (T7);
  6. closes or pauses insecure DMs as Direct messages describes (T6).

It then ends the affected calls, emits community.security_changed, community.updated, each channel's channel.security_changed and channel.updated, and the member.updated events, and answers 200 with the Community. The server finishes all of this before answering, so clients SHOULD allow 120 s and show progress. A repeat with the same key, or a confirmation on a server that is already secure, answers 200 with the Community.

Each channel's MLS group is created lazily, by the first enrolled member device that opens it; every other device joins by external commit. A channel nobody opens never gets a group, which costs nothing.

Afterwards, insecure local accounts see the blocking "Turn on encryption to continue" screen and can only turn on encryption (Secure accounts) or delete the account, after which their memberships return to active and their join intents resume; remote insecure members see G1 at community level; secure members see K1 in each channel they open and aren't prompted (09 §11.5). Other servers learn the new state from ServerMetadata; there is no server-to-server event for it.

No way back

Secure is permanent, for channels and for servers (09 §12):

  • PATCH /v1/channels/{id} with security: "insecure" on a secure channel fails with 409 security.downgrade_forbidden, whatever dryRun says and whoever asks.
  • PATCH /v1/community with secure: false on a secure server fails with 409 security.downgrade_forbidden. On an insecure server it is a no-op that returns the object.
  • A server MUST NOT offer any other API, admin tool or configuration path that turns a secure channel or server back to insecure, clears securedAt or upgradeSeq, or accepts or serves plaintext after upgradeSeq.

To go back, an admin creates a new insecure channel with a new name, on an insecure server. A secure server can't hold one, so the only way back for a server is a different server. Admin clients MAY show a line of help text saying this where a person looks for "Turn off encryption", and MUST NOT offer a control that sends a downgrade. Deleting a secure channel and creating an insecure one at the same address isn't a downgrade: it is a new context with a new ctx, no history and no lock.

Secure-state pins and W9

The prohibition binds honest servers. A malicious or broken server could still present a secure channel or server as insecure, so every client keeps secure-state pins of what it has seen as secure (09 §13): in the AccountVault on an enrolled device of a secure account, and in device-local storage on any other device, so that even an insecure account never posts plaintext into a context everyone else believes is secure. A pin is never removed or weakened because of anything a server says.

When a current statement contradicts a pin, for example a fresh Channel object saying insecure or plaintext content above the pinned upgradeSeq, the client raises W9: a hard error that disables sending and calls in that context and offers "Leave" but no "Ignore". Before raising W9 from a cached ServerMetadata, address lookup, invite preview or channel list, the client refetches it with Cache-Control: no-cache, and it treats a Channel or Community object with a lower version than the pin's as historical, because a false hard error would teach people to leave working channels. A client whose channel pin has no upgradeSeq yet, or that holds only a community pin for the server, MUST fetch the Channel object before it displays any plaintext content of that channel (09 §13.3), so it can tell pre-upgrade plaintext from a downgrade. Pins don't grant a lock: a pinned channel shows the closed lock only once the client holds current MLS state for its group (09 §13.7). The triggers and decision table are in 09 §13.4 and 09 §17.4; the threat model is in Security model.

Limits

These limits are advertised in ServerMetadata limits (09 §16):

Limit Default Floor
maxChannels 500 100
maxCategories 50 20
maxActiveInvites 1,000 100
maxCommunityIconBytes 1 MiB 256 KiB
maxCommunitiesPerAccount 500 100

The fixed values (name lengths, invite ranges, lifetimes and retention periods) are listed in 09 §16.

Gaps in the spec

A few points in document 09 are open or unclear. Don't rely on behaviour the spec doesn't state:

  • The query values and default of state on GET /v1/invites aren't specified, and no event announces an invite becoming expired or used_up (09 §8.3).
  • The response of DELETE /v1/community/icon isn't stated (09 §3.4).
  • The endpoint table allows GET /v1/community/members/{addr} to "the account itself", but 09 §4.7 requires callers to be members, so whether a requester can read its own pending record is unclear.
  • 09 §3.5 says every /v1/community… endpoint used with an upgrade_required session fails, which literally includes GET /v1/community sent with such a session, although that endpoint needs no authentication.
  • The error for an unknown category ID on PATCH or DELETE /v1/community/categories/{id} isn't stated (09 §6.5).