Status Draft. Protocol version 1 (sv1) of the Sloppy Voice v2 product
Date 2026-12-04
Depends on 00 (overview and conventions), 01 (addresses), 02 (ServerMetadata, secure flag), 03 (transport, envelope, errors), 06 (federation, S2S delivery, remote sessions), 07 (IdentityState, pins, W2), 09 (community list, membership check), 10 (DM rate limits, request reports), 11 (messages, outbox, timeline), 13 (MLS profile, KeyPackages, DS), 14 (SealedMessage, visibleFromSeq, key archive, HistoryShare). Referenced: 05, 08, 15, 19, 20
Decisions used D-002, D-004, D-005, D-007, D-018, D-019, D-021, D-022, D-028, D-031, D-032, D-034 to D-038, D-048 to D-051, D-054 to D-059, D-061, D-064, D-067, D-068, D-069, D-071, D-073, D-086, D-087, D-091, D-094
Owns The DM hosting rule; dm: and gdm: context references; the Dm and DmParticipant objects; /v1/dms…, /v1/me/dms…, /v1/me/dm-requests…; DmIndexEntry, DmRequest, DmSettings and DmBlock; the dm.request, dm.response and dm.entry_updated S2S event types and payloads; the auto-accept rule; DM security computation and transitions; who may bootstrap a DM group; group DM membership rules and the DM commit policy that 13 enforces; maxGroupDmParticipants and maxDmRequestBytes; every dm.* event and error code

Conformance. This document is normative for the Server class (home-server role: DM index, message requests, blocks; hosting-server role: DMs) and for the Full client, Web client and Bot client classes (00 §1.5). The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals. Grammars use ABNF (RFC 5234). JSON examples are informative unless the text says otherwise; where an example and the normative text disagree, the text wins. Rationale notes start with "Rationale:" and are informative. Every wire element follows 00 §7.

1. Scope

This document specifies direct messages: 1:1 DMs between two accounts and group DMs among three or more accounts, outside any community (00 §2.6). It covers:

  • which server is the hosting server of a DM (the DM hosting rule, D-048) and how that choice reacts to server upgrades;
  • the dm: and gdm: context references, including the deterministic 1:1 ID and its test vectors;
  • creating a DM at the hosting server, including the secure case;
  • first contact through the dm.request server-to-server event (D-049), the DM index and message requests at the recipient's home server, and the auto-accept rule;
  • computing a DM's security mode from its participants (D-050), and every transition between modes, with the markers and warnings each one produces;
  • group DM membership: adding, removing, leaving, the creator's rights and what changes once the creator has left (D-087), what newcomers and re-added participants can read (revised D-007), manual history sharing in DMs, and the rules for the sv_participants extension that 13 enforces;
  • the effect of a server upgrade on DMs it hosts;
  • which DMs can have calls, and how their call media travels (D-094);
  • what happens when a hosting server is unreachable;
  • every dm.* event and error code.

It does not cover: MLS mechanics such as KeyPackages, Welcome, commits, the epoch fence and removals (13); the SealedMessage format, visibleFromSeq, the key archive rules and the HistoryShare mechanism (14); message content, posting, the timeline API and the client outbox (11); identity objects, pin semantics and the W2 state machine (07); the delivery of notify and push (19); call control and media (15 to 18); and the exact user-facing copy of warnings and markers (20). Where this document needs one of those, it names the owner and the object.

2. Terminology and notation

2.1 Terms

The terms of 00 §2 apply unchanged, in particular hosting server, home server, context reference, DM, group DM, membership, security mode, sv_participants and canonical address. This document adds:

Term Definition
DM participant An account recorded in a DM's participant list at the hosting server, in any participation state (§6.3). A current participant is one in state reserved, pending or active; in a 1:1 DM, a declined participant is also a current participant (§6.3).
Peer In a 1:1 DM, the DM participant who isn't the account under discussion.
Creator The account whose POST /v1/dms created the DM.
Owner In a group DM, the creator, from the group's creation until the creator first stops being a current participant. While a group has an owner, only the owner may remove others; once the creator has left, the group has no owner for good and every active participant may remove others (D-087, §12.1). Ownership is never transferred.
Inviter For a given participant, the account that caused them to be added: the creator for initial participants, otherwise the participant who added them.
Invitation One addition of one participant to one DM, identified by an invitationId assigned by the hosting server. A dm.request belongs to exactly one invitation.
Recipient home The home server of a participant who receives a dm.request.
Message request A DmRequest (§10.1) waiting at the recipient home for the user to accept, decline or block.
DM index The set of DmIndexEntry records (§9.1) that a home server keeps for each of its accounts: every DM the account takes part in, on any hosting server.
Hosting rule The deterministic functions of §4 that choose a hosting server.
Rule host The server the hosting rule selects for a given set of inputs at a given moment. The current host of an existing DM is the server that actually holds it; the two differ only in the cases of §4.5.
Successor The DM that continues a closed DM (§13): for a 1:1 DM the same dm: reference at another (or, rarely, the same) hosting server; for a group DM a new gdm: reference. Its predecessor is named in its replaces member.
Content event A durable timeline event of type message.created (11), or a dm.call_logged event with phase: "started" (§14.1).
Computed security The security mode that §11.1 derives from the DM participants' IdentityStates.
Bootstrap grant The hosting server's permission for exactly one device at a time to create a DM's MLS group for its current generation (§11.4).

00 §2.8 uses participant for one device in a call. This document never uses that sense without saying so: "participant" in this document always means a DM participant, and §14 writes "DM participant" and "call participant" in full.

2.2 Notation

  • || is byte concatenation. 0x00 and 0x0A are single bytes.
  • UTF8(s) is the UTF-8 encoding of string s without a byte-order mark.
  • domain(a) is the domain part of canonical address a. Because the address is canonical (01, D-032), domain(a) is the canonical domain of a's home server.
  • secure(d) is the secure member of the ServerMetadata (02) of the server whose canonical domain is d.
  • sec(a) is the sec claim of the newest valid IdentityState (07) the evaluator holds for address a. An account in the upgrade_required state (05) has sec(a) = insecure.
  • "Byte-wise order" compares UTF8(a) and UTF8(b) as unsigned byte strings, lexicographically; a proper prefix sorts first. Because canonical addresses are NFC UTF-8, this equals ordering by Unicode code point.

3. Model overview (informative)

A DM lives on exactly one hosting server, which sequences and stores it like any other context (D-048). Every participant's client connects directly to that server to read and post, using a remote session when it isn't the participant's home server (D-004, 06). Each participant's home server keeps a DM index entry pointing at the DM, so all of that user's devices find it, and so the home server can tell the hosting server about identity changes (06 revocation fan-out).

          alice@a.com (creator)                              dan@d.com (recipient)
   +-----------------------------+                     +-----------------------------+
   | client                      |                     | client                      |
   +-----------------------------+                     +-----------------------------+
     | 1 POST /v1/me/dms (register)                      ^ 6 render request from home only
     | 2 POST /v1/dms, MLS, first message                | 7 Accept  ->  8 connect to host
     v                                                   |
   +------------------+   3 dm.request (first events)  +------------------+
   | a.com            |------------------------------->| d.com            |
   | home of Alice,   |<-------------------------------| home of Dan:     |
   | hosting server   |   5 dm.response (accept, ...)   | DM index,        |
   | (rule picked it) |   4 dm.entry_updated (later)    | message requests |
   +------------------+                                 +------------------+

The life of a DM:

  1. Creation (§7). The creator's client computes the rule host (1:1) or uses its own home (group), registers the DM in its own index, and creates it at the hosting server. In a secure DM it also creates the MLS group (for a 1:1 DM inside the creation request) and adds everyone's devices by Welcome (13).
  2. First contact (§8). At the first content event the hosting server sends dm.request to each other participant's home server, carrying the first events.
  3. Request or auto-accept (§10). The recipient's home server files the DM as a message request, or accepts it automatically when the inviter is already known to the recipient. Until the user accepts, their client talks only to their own home server.
  4. Conversation. Participants talk through the hosting server. Security follows the participants automatically (§11).
  5. End. A DM ends when its participants leave (group DMs), or it is closed when its hosting server can no longer hold it (§13). The next message then continues in a successor.

4. The hosting rule

4.1 Inputs

The hosting rule is evaluated by the creator's client (to know where to send POST /v1/dms), by the hosting server (to check that it is the right server), and by recipient homes (to check that a dm.request comes from a legitimate host). Every evaluator uses:

  1. Canonical addresses of all participants (01). An evaluator MUST canonicalize first and MUST NOT evaluate the rule on an alias form (D-032).
  2. secure(domain(p)) for each participant's home, from that server's ServerMetadata (02). For hosting decisions an evaluator MUST use metadata no older than 1 h. On a dm.wrong_host disagreement (§4.4) the client MUST refetch every input metadata document before retrying, and a server MUST refetch, before it answers dm.wrong_host, every input metadata document of another server that is older than 60 s. A server evaluates secure(d) from its pin for d (02 §10.2): once it has accepted true, it uses true, also while the pin is suspended, and never acts on a downgraded value. A client that has ever seen secure: true for d likewise never uses false (D-073).
  3. For group DMs only, sec(p) for each participant, from IdentityStates verified as 07 specifies, and the computed security of the group (§11.1).

Rationale: the secure flag only ever goes from false to true (D-073), so stale metadata can be wrong in one direction only, and the party with the fresher copy is right. The hosting server's view of its own flag is always fresh.

4.2 1:1 DMs

host_1to1(A, B):
    if A == B:                        fail dm.invalid_participants (reason "self")
    (P1, P2) := (A, B) if UTF8(A) < UTF8(B) else (B, A)     ; byte-wise order
    H1 := domain(P1);  H2 := domain(P2)
    if secure(H1) and not secure(H2): return H2
    if secure(H2) and not secure(H1): return H1
    return H1

The result depends only on the two addresses and the two secure flags, never on who starts the DM. If both addresses are on the same server, the result is that server.

The rule never selects a secure server for a DM whose participants might be insecure, with one exception: when both homes are secure servers, the rule selects H1, and every account homed there is secure or upgrade_required (SM-3). §13.2 covers the transient case of an upgrade_required participant.

Rationale: picking the lower-sorting participant's home is arbitrary but symmetric, which is all that convergence needs (§5.3). The secure-server exception keeps plaintext DMs off secure servers (SM-10). When both homes are secure, every participant is secure, so the DM is secure and either home may hold it.

4.3 Group DMs

host_group(C, Ps, security):          ; C = creator, Ps = the other initial participants
    if security == secure:            return domain(C)
    if not secure(domain(C)):         return domain(C)
    L := (Ps ∪ {C}) in byte-wise order
    for p in L: if sec(p) == insecure and not secure(domain(p)): return domain(p)
    for p in L: if not secure(domain(p)):                        return domain(p)
    fail dm.encryption_pending        ; every home is a secure server (§13.2)

The first three lines are the rule of D-048 and 00 HP-9. The two loops refine "the home server of the first insecure participant": an insecure participant whose home is a secure server can only be an account in the transient upgrade_required state (SM-3), and choosing that server would put plaintext on a secure server, which SM-10 forbids. When no participant is in that state, the first loop returns exactly what HP-9 states. 00 HP-9 states this rule.

A group DM's hosting server never changes after creation, even if the creator leaves, the group becomes secure, or the creator's home becomes a secure server. A group DM that its host can no longer hold is closed and replaced (§13).

The creator for the purpose of this rule is the account that sends POST /v1/dms. When a client creates a successor group (§13.3), the participant sending it is the creator.

4.4 Host verification at creation

A server that receives POST /v1/dms for a DM that doesn't exist here yet (or for reopening one, §13.4) MUST evaluate the rule itself, with its own fresh inputs, before creating anything. An existing 1:1 DM is returned without evaluating the rule (§7.2 step 4), because its current host may legitimately differ from the rule host (§4.5).

  • For a 1:1 DM it computes host_1to1(caller, peer). If the result isn't its own canonical domain, it MUST refuse with 409 dm.wrong_host, with data.host set to the domain it computed.
  • For a group DM it computes host_group with the caller as creator. If the result isn't its own canonical domain, it MUST refuse with 409 dm.wrong_host.

Before refusing, the server refetches stale metadata as §4.1 item 2 says, so that a server holding an old copy of another home's flag doesn't keep refusing.

On dm.wrong_host the client refetches its inputs (§4.1) and recomputes. If its result now matches data.host, it retries there. If it still disagrees, it retries the original server once after 5 s, then reports core.unavailable to the user as "Couldn't start this conversation right now" and keeps the draft in the outbox (11).

4.5 Current host versus rule host

The rule chooses a host only when a DM is created (including when a successor is created, §13). After that the current host stays fixed for the life of that DM. The rule host and the current host can differ in these cases, and only these:

Case Example What happens
A participant's home became a secure server after creation, and the DM is secure Alice and Dan, both secure, DM on a.com; a.com upgrades. The rule now picks d.com. Nothing. The DM stays on a.com. A secure server may hold a secure DM.
As above, and the DM is or becomes insecure, and the rule host is a server that isn't secure a.com upgrades while the DM is insecure; or later Dan (on non-secure d.com) downgrades. The current host closes the DM and a successor starts at the rule host (§13).
A 1:1 DM is or becomes insecure while both homes are secure servers DM on d.com because a.com was secure (H-3); then d.com upgrades too, and Dan is upgrade_required. The rule now picks a.com. The DM stays on d.com in state encryption_pending (§13.2) and becomes secure there once Dan turns on encryption. No successor could hold it anywhere else.
A group DM's creator left — Nothing. The host never changes (§4.3).

A client that wants to send to an existing DM MUST use the current host recorded in its DM index entry (§9.1), not a freshly computed rule host. It computes the rule only when it has no non-closed index entry for that context, or when the entry it has is closed.

Rationale: moving a secure DM whenever a server upgrades would force a new MLS group and gain nothing; the secure server can't read it anyway. A fixed host also keeps the notify and audience relationships of 19 and 06 stable.

4.6 Hosting test vectors

s marks a secure server. sec marks the account's IdentityState sec. All addresses are canonical.

# Participants (creator first for groups) Server flags Expected host Why
H-1 alice@a.com, dan@d.com none secure a.com alice@a.com < dan@d.com; H1
H-2 dan@d.com, alice@a.com none secure a.com Same pair, other order: same result
H-3 alice@a.com, dan@d.com a.com s d.com Exactly one home is secure: the other one
H-4 alice@a.com, dan@d.com d.com s a.com Exactly one secure: the other one, which is also H1
H-5 alice@a.com, dan@d.com both s a.com Both secure: H1
H-6 alice@z.com, alice2@a.com none secure a.com alice2@… < alice@… because 2 (0x32) < @ (0x40)
H-7 bob@b.com, bob@b.co none secure b.co bob@b.co is a proper prefix of bob@b.com
H-8 carol@c.com, dave@c.com c.com s c.com Same home
G-1 creator alice@a.com (sec secure); bob@b.com (secure); carol@c.com (secure) none secure a.com Secure group: creator's home
G-2 creator alice@a.com (secure); zed@z.com (insecure); bob@b.com (secure) none secure a.com Insecure group, creator's home not secure: creator's home
G-3 creator alice@a.com (secure); zed@z.com (insecure); bob@b.com (secure) a.com s z.com Creator's home secure; first insecure participant is zed, although bob sorts first
G-4 creator alice@a.com (secure); erin@e.com (insecure, upgrade_required); bob@b.com (secure) a.com s, e.com s b.com No insecure participant on a non-secure home; first participant on a non-secure home
G-5 creator alice@a.com (secure); erin@e.com (upgrade_required) ; fay@f.com (secure) a.com, e.com, f.com all s fails dm.encryption_pending Every home is secure; the group can only exist once Erin turns on encryption

5. Context references

5.1 Grammar

The grammar is 03's (03 §8.3, §8.4), repeated here for convenience. It uses RFC 7405 %s"…" for case-sensitive literals; uuid7 and b64u-128 are defined in 03 §8.2 and §8.4.

dm-ctx        = dm-ref / gdm-ref
dm-ref        = %s"dm:" b64u-128     ; 16 bytes, unpadded base64url; last character
                                     ; one of "AQgw" (the 4 unused bits are zero)
gdm-ref       = %s"gdm:" uuid7       ; lowercase hyphenated UUIDv7

Receivers MUST reject a dm: reference that doesn't match dm-ref (wrong length, padding, a character outside the alphabet, non-zero unused bits, or a prefix in another case such as DM:) with 400 core.invalid_request. In paths, the colon MAY be percent-encoded (00 §7.3).

5.2 The 1:1 reference

For participants with canonical addresses P1 < P2 in byte-wise order:

digest   = SHA-256( UTF8("sv1 dm") || 0x00 || UTF8(P1) || 0x0A || UTF8(P2) )
dm_ctx   = "dm:" || base64url( digest[0..16] )         ; first 16 bytes, no padding

The label sv1 dm is registered in 00 §7.15. 0x0A (line feed) can't occur in a canonical address, so the encoding is unambiguous without length prefixes. A dm: reference identifies a pair of accounts, not a server: the same pair has the same reference on every server, which is how a successor at another host (§13) keeps it. It names the pair by address only (D-048). When an address passes to a new account (a new incarnation, D-086), the same reference names a new conversation, which §6.4 keeps apart from the earlier one.

A dm: reference is computed by anyone (00 §7.6). The hosting server MUST recompute it from the two participant addresses on POST /v1/dms and on every dm.request it sends, and a recipient home MUST recompute it on every dm.request it receives (§8.4). A mismatch is a hard failure (dm.invalid_participants for clients; dm.host_mismatch for S2S).

Rationale: 128 bits of SHA-256 make collisions irrelevant at any realistic scale, and 22 characters keep URLs and logs readable.

5.3 Convergence of simultaneous starts

When Alice and Dan start a DM with each other at the same moment, both clients compute the same rule host and the same dm: reference, so both POST /v1/dms requests reach the same server for the same context. The hosting server serializes them: the first creates the DM (201) and the second receives the existing DM (200), with the second caller's participation set to active (§7.2 step 4). Both clients registered the DM in their own index first (§7.1 step 3), so both index entries are active and neither user sees a message request.

In a secure DM both requests carry a group bootstrap (§7.2). Only the request that creates the DM applies its bootstrap and first commit; the second caller's are ignored (§7.2 step 4). That client discards its own group and joins the winner's: the winner's first commit added every enrolled device of both participants, so it fetches its Welcome (13 §7.9); on mls.welcome_not_found it joins by external commit, which is allowed because it is listed in sv_participants (13). It then re-encrypts any queued message under the winner's group. Queued messages keep their client-generated mid, so nothing is duplicated (11).

5.4 The group reference

gdm: + a UUIDv7 (RFC 9562) generated by the hosting server at creation. Group references are never reused, including for successors.

5.5 Test vectors for dm: references

Inputs are canonical addresses; the SHA-256 input is shown in hexadecimal.

V-1. alice@a.com and dan@d.com (either order).

P1        = alice@a.com          616c69636540612e636f6d
P2        = dan@d.com            64616e40642e636f6d
input     = 73763120646d00 616c69636540612e636f6d 0a 64616e40642e636f6d
SHA-256   = 2815df6a03e82e54322aedd03a22df839f3e796e2c4e2c5a05ea5c4f627247a6
first 16  = 2815df6a03e82e54322aedd03a22df83
ctx       = dm:KBXfagPoLlQyKu3QOiLfgw

V-2. alice@z.com and alice2@a.com (the domain isn't the primary sort key).

P1        = alice2@a.com         616c6963653240612e636f6d
P2        = alice@z.com          616c696365407a2e636f6d
input     = 73763120646d00 616c6963653240612e636f6d 0a 616c696365407a2e636f6d
SHA-256   = ba35b8483a5c2dc9090a14d4aefb35c59a023d2b248a100ae109afc16af16966
ctx       = dm:ujW4SDpcLckJChTUrvs1xQ

V-3. bob@b.com and bob@b.co (prefix ordering).

P1        = bob@b.co             626f6240622e636f
P2        = bob@b.com            626f6240622e636f6d
input     = 73763120646d00 626f6240622e636f 0a 626f6240622e636f6d
SHA-256   = 0a6a7f4e7220fa82d9a376ebe5ba8c7fea95e8bea214d022bfda5ba121550505
ctx       = dm:Cmp_TnIg-oLZo3br5bqMfw

V-4. zoë@b.example (NFC, ë = U+00EB) and zoe@b.example (Unicode local part; these are distinct addresses under 01).

P1        = zoe@b.example        7a6f6540622e6578616d706c65
P2        = zoë@b.example        7a6fc3ab40622e6578616d706c65
input     = 73763120646d00 7a6f6540622e6578616d706c65 0a 7a6fc3ab40622e6578616d706c65
SHA-256   = 6996e50794607067918ebe9bd13f2ef015e31c8b330962ec6ee50d443e2ba15f
ctx       = dm:aZblB5RgcGeRjr6b0T8u8A

V-5. saxonjones@sloppyvoice.com and helperbot@guild.sloppyvoice.com (two separate servers on one deployment, 00 §3.4).

P1        = helperbot@guild.sloppyvoice.com
            68656c706572626f74406775696c642e736c6f707079766f6963652e636f6d
P2        = saxonjones@sloppyvoice.com
            7361786f6e6a6f6e657340736c6f707079766f6963652e636f6d
SHA-256   = 1d6d39b01b23c9e753f9eb10fdc03e28582d3ecdbb1a301981f329088a153b02
ctx       = dm:HW05sBsjyedT-esQ_cA-KA

V-6 (negative). Alice@A.com and dan@d.com: the first address isn't canonical. An implementation MUST canonicalize to alice@a.com first (01) and then produce V-1; computing a hash over the non-canonical form is non-conforming.

V-7 (negative). dm:KBXfagPoLlQyKu3QOiLfgx: the last character carries non-zero unused bits and MUST be rejected (§5.1).

6. The DM at the hosting server

6.1 Dm object

The hosting server keeps one Dm object per DM. GET /v1/dms/{ctx} returns it (§7.5).

Member Type Required Meaning and constraints
ctx string Yes dm:… or gdm:… (§5).
kind string Yes direct (1:1) or group. Receivers treat an unknown value as group.
host string Yes Canonical domain of the hosting server.
security string Yes insecure or secure: the DM's current security mode (§11). Receivers treat an unknown value as secure and refuse to send plaintext.
state string Yes active, upgrading, encryption_pending or closed (§6.2). Receivers treat an unknown value as closed.
closedReason string or null Yes When state is closed: host_secure (§13), peer_deleted (§6.4) or banned (a participant has a server-scope ban at this hosting server, 10 §9.4 step 7). Otherwise null.
participants array of DmParticipant Yes Every participant the caller may see (§6.3, §6.5).
owner string or null Yes Group DMs: the owner's canonical address, which is createdBy until the creator first stops being a current participant, and null from then on, even if the creator is added again (§12.1, D-087). Null means every active participant may remove others. 1:1 DMs: null.
name string or null Yes Group DMs: the group's name, 1 to 100 Unicode scalar values and at most 400 bytes, NFC, no control characters (Cc) and no leading or trailing white space; or null for no name. 1:1 DMs: always null.
createdBy string Yes Creator's canonical address.
createdAt string Yes RFC 3339 timestamp.
groupGeneration integer Yes Generation of the DM's current MLS group, the last component of its group_id (13). 0 while no group exists. Increases by 1 each time a new group is created for this DM (§11.4).
securitySinceSeq integer Yes seq of the event at which the current security took effect: 1 for a DM created in its current mode, otherwise the seq of the latest dm.security_changed.
lastSeq integer Yes Highest seq in the DM's timeline.
replaces object or null Yes The predecessor { "host": domain, "ctx": ref } when this DM is a successor (§13), else null.

6.2 DM states

State Meaning Content accepted Calls
active Normal operation. Plaintext if security is insecure; SealedMessages if secure. A SealedMessage posted to a secure DM whose current generation has no group yet (a group DM between its creation and its bootstrap, §7.1 step 6) fails with 13's 404 mls.group_not_found. Yes (§14)
upgrading The computed security is secure but security is still insecure; the MLS group is being created (§11.4). Nothing. Plaintext is refused with 409 dm.upgrade_in_progress. No new joins (dm.upgrade_in_progress); a call already running continues until the switch (§14)
encryption_pending The hosting server is a secure server and the computed security is insecure (§13.2). Nothing: 409 dm.encryption_pending. No
closed Read-only. The DM can never accept content again, except by reopening (§13.4). A DM closed with reason banned reopens in place when the ban ends (below). Nothing: 409 dm.closed, with data.reason and data.successor. 11's posting order checks the DM state at its step 6 (11 §4.5). No

State transitions (the hosting server applies them):

From Event Action To
(none) POST /v1/dms accepted, computed security allowed here Create; emit dm.created (seq 1) active
active (insecure) Computed security becomes secure (§11.1) Emit dm.security_eligible upgrading
upgrading A bootstrap for generation groupGeneration + 1 is accepted (13) Set security to secure; emit dm.security_changed (K1) active
upgrading Computed security becomes insecure again before a bootstrap Emit dm.state_changed active
active (secure, 1:1) A participant's sec becomes insecure, host not a secure server Set security to insecure; retire the group; emit dm.security_changed (K2) active
active (secure, group) A participant's sec becomes insecure Remove that participant (§12.4); stay secure active
active or upgrading, insecure, host became a secure server Server upgrade (§13.1) If 1:1 and the rule host (new flags) is a secure server: emit dm.state_changed; else emit dm.closed (K5) encryption_pending or closed
active (secure, 1:1) on a secure server A participant's sec becomes insecure, and the rule host (fresh flags) is a secure server Set security to insecure; retire the group; emit dm.security_changed (K2) encryption_pending
active (secure, 1:1) on a secure server A participant's sec becomes insecure, and the rule host isn't a secure server Emit dm.closed (K5) closed
encryption_pending Computed security becomes secure Emit dm.security_eligible upgrading
active (1:1) account.deleted (05) for the peer's recorded incarnation, or a new incarnation of the peer's address (§6.4) Emit dm.participant_removed (reason account_deleted) and dm.closed closed (peer_deleted)
closed A successor creation selects this server for the same dm: reference (§13.4) Emit dm.state_changed active, upgrading or encryption_pending
active, upgrading or encryption_pending (1:1) A server-scope ban of a participant (10 §9.4 step 7) Emit dm.closed (reason banned, marker null); in a secure DM 13 removes the target's leaves closed (banned)
closed (banned) The ban expires or is lifted (10 §9.5) Recompute security (§11.1); emit dm.state_changed (reason reopened) active, upgrading or encryption_pending

While a DM is closed with reason banned, posts and call joins by the banned participant get 403 moderation.banned (10) and those of the other participant 409 dm.closed. No successor is created for it (§13.3 applies only to host_secure). After it reopens, the target's devices rejoin a secure group by external commit, because sv_participants never changed (13 §10.4).

6.3 DmParticipant object and participation states

Member Type Required Meaning
addr string Yes Canonical address.
name string Yes Display name (01, D-005) as last known to the hosting server. Clients MUST check it against addr as 01 specifies. When the name failed 01 §6.4 at the hosting server, or the hosting server doesn't know the participant's name yet, this is the prepared local part, as 01 §6.5 allows. (Every account has a display name, which is its prepared local part unless its holder chose another capitalization or spacing, 01 §6.3.)
kind string Yes user or bot. Unknown values are treated as bot.
inc string Yes The participant's account incarnation (05 §11.1, D-086), as last verified by the hosting server from a HomeAssertion (06) or an IdentityState (07; the server fetches one for every participant, §7.2 step 5). It never changes for a participant: a different inc for the same addr is a different account (§6.4).
state string Yes Participation state, below.
role string Yes owner (the creator, while the group has an owner, §12.1) or member in group DMs; member in 1:1 DMs. Unknown values are treated as member.
security string Yes sec of this participant as last verified by the hosting server.
ikf string or null Yes RFC 7638 thumbprint of the participant's identity key when security is secure, else null. Informative for clients, which MUST use their own pins (07).
addedBy string Yes Inviter's canonical address (equals addr for the creator).
addedAt string Yes Timestamp of the latest invitation.
joinedSeq integer Yes The first seq this participant may read (§12.5). Set when the participant is added; reset by a reopening after peer_deleted (§6.4) and by an identity change and the re-add that follows it (§11.5 item 4).
reason string or null Yes For left and removed: left, removed, declined, encryption_turned_off, account_deleted or invitation_expired. Null otherwise. Unknown values are treated as removed.
State Meaning Counts toward maxGroupDmParticipants Listed in sv_participants
reserved A secure-group add awaiting its MLS commit (§12.2). Expires after 60 s. Yes Not yet
pending Invited; the recipient hasn't accepted. dm.request has been or will be sent. Yes Yes
active Accepted, or the creator. Yes Yes
declined The recipient declined or blocked (1:1 only; in a group DM a decline removes the participant, §12.4). — (1:1) Yes (1:1)
left Left a group DM. No No
removed Removed from a group DM by another participant (§12.3) or by the hosting server, or (1:1) deleted (§6.4). No No

Unknown participation states are treated as removed.

A 1:1 DM always has both people. In a 1:1 DM both DM participants count for security (§11.1) and both are listed in sv_participants (§12.6) in every participation state except removed (which only account deletion produces, §6.4). A decline or block never removes MLS leaves and never changes sv_participants: declined only stops requests, delivery and notifications to that participant (§8.1, §8.5). If they accept or post later (§8.7), their devices are already in the group, or join it by Welcome or external commit as usual (13).

6.4 Accounts that are deleted, and reused addresses

The hosting server records each participant's incarnation (inc, §6.3). It applies this section to a participant when it receives account.deleted (05) for the participant's address with the recorded inc, and also when it verifies a HomeAssertion (06) or an IdentityState (07) for that address whose inc differs from the recorded one: the address now belongs to a different account, and the recorded participant is treated as deleted (06 §11.6, D-086).

  • Group DM: the participant becomes removed with reason account_deleted; in a secure group the removal procedure of §12.4 runs.
  • 1:1 DM: the peer becomes removed with reason account_deleted, and the DM becomes closed with reason peer_deleted. When a DM is later started again for the same dm: reference (after 01's quarantine, by either side), it reopens (§13.4) as a new conversation: both participants' joinedSeq, and both accounts' visibleFromSeq (14), are set to the seq of the reopening event; every participant other than the caller becomes pending with a new invitation; and the new account's DmParticipant carries its own inc. The reopening starts a new membership for both accounts, so under D-007 the hosting server's timeline API exposes neither the earlier plaintext nor the earlier sealed items to the new account, and neither side's earlier acceptance carries over. Clients show W2's new-account wording at the reopening point (07 §16.8, 20 §3.2).

A participant is never re-added under a different inc. The new account at the address is a stranger to every group DM (it can be added like anyone else, §12.2) and to every sv_participants list (13).

Rationale: a dm: reference names an address pair (§5.2), and an address can eventually belong to a different person. The incarnation and the reopen rule keep that stranger out of the old conversation, even at a hosting server that missed account.deleted, and stop the old conversation's acceptance from letting a stranger skip the message-request filter (§10.2).

6.5 What each caller sees

The hosting server MUST filter the Dm object and DmParticipant states it returns:

  • In a 1:1 DM, a participant sees the peer's state as active whenever it is pending or declined. Only the participant themselves sees their own true state.
  • In a group DM, every current participant sees pending participants as pending (shown as "Invited"). A participant who declined or blocked is reported to others as left with reason left. An invitation that expired (§10.6) is reported as removed with reason invitation_expired ("Invitation expired").
  • Participants in left or removed state can fetch the Dm object (so their clients can show why they lost access) but nothing in the timeline (§12.5).
  • Anyone else receives 404 core.not_found (not 403), so that probing reveals nothing.

Rationale: telling a sender that a recipient declined or blocked them invites harassment. Group participants need to know who is invited, but not who refused.

7. Creating a DM

7.1 Client procedure

To start a 1:1 DM with peer, or a group DM with participants Ps, the creator's client does the following. Steps that need a server that is down wait in the outbox (§15).

  1. Canonicalize every address (01). Refuse an address that names a channel (01's address lookup says channel) with the local message "That's a channel, not a person".
  2. Look up security. Fetch each other participant's IdentityState from their home server (GET {home}/v1/users/{local}/identity, 07) and verify it. A 404 means there is no such account: stop and tell the user. Compute the security of the new DM (§11.1). For a secure DM, record a pin for each person not yet pinned (first contact, silent, 07).
  3. Register. For a 1:1 DM, compute the rule host (§4.2) and the dm: reference (§5.2), and register them at the creator's home: POST {home}/v1/me/dms (§9.3). For a group DM, the hosting server is host_group(…) (§4.3); registration happens at step 6, after creation, because the reference comes from the hosting server.
  4. Session. If the hosting server isn't the creator's home, obtain a remote session there (06), with a DeviceProof if the device is enrolled.
  5. Secure 1:1 only: build the group first. Claim KeyPackages through the creator's home server (POST {home}/v1/keypackages/claim, 13) for every enrolled device of the peer and for the creator's own other enrolled devices. Create the MLS group (13 §10.1) with group_id sv1:<host>:<ctx>:1, the sv_participants extension listing both people with their identity-key thumbprints, and the hosting server as external sender. Build the GroupBootstrap (13 §7.4) and a first CommitSubmission (13 §7.5) that adds every claimed KeyPackage, with its Welcome. The Welcome's GroupInfo always carries ratchet_tree (13 §3.6); if the Welcome doesn't fit the dm.request, §8.3 leaves the whole Welcome out. A person for whom no KeyPackage could be claimed is still listed; their devices join later (§12.6).
  6. Create. POST {host}/v1/dms (§7.2), carrying for a secure 1:1 DM the bootstrap and commit of step 5. For a group DM, then register {host, ctx} at the home (step 3). Secure group only: the creator's device then holds the bootstrap grant (§11.4) and builds the group exactly as in step 5, with every participant listed and with group_id sv1:<host>:<ctx>:1 now that the hosting server has assigned ctx, and uploads the bootstrap together with the first commit in one POST …/mls/bootstrap request (13 §7.4, member commit), which the hosting server applies in one transaction.
  7. First message. Post the first message through 11 (plaintext content or a SealedMessage, 14). The hosting server sends dm.request when it sequences it (§8.1).

Cleaning up after a failed creation. If POST /v1/dms fails with an error whose retryable is false (for example dm.recipient_not_found, federation.blocked or dm.invalid_participants), or 11's outbox gives up on it, the client MUST delete the registration it made in step 3 (DELETE {home}/v1/me/dms/{id}, §9.3), and tells the user the conversation couldn't be started. dm.encryption_pending is retryable and keeps the registration, because the DM can start once the named people turn on encryption (§13.2).

An unenrolled device of a secure account can create an insecure DM, but not a secure one: steps 5 and 6 need the identity key. The hosting server refuses POST /v1/dms for a secure DM from an unenrolled session with 403 security.device_not_enrolled (G2).

"Add people" in a 1:1 DM starts a new group DM with the two participants plus the new people; the 1:1 DM is unchanged and its history isn't copied. Clients SHOULD pre-fill the new group with the 1:1 participants.

A client SHOULD put in communityHints (§7.2, §12.2) every community on its own community list (09) in which it has seen the recipients, up to 10. Hints only order the recipient home's checks; they never decide the outcome (§10.2).

Rationale: registering at the home first means the hosting server never creates an index entry on the creator's behalf (§9.3), and the 1:1 DM appears on the creator's other devices immediately.

7.2 POST /v1/dms

Sent to the hosting server with a home or remote session token (or Authorization: Bot).

Request body:

Member Type Required Meaning
kind string Yes direct or group.
peer string For direct The other participant's canonical address.
participants array of string For group The other initial participants' canonical addresses: at least 2, at most maxGroupDmParticipants − 1, distinct, not including the caller.
expectSecurity string Yes insecure or secure: the security the client computed (§7.1 step 2).
name string No Group DMs only. Constraints as in §6.1.
communityHints array of string No Up to 10 canonical domains of communities on the caller's community list in which it saw the recipients (§7.1). Recipient homes use them only to order their checks for the auto-accept rule (§10.2).
replaces object No { "host": domain, "ctx": ref } of the closed predecessor, when creating a successor (§13.3).
bootstrap object For direct with expectSecurity secure A GroupBootstrap (13 §7.4) for generation 1 of this DM's group. MUST be absent for group (the client can't build the group_id before the hosting server assigns ctx) and for insecure DMs.
commit object With bootstrap, whenever any KeyPackage was claimed (13 §7.4) Only with bootstrap: the first CommitSubmission (13 §7.5), epoch 0 → 1, adding the claimed devices, with its Welcome.

Processing at the hosting server, in order:

  1. Authenticate the caller; let C be its canonical address. Bots use their bot token; secure bots are treated like any secure account.
  2. Validate the body. Any address in non-canonical form fails with 400 address.non_canonical (01). A 1:1 request naming the caller, a duplicate, a group with fewer than 2 other participants, or a group request naming the caller fails with 400 dm.invalid_participants. A group exceeding the limit fails with 409 dm.too_many_participants. A bootstrap where this section forbids it fails with 400 core.invalid_request.
  3. Check federation blocks (06) for every participant's domain; a blocked domain fails with 403 federation.blocked (06).
  4. 1:1 only: if a Dm with this ctx exists here, the hosting server first compares the caller's inc (from its session, 06) and the other participant's inc (from an IdentityState no older than 300 s) with the recorded DmParticipants and applies §6.4 to any that differ; a DM that §6.4 closes this way is treated as closed below. Then, if a Dm with this ctx already exists here and isn't closed: if the caller is pending or declined, set it to active (and send dm.entry_updated, §8.6). Ignore bootstrap and commit, skip steps 5 to 11, and return 200 with the Dm. A client that sent a bootstrap and gets 200 joins the existing group as §5.3 says, or, if 13 reports that the current generation has no group yet and grants it the bootstrap (bootstrapAllowed, §11.4), bootstraps through 13. If the Dm exists and is closed, continue with step 5 and reopen it at step 11 (§13.4), unless its closedReason is banned, which fails with 409 dm.closed (it reopens only when the ban ends, §6.2).
  5. Fetch (or use cached, no older than 300 s) IdentityStates for every participant. Record each participant's inc from them (§6.3); a participant whose inc differs from a recorded one is handled by §6.4 first. An address with no account fails with 404 dm.recipient_not_found, data.addr naming it.
  6. Evaluate the hosting rule (§4.4); on mismatch, 409 dm.wrong_host.
  7. Compute security (§11.1). If it differs from expectSecurity, fail with 409 dm.security_mismatch; data gives the computed security and each participant's sec, so the client can refetch exactly the IdentityStates it disagrees about.
  8. If the computed security is secure and the caller's session isn't from an enrolled device, fail with 403 security.device_not_enrolled.
  9. If the computed security is insecure and this server is a secure server, fail with 409 dm.encryption_pending (§13.2), data.waitingFor listing the insecure participants.
  10. If the computed security is secure, the kind is direct and the DM is being created (not reopened), validate bootstrap (and commit, if present) exactly as 13 §7.4 and §7.5 specify, including the DM commit policy of §12.6. A missing bootstrap fails with 400 core.invalid_request; a failure of 13's checks fails with 13's error.
  11. Create the Dm (or, for a closed 1:1 DM, reopen it, §13.4): state active, security as computed, groupGeneration 0, the caller active (role owner in a group), every other participant pending with addedBy = caller, joinedSeq = 1. Sequence dm.created at seq 1. For a secure 1:1 DM, apply the bootstrap and commit of step 10 in the same transaction: groupGeneration becomes 1, and 13's handshake events follow dm.created. Return 201 with the Dm. A reopening instead follows §13.4: it ignores bootstrap and commit (a secure reopened DM gets its next generation through upgrading, §11.4) and returns 200.

POST /v1/dms for a 1:1 DM is idempotent on ctx (step 4). For a group DM the client SHOULD send an Idempotency-Key (03); a retry with the same key returns the group created by the first request.

Response (201 or 200): the Dm object (§6.1).

A newly created secure group DM has groupGeneration 0 until its creator's device bootstraps it (§7.1 step 6). Until then the creator holds the bootstrap grant (§11.4), and SealedMessages fail with 13's mls.group_not_found.

7.3 Example: an insecure 1:1 DM

Bob (bob@b.com, insecure) writes to Alice (alice@a.com, secure); neither home is a secure server. The rule host is a.com (alice@a.com < bob@b.com). Bob's client registers the DM at b.com, opens a remote session at a.com, and sends:

POST https://chat.a.com/server/v1/dms
Authorization: Bearer rs_8fK2…

{ "kind": "direct", "peer": "alice@a.com", "expectSecurity": "insecure" }
HTTP/1.1 201 Created
Content-Type: application/json

{
  "ctx": "dm:ZlXkbx0pnzfHlpphMcdMEA",
  "kind": "direct",
  "host": "a.com",
  "security": "insecure",
  "state": "active",
  "closedReason": null,
  "participants": [
    { "addr": "alice@a.com", "name": "Alice", "kind": "user", "inc": "sLGys7S1tre4ubq7vL2-vw", "state": "active", "role": "member",
      "security": "secure", "ikf": "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs",
      "addedBy": "bob@b.com", "addedAt": "2026-12-04T18:30:00.120Z", "joinedSeq": 1, "reason": null },
    { "addr": "bob@b.com", "name": "Bob", "kind": "user", "inc": "MDEyMzQ1Njc4OTo7PD0-Pw", "state": "active", "role": "member",
      "security": "insecure", "ikf": null,
      "addedBy": "bob@b.com", "addedAt": "2026-12-04T18:30:00.120Z", "joinedSeq": 1, "reason": null }
  ],
  "owner": null,
  "name": null,
  "createdBy": "bob@b.com",
  "createdAt": "2026-12-04T18:30:00.120Z",
  "groupGeneration": 0,
  "securitySinceSeq": 1,
  "lastSeq": 1,
  "replaces": null
}

(The dm: value is computed as in §5.2 from alice@a.com and bob@b.com. Alice's true state is pending, but Bob sees active, §6.5.)

7.4 Example: a secure group DM

POST https://chat.a.com/server/v1/dms
Authorization: Bearer hs_Qm1…
Idempotency-Key: 6f1c2a9e-weekend

{ "kind": "group",
  "participants": ["carol@c.com", "dan@d.com"],
  "expectSecurity": "secure",
  "name": "Weekend trip",
  "communityHints": ["sloppyvoice.com"] }

The response is a Dm with ctx gdm:01938f41-5a6b-7c8d-9e0f-a1b2c3d4e5f6, security secure, owner alice@a.com, and groupGeneration 0. Alice's device holds the bootstrap grant (§11.4). It claims KeyPackages, creates group sv1:a.com:gdm:01938f41-5a6b-7c8d-9e0f-a1b2c3d4e5f6:1, uploads the bootstrap with its first commit in one request (13 §7.4), after which groupGeneration is 1, and posts the first SealedMessage (14).

For a secure 1:1 DM the same client builds the group before the request and sends it in the same call, as 13 §19.4 shows:

POST https://chat.a.com/server/v1/dms
Authorization: Bearer hs_Qm1…

{ "kind": "direct", "peer": "dan@d.com", "expectSecurity": "secure",
  "bootstrap": { "generation": 1, "groupInfo": "AAEABAABAAE0c3YxOmEuY29tOmRtOktCWGZh…", "ekid": "Xc0mY2n4QbE" },
  "commit": { "epoch": 0, "commit": "AAEAAQ…", "groupInfo": "AAEABAABAAE0c3Yx…",
              "ekid": "q83vEjRWeJA", "welcome": "AAEAAwABAAEAQ…" } }

7.5 GET /v1/dms/{ctx} and PATCH /v1/dms/{ctx}

GET returns the Dm object, filtered per §6.5. It requires a session of a participant.

PATCH changes the group's name. Body member:

Member Who may change it Effect
name Any active participant Sets or clears (null) the group's name.

Errors: a 1:1 DM, 409 dm.not_group; a caller who isn't active, 403 dm.not_participant; a DM that isn't active, 409 dm.closed, dm.upgrade_in_progress or dm.encryption_pending as appropriate. On success the hosting server emits dm.settings_changed and sends dm.entry_updated to every current participant's home (§8.6), and returns the Dm.

8. First contact and server-to-server events

8.1 When the hosting server sends dm.request

The hosting server sends dm.request to a participant's home server (or processes it locally when the home is itself, 00 HP-9) for each invitation of a participant in state pending:

  • At creation: when the first content event of the DM is sequenced. A DM in which nothing is ever posted produces no request.
  • At a later add to a group DM: as soon as the participant becomes pending (§12.2).
  • Further batches: while the participant stays pending, each later durable event of the DM is forwarded in a further batch of the same invitation, coalesced to at most one batch per 5 s, until the cumulative size reaches the limit (§8.3). The last batch that hits the limit carries truncated: true; nothing more is forwarded.

Batch 1 of an invitation starts at the event that created the invitation: dm.created for the initial participants, the participant's own dm.participant_added for a later add, and, for a new invitation of a 1:1 participant after a decline, the content event that started it. Earlier events aren't forwarded; the recipient fetches them after Accept through 11 and 14, as far as the history rules allow (§12.5).

The hosting server MUST NOT send notify.event (19) for a pending participant, including call_ring (§14.1). The recipient home creates the notification itself (§8.4).

A declined 1:1 participant receives no request for 30 days after the decline (§10.6). After that, the next content event starts a new invitation (new invitationId, batch 1).

Expiry at the hosting server. A participant still pending 90 days after the addedAt of their latest invitation stops receiving batches. In a group DM the hosting server then removes them (§12.4) with reason invitation_expired; in a 1:1 DM they stay pending until the next content event starts a new invitation. This keeps invitations that the recipient's home dropped or expired silently (§10.6) from filling a group for ever.

Rationale: requests go to the home server because the recipient trusts it and is already connected to it. Sending only at the first content event avoids empty requests from DMs that were opened and abandoned.

8.2 dm.request payload

S2S event type dm.request, sent from the hosting server to the recipient home through 06's event delivery. 06 owns the S2S envelope, batching, retries and deduplication; this table is the payload d.

Member Type Required Meaning
invitationId string Yes UUIDv7 assigned by the hosting server to this invitation.
batch integer Yes 1 for the first batch, then 2, 3, …
truncated boolean Yes True when the size limit stopped further events.
ctx string Yes Context reference.
kind string Yes direct or group.
host string Yes Canonical domain of the hosting server. MUST equal the S2S token's iss (06).
recipient string Yes Canonical address of the invited participant, homed at the receiver.
recipientInc string Yes The recipient's incarnation as the hosting server recorded it (§6.3).
inviter object Yes { "addr", "name", "kind", "inc" } of the inviter: the sender of the request.
createdBy string Yes The creator's canonical address (§6.1), so that the recipient home can check host legitimacy (§8.4 step 3) without relying on events that may be truncated.
participants array Yes Current participants as { "addr", "name", "kind", "inc", "state", "security" }, filtered as §6.5 (the recipient's own entry shows pending).
security string Yes The DM's security mode at the time of this batch.
state string Yes The DM's state (§6.2).
name string or null Yes Group name, or null.
replaces object or null Yes The predecessor, when this DM is a successor (§13.3).
communityHints array of string No Copied from the creator's or adder's request (§7.2, §12.2), at most 10 (§10.2). Batch 1 only.
identityStates array of string No IdentityState JWSs (07) the hosting server holds for secure participants, each at most 24 h old. Batch 1, and any batch after a participant's identity changed.
welcome string or null Yes Secure DMs: base64url MLSMessage carrying the Welcome that added the recipient's devices (13), in the batch that first follows it; otherwise null.
events array Yes Durable events of the DM, as event envelopes (00 §7.4) with their ctx and seq, in seq order, from the event that created the invitation (batch 1, §8.1) or after the previous batch. Insecure DMs: dm.* events and message.created with plaintext content (11), except as the next paragraph says. Secure DMs: dm.* events, 13's handshake events that the recipient needs after the Welcome, and message.created with sealed (14).

No plaintext to secure servers. When the recipient home is a secure server (02 secure: true) and the DM's security is insecure, the hosting server MUST send every message.created event without its content member and with "contentWithheld": true added to d. A recipient home that is a secure server MUST NOT store plaintext content of any DM: it MUST remove a content member that arrives anyway, before storing, and builds no notification preview (19). Such a request shows who is writing but not what (§10.4); the messages appear after Accept, fetched from the hosting server (SM-10).

8.3 Size

The request size of a batch is the byte length of the JSON serialization of its d object as sent. The sum of the request sizes of all batches of one invitation MUST NOT exceed maxDmRequestBytes: 64 KiB by default, with a floor of 64 KiB (00 §7.12). A hosting server MUST use the smaller of its own limit and the recipient home's advertised limit.

When the next event doesn't fit, the hosting server sends the batch without it and with truncated: true. Batch 1 is always sent, even if it carries no events, so that the request exists. In a secure DM the welcome has priority over events: if the Welcome and the first event don't both fit, batch 1 carries the Welcome alone. If the Welcome alone doesn't fit, batch 1 carries welcome: null and truncated: true, and the recipient's client gets the Welcome from the hosting server after Accept (13). Independently of maxDmRequestBytes, every serialized S2S event, envelope included, MUST fit the recipient home's maxFederationEventBytes (06 §9.2: default and floor 128 KiB).

identityStates count toward the request size like every other member. In batch 1 the hosting server includes them after the Welcome and before any event: the inviter's state first, then the other secure participants' states in byte-wise order of their canonical addresses, as many as fit. A state that doesn't fit is left out whole, never cut. A recipient's client that lacks a state it needs for the Welcome defers the Welcome until after Accept (07 §14.7).

Every Welcome carries the ratchet tree (13 §3.6). When the Welcome doesn't fit, batch 1 carries welcome: null and truncated: true as above; the request then shows who wrote and who is in the group, and the messages appear after Accept, when the recipient fetches the Welcome (13 §7.9). See Open question 1.

Rationale: 64 KiB is enough for a 1:1 Welcome and several messages, and bounds what an unknown sender can store on a stranger's home server.

8.4 Processing at the recipient home

dm.request is processed through 06's ingest (06 §9.4); each outcome below is an EventResult. On each dm.request the recipient home MUST, in order:

  1. Verify the S2S request (06) and the subject binding of §16.3: host equals the token's iss, and recipient is homed here. A failure is rejected with federation.event_not_authorized (06).
  2. Check that recipient is a local account that isn't deleted and whose inc equals recipientInc (an invitation made for an earlier account at that address is never delivered to a later one, D-086). Otherwise answer ignored (06 §10.1: a receiver doesn't reveal which accounts exist). The hosting server learns of deletions through account.deleted (05), and an invitation nobody answers expires (§8.1).
  3. Check host legitimacy. For direct: participants holds exactly two addresses including recipient; ctx equals the dm: reference recomputed from them (§5.2); and host is one of the two participants' domains. For group: host is domain(createdBy) or the domain of a listed participant. Otherwise the event is rejected with dm.host_mismatch and discarded. (A recipient home can't verify every input of the group rule; §10.2 limits what a group host can achieve, §20.)
  4. Deduplication on 06's (iss, event id) happens in 06's ingest. In addition, a batch whose (host, ctx, invitationId, batch) was already stored is accepted and ignored.
  5. If the recipient's block list (§9.5) contains inviter.addr: accepted, store nothing, and send dm.response with action: "block" once per invitation.
  6. If an index entry for (host, ctx) exists in state declined and its declinedAt (§9.1) is less than 30 days ago: accepted, store nothing, and send dm.response with action: "decline" once per invitation.
  7. Verify each JWS in identityStates (07: signature by the issuing home server's key, sub, exp, ver not lower than any cached). Drop invalid ones; never fail the request because of them. If any is older than 1 h, the home SHOULD fetch a fresh one from the participant's home server. When the batch carries a welcome, the home also records, for the DmRequest's serverKeys (§10.1), the mls-external-sender keys that its pin or validated metadata for host lists, with their statuses (02 §10.1, §11.6 step 3). It has just verified host's S2S token (step 1), so it holds that metadata; it fetches nothing extra.
  8. Enforce the per-sender, per-origin and per-recipient limits of §10.6. An invitation over a limit is accepted and dropped silently: the sender sees no difference (10 §12.1).
  9. If this server is a secure server and the DM is insecure, remove any content member from the events (§8.2).
  10. On batch 1: find or create the DmIndexEntry for (host, ctx) (§9.1) and evaluate the auto-accept rule (§10.2).
    • Accepted automatically: set the entry to active, store the events with the entry so the client can show them at once, send dm.response with action: "accept", and create a notification record of kind dm_message (19).
    • Otherwise: create a DmRequest in state pending (§10.1), set the entry to requested, and create a notification record of kind dm_request (19) if the user's requestNotifications setting allows. A dm_request record never carries a content preview, in any mode; the lock screen shows only who is asking, with the full address (19, §10.7). When at least 3 different local accounts have blocked inviter.addr within 7 days (10 §12.4), the request is listed as usual, but its dm_request notification record is created silent (19 §6.5).
  11. On later batches: append the events to the DmRequest (or, for an auto-accepted entry, keep them with the entry until the user's devices have fetched them, at most 7 days). A dm.call_logged event with phase: "started" in a batch for a requested entry is shown as a missed call in the request and never rings (§14.1).
  12. Emit dm.index_updated and, for requests, dm.request_received on the user's me stream (§16.2).

Rationale: the home server verifies IdentityStates and host legitimacy because it can run discovery and fetch keys; the recipient's client then needs to contact nobody else before Accept (D-049).

8.5 dm.response

S2S event type dm.response, sent from a recipient home to the hosting server.

Member Type Required Meaning
ctx string Yes Context reference.
recipient string Yes Canonical address of the responding participant; MUST be homed at the sender.
recipientInc string Yes The responding account's incarnation (05 §11.1).
invitationId string or null Yes The invitation answered; null for unblock and for responses not tied to one invitation. Informative.
action string Yes accept, decline, block or unblock. Unknown values are ignored.
at string Yes When the user (or the auto-accept rule) acted.

The hosting server MUST check the subject binding of §16.3 (recipient's domain equals the S2S token's iss); a dm.response for a context it doesn't host is ignored. If recipientInc differs from the recorded inc of that participant, the hosting server first applies §6.4 (a later account at the address) and then answers ignored, because that account isn't a participant. Responses are applied last-writer-wins per (ctx, recipient): the hosting server keeps the at of the last response it applied and ignores (as accepted, without effect) a response whose at is older. Deduplication is only 06's (iss, event id), so a block, an unblock and a second block are three distinct responses that all take effect. Then:

action 1:1 DM Group DM
accept Participant pending or declined → active. pending → active; emit dm.participant_updated.
decline Participant → declined. Stop requests for 30 days (§8.1). Don't tell the peer (§6.5). Remove the participant (§12.4) with reason declined, shown to others as left.
block As decline, and additionally: send the blocked side no call_ring for this participant (§14), and no notify.event for this participant, until unblock. As decline.
unblock Clear the block flags. The participant stays declined until it accepts (or posts, §8.7). No effect.

Applying the same action twice has no further effect.

8.6 dm.entry_updated

S2S event type dm.entry_updated, sent from the hosting server to a participant's home server, so that the participant's DM index stays correct while their devices aren't connected to the hosting server. One event concerns one participant (recipient).

Member Type Required Meaning
ctx string Yes Context reference.
recipient string Yes Canonical address of the participant, homed at the receiver.
recipientInc string Yes The participant's incarnation as recorded by the hosting server (§6.3).
kind, security, state, closedReason, name, owner, replaces as in §6.1 Yes Current values.
participants array Yes As in §8.2.
yourState string Yes The recipient's own participation state.
yourReason string or null Yes The recipient's own reason, if any.
lastSeq integer Yes The DM's lastSeq.
lastActivityAt string or null Yes Timestamp of the latest content event, or null.

The hosting server sends it to the home of every current participant (and of a participant who has just left or been removed) when the DM is created, and on every change of security, state, name, owner, the participant list or the recipient's own state. It also sends it as an activity hint after content events, coalesced to at most one per DM per participant per 60 s, and only for participants in state active.

A home server MUST apply dm.entry_updated only to an existing index entry for (host, ctx) whose host equals the token's iss, and only when recipientInc equals the recipient's inc (D-086). It MUST answer ignored for an unknown entry: a hosting server can't create index entries, only dm.request (filtered by §10.2) and the user's own registration (§9.3) can. It applies only state newer than what it holds, compared by lastSeq, then by the event's ts.

8.7 Implicit acceptance

If a pending or declined participant posts any entry (11), starts or joins a call, subscribes to the DM's context or reads its timeline (03, 11), or creates the 1:1 DM (§7.2 step 4), the hosting server sets them to active as if it had received dm.response accept. This covers the race where the client acts before its home server's dm.response arrives. A client MUST NOT do any of these things before its user accepted (§10.4).

8.8 Example: dm.request for a secure 1:1 DM

{
  "id": "01938f41-8d9e-7fa0-8132-d4e5f6071829",
  "t": "dm.request",
  "ts": "2026-12-04T18:40:03.400Z",
  "orderKey": "dm:KBXfagPoLlQyKu3QOiLfgw",
  "d": {
    "invitationId": "01938f41-6b7c-7d8e-af10-b2c3d4e5f607",
    "batch": 1,
    "truncated": false,
    "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw",
    "kind": "direct",
    "host": "a.com",
    "recipient": "dan@d.com",
    "recipientInc": "8PHy8_T19vf4-fr7_P3-_w",
    "inviter": { "addr": "alice@a.com", "name": "Alice", "kind": "user", "inc": "sLGys7S1tre4ubq7vL2-vw" },
    "createdBy": "alice@a.com",
    "participants": [
      { "addr": "alice@a.com", "name": "Alice", "kind": "user", "inc": "sLGys7S1tre4ubq7vL2-vw", "state": "active", "security": "secure" },
      { "addr": "dan@d.com", "name": "Dan", "kind": "user", "inc": "8PHy8_T19vf4-fr7_P3-_w", "state": "pending", "security": "secure" }
    ],
    "security": "secure",
    "state": "active",
    "name": null,
    "replaces": null,
    "communityHints": [],
    "identityStates": ["eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkc3RhdGUrand0Iiwia2lkIjoiYS5jb20jMjAyNi0xMmEifQ.eyJpc3MiOiJhLmNvbSIs…"],
    "welcome": "AAEAAwABAAEAQ…",
    "events": [
      { "v": 1, "t": "dm.created", "id": "01938f41-7a10-7b20-8c30-d40e50f60718",
        "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw", "seq": 1, "ts": "2026-12-04T18:40:02.004Z",
        "d": { "kind": "direct", "createdBy": "alice@a.com", "security": "secure",
               "participants": ["alice@a.com", "dan@d.com"], "name": null, "replaces": null } },
      { "v": 1, "t": "message.created", "id": "01938f41-7c90-7da0-9eb0-f0c1d2e3f405",
        "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw", "seq": 4, "ts": "2026-12-04T18:40:03.310Z",
        "d": { "mid": "01938f41-7c8d-7e9f-b021-c3d4e5f60718", "carrier": "sealed",
               "sender": { "addr": "alice@a.com", "name": "Alice", "did": "q2bS9xVg3m0yJpQe1vT0Aw" },
               "createdAt": "2026-12-04T18:40:03.310Z",
               "sealed": { "v": 1, "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw", "gen": 1,
                           "mid": "01938f41-7c8d-7e9f-b021-c3d4e5f60718", "epoch": 1,
                           "ekid": "q83vEjRWeJA", "kind": "message", "did": "q2bS9xVg3m0yJpQe1vT0Aw",
                           "nonce": "3q2-7wAAAAAAAAAA", "kc": "mZ8rQ1cX0vB7nT4yL2kP9w",
                           "ct": "Vt1yQm9…", "sig": "Jk3b0xW…" },
               "mentions": [], "mentionAll": false, "editedAt": null, "deleted": null,
               "reactions": [], "updatedSeq": 4 } }
    ]
  }
}

(Sequence numbers 2 and 3 are 13's handshake events for the group's creation; they are omitted here for brevity but a real batch carries every durable event in order.)

For an insecure DM the same shape carries "security": "insecure", "welcome": null, no identityStates, and message.created events with plaintext content, or with "contentWithheld": true instead when the recipient home is a secure server (§8.2).

9. The DM index

9.1 DmIndexEntry object

The home server keeps one DmIndexEntry per (account, hosting server, context reference). The pair (host, ctx) is the key: a 1:1 DM and its successor share ctx but differ in host (§13).

Member Type Required Meaning
id string Yes UUIDv7 assigned by the home server.
host string Yes Canonical domain of the hosting server.
ctx string Yes Context reference.
kind string Yes direct or group.
state string Yes Entry state (§9.2). Unknown values are treated as left.
origin string Yes outgoing (registered by the user, §9.3) or incoming (from a dm.request).
participants array Yes As in §8.2, from the latest dm.request or dm.entry_updated; empty until the first one arrives.
security string or null Yes Last known security mode; null until known.
dmState string or null Yes Last known Dm state (§6.2).
closedReason string or null Yes As in §6.1.
name string or null Yes Group name.
inviter string or null Yes Canonical address of the inviter for incoming entries.
requestId string or null Yes The DmRequest for this entry, if one was filed (§10.1).
autoAccept string or null Yes Why the entry was accepted automatically: outgoing, everyone, accepted_dm, shared_community or successor; null if it wasn't.
hidden boolean Yes The user hid the entry from the DM list. Default false.
declinedAt string or null Yes When the user declined (or blocked) this entry, starting the 30-day quiet period (§8.4 step 6); null otherwise, and set back to null by an unblock (§9.5).
successor object or null Yes { "host", "ctx" } of the successor once known (§13.3).
replaces object or null Yes As in §6.1.
lastSeq integer Yes From the latest dm.entry_updated; 0 if unknown.
lastActivityAt string or null Yes From the latest dm.entry_updated or dm.request.
createdAt, updatedAt string Yes Timestamps.
pendingEvents array No Events from an auto-accepted dm.request that devices haven't fetched yet (§8.4 steps 10 and 11). Returned by GET /v1/me/dms/{id} only.

9.2 Entry states

State Meaning
requested A message request is waiting (§10).
active The user takes part: accepted, created or auto-accepted.
declined The user declined. Kept for 30 days after declinedAt to suppress repeat requests, then deleted (with dm.index_removed). An unblocked entry (§9.5) is declined with declinedAt null, and is kept until the user deletes it or a new request arrives.
blocked The user blocked the inviter of this 1:1 DM.
left The user left or was removed from a group DM, or the invitation was withdrawn.
closed The hosting server closed a DM the user had accepted (§13). An entry still in requested goes to left instead.

The home server updates state from the user's actions and from dm.entry_updated: yourState left or removed → left; Dm state closed → closed for an active entry and left for a requested one (whose request becomes withdrawn). An entry with hidden: true is unhidden automatically when a dm.entry_updated reports a lastActivityAt later than the moment it was hidden.

Every hosting server named in an entry, in any state, is part of the account's audiences for revocation fan-out (06 §11.1, source dm_index): identity changes, device revocations and account.deleted (05) reach it, until the entry is deleted.

9.3 Endpoints

All require a home session of the account (Authorization: Bearer) or the bot's token. Collections use cursor pagination (00 §7.10).

Method and path Purpose
GET /v1/me/dms List entries. Query: state (comma-separated; default active,requested), kind, includeHidden (default false), cursor, limit (1–100, default 50). Ordered by lastActivityAt descending, then id.
GET /v1/me/dms/{id} One entry, with pendingEvents.
POST /v1/me/dms Register an outgoing DM: body { "host", "ctx", "kind" }. Creates an entry in state active with origin: "outgoing", or, if an entry for (host, ctx) exists, sets it to active (accepting any pending request, which sends dm.response accept). Idempotent. Returns 201 (created) or 200 with the entry.
PATCH /v1/me/dms/{id} Body { "hidden": boolean }.
DELETE /v1/me/dms/{id} Delete an entry in state declined, left or closed, or an outgoing entry whose lastSeq is 0 (registered, but never confirmed by a dm.entry_updated; §7.1 uses this after a failed creation). Another entry fails with 409 dm.entry_active: the user hides or blocks instead. Returns 204 and emits dm.index_removed.

POST /v1/me/dms checks only syntax: ctx matches §5.1 and host is a valid domain. It doesn't contact the hosting server. Every change to an entry emits dm.index_updated on the account's me stream (§16.2).

Rationale: an index entry exists only because the user registered it or because a request passed the user's own filter. A hosting server can therefore never plant conversations in someone's DM list.

Example entry:

{
  "id": "01938f42-0c1d-7e2f-8a3b-4c5d6e7f8091",
  "host": "a.com",
  "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw",
  "kind": "direct",
  "state": "requested",
  "origin": "incoming",
  "participants": [
    { "addr": "alice@a.com", "name": "Alice", "kind": "user", "inc": "sLGys7S1tre4ubq7vL2-vw", "state": "active", "security": "secure" },
    { "addr": "dan@d.com", "name": "Dan", "kind": "user", "inc": "8PHy8_T19vf4-fr7_P3-_w", "state": "pending", "security": "secure" }
  ],
  "security": "secure",
  "dmState": "active",
  "closedReason": null,
  "name": null,
  "inviter": "alice@a.com",
  "requestId": "01938f42-1d2e-7f30-9b4c-5d6e7f809102",
  "autoAccept": null,
  "hidden": false,
  "declinedAt": null,
  "successor": null,
  "replaces": null,
  "lastSeq": 4,
  "lastActivityAt": "2026-12-04T18:40:03.310Z",
  "createdAt": "2026-12-04T18:40:04.002Z",
  "updatedAt": "2026-12-04T18:40:04.002Z"
}

9.4 DmSettings

GET /v1/me/dms/settings returns, and PUT /v1/me/dms/settings replaces, the account's DmSettings:

Member Type Default Meaning
autoAccept string contacts_and_communities contacts_and_communities: rules (b)–(e) of §10.2; contacts_only: rules (b)–(d), so shared communities don't count; everyone: rule (a), accept every request not blocked. Unknown values are treated as the default.
requestNotifications boolean true Whether a new message request creates a notification record (19).

Every change emits dm.settings_updated on the account's me stream (§16.2), so the user's other devices update.

Clients SHOULD show only one control for autoAccept, worded as "Who can message you directly: people you know and people in your communities (recommended) / only people you know / anyone".

9.5 Blocks

A DmBlock is { "addr": canonical address, "createdAt": timestamp }. An account has at most 10,000.

Method and path Purpose
GET /v1/me/dms/blocks List blocks (cursor pagination).
PUT /v1/me/dms/blocks/{addr} Block an address (canonical, percent-encoded). Idempotent; 200 with the DmBlock.
DELETE /v1/me/dms/blocks/{addr} Unblock; 204.

Effects of a block on address X:

  • New dm.request with inviter X is dropped silently (§8.4 step 5).
  • Every 1:1 index entry with X goes to state blocked; any pending request from X becomes blocked; the home sends dm.response block for each to its hosting server.
  • Group DMs that both are in are unaffected at the protocol level. Clients SHOULD collapse X's messages there behind "Message from someone you blocked".

Unblocking sends dm.response unblock for each blocked 1:1 entry, sets the entry back to declined with declinedAt null, so no quiet period applies, and lets later requests through.

Every block and unblock emits dm.block_updated on the account's me stream (§16.2), together with dm.index_updated for each entry it changes.

Blocks are personal and apply to DMs only. Community bans are 10's; federation blocks are 06's.

10. Message requests

10.1 DmRequest object

Member Type Required Meaning
id string Yes UUIDv7 assigned by the home server.
entryId string Yes The DmIndexEntry.
host, ctx, kind, security, name, replaces as in §8.2 Yes From the latest batch.
inviter object Yes { "addr", "name", "kind", "inc" }.
participants array Yes As in §8.2.
state string Yes pending, accepted, declined, blocked, expired or withdrawn. Unknown values are treated as withdrawn.
createdBy string Yes As in §8.2.
events array Yes All events received in every batch, in seq order (without plaintext content when the home is a secure server, §8.2).
welcome string or null Yes As in §8.2.
identityStates array of string Yes Verified IdentityStates (§8.4 step 7).
serverKeys object Yes Server keys the client needs before Accept (D-049), keyed by canonical domain; each value is an array of ServerKey objects (02 §11.1, with their purpose and status). It holds (a) for each domain that issued one of identityStates, the sign keys the home server used to verify it; and (b) for a secure DM whose request carries a welcome, under host, the hosting server's mls-external-sender keys as the home server's pin or validated metadata for host listed them when it stored the batch carrying that welcome (§8.4 step 7). An empty object when there are none. The client verifies the IdentityStates (07 §7.4 step 6) and checks the Welcome's external sender (13 §6.2 item 2) with these keys, or with keys it already holds, without contacting those servers (§10.4).
truncated boolean Yes True when more events exist than the request carries.
receivedAt, updatedAt string Yes Timestamps.
expiresAt string Yes receivedAt + 90 days.

A request becomes withdrawn when a dm.entry_updated says the recipient is no longer a current participant (for example another participant removed them before they answered, or the invitation expired at the hosting server, §8.1), or the DM closed. Withdrawn and expired requests disappear from the request list, and the entry goes to left.

10.2 The auto-accept rule

When batch 1 of an invitation arrives and the inviter isn't blocked, the recipient home accepts it automatically if any of these holds, checked in this order. S is the inviter, identified by inviter.addr and inviter.inc together: a participant, member or predecessor participant counts as S only when both its address and its inc equal the inviter's, so an earlier account at the same address never counts (D-086). R is the recipient.

# Condition autoAccept value Allowed by setting
(a) R's autoAccept setting is everyone. everyone everyone
(b) R has an entry for (host, ctx) with origin: "outgoing" and state active: R started this DM too (§5.3). outgoing all
(c) replaces names an entry of R's in state closed (so R had accepted it and its hosting server reported it closed, §9.2), and S was a participant of that predecessor. successor all
(d) R has an entry in state active for a DM (1:1 or group) in which S is a current participant according to the entry's latest participants. accepted_dm all
(e) S shares a community with R: some community K on R's community list (09, /v1/me/communities, membership active) has S as an active member, and K has at most 200 members. shared_community contacts_and_communities, everyone

Group requests from another server's user. For a group request, rules (c), (d) and (e) apply only when domain(S) equals host, that is, when the hosting server vouches for its own user, as a channel's server does. Otherwise, whatever the setting except everyone, the request is filed as a message request, and the card says which server it came through ("via host", §10.4). A 1:1 request needs no such condition: §8.4 step 3 already ties a 1:1 host to one of the two people's own home servers.

Checking (e). The candidates are R's home server's own community, if R is a member, then the communities on R's community list: first those named in communityHints, then the others in the list's order (09 position). At most 10 candidates are checked. A candidate whose memberCount (09, from its public Community object, cached 24 h) exceeds 200 is skipped. For the home's own community the check is local. For a remote community K, the home server asks K with the membership check of 09 §5.2 (on behalf of R) whether S is an active member. It sends R's inc as onBehalfOfInc and counts a result as a member only when its inc equals inviter.inc. Each check has a 5 s timeout; a timeout or error counts as "not shared". Answers are cached as 09 §5.2 allows (positive 1 h, negative 10 min) per (K, S). The home server MUST NOT consult a community that isn't on R's list.

If none holds, the DM becomes a message request. The rule is never evaluated again for the same invitation, except that registering the DM as outgoing (§9.3) or accepting it resolves the request.

Rationale: this is D-049's rule ("shares a community on the recipient's list, or they have an accepted DM") made checkable and deterministic: the outcome depends on R's list, not on whether the sender's client sent hints. Hints only decide which communities are checked first. (b) and (c) cover cases where the user has already shown they want the conversation. The group condition stops a server from inventing a group in which a contact of R's on another server appears as the inviter, which would otherwise pass (d) or (e).

Proposed decision: a shared community counts for auto-accept only if it has at most 200 members. Rationale: under D-068 every account on a large public server is a member of its community, so without a size limit the shared-community rule would let any of its users, and any remote member, message every other user without a request, which is exactly where first-contact spam comes from. Small communities, where people do know each other, keep the convenience.

10.3 Endpoints

Home session required.

Method and path Purpose
GET /v1/me/dm-requests List requests. Query: state (default pending), cursor, limit. Newest first. The list items omit events and welcome and instead carry preview: the first event's envelope, or null.
GET /v1/me/dm-requests/{id} The full DmRequest.
POST /v1/me/dm-requests/{id}/accept Accept. The request becomes accepted, the entry active, and the home sends dm.response accept. Returns the DmIndexEntry.
POST /v1/me/dm-requests/{id}/decline Decline. The request becomes declined, the entry declined with declinedAt now, and the home sends dm.response decline. Returns 204.
POST /v1/me/dm-requests/{id}/block Decline and block inviter.addr (§9.5). Returns 204. This is the block half of "Report and block"; the report goes to the user's own home server through 10's message-request report path (10), never to the hosting server.

Acting on a request that isn't pending fails with 409 dm.request_not_pending, data.state giving its state. Every change emits dm.request_resolved and dm.index_updated on the user's me stream, so the user's other devices update.

10.4 Client behaviour before Accept

Before the user accepts, the recipient's client MUST NOT contact the hosting server, the inviter's home server, or any other server chosen by the sender. It talks only to its own home server (D-049). In particular it MUST NOT:

  • open a session or WebSocket at the hosting server, or post anything there, including read state, typing, epoch acknowledgements (13) or history shares (14);
  • download attachments, thumbnails or avatars, or fetch link previews;
  • fetch IdentityStates, profiles or ServerMetadata of the participants' servers;
  • accept or join a call.

It renders the request from the DmRequest:

  • Who: the inviter's display name and full display form, domain included (01 §6.6, §4.4 rule 3; the domain is always shown in requests, D-031), a bot badge for kind: "bot", and for group DMs the name and participant list. For a group request whose inviter isn't homed at the hosting server (§10.2), the card also says "via host". Avatars are replaced by initials.
  • Security: for a secure DM, the client verifies the identityStates itself (07 §14.7), with the serverKeys its home server relays (§10.1) or keys it already holds, and checks them, and the Welcome's leaves, against pins it already holds, for display only. It creates no pin before Accept (07 §14.7). A key that differs from an existing pin goes through 07's W2 rules. It then processes welcome locally when the request carries one (§8.3): it checks the group's external sender against the hosting server's mls-external-sender keys relayed in serverKeys (13 §6.2 item 2), and runs the DM Authentication Service checks of 07 on every leaf. If an IdentityState it needs is missing or not fresh enough to admit a leaf, or no relayed or already-held key confirms the external sender, it defers the Welcome until after Accept (07 §14.7, 13 §6.2 item 2); before Accept it never rejects a Welcome for either reason. It shows the closed lock only when it holds the group state (SM-12). For an insecure DM it shows the open lock if the user is secure, plus W7 (1:1) or W3 (group) as §11.6 says.
  • Content: decrypted or plaintext messages, rendered without any remote fetch. Attachments appear as placeholders ("Accept to see this file"). Messages marked contentWithheld (§8.2) appear as "Accept to see this message". A dm.call_logged start appears as a missed call. When truncated is true, a final line says there are more messages after Accept.
  • Actions: Accept, Decline, Block, and Report and block, which reports to the user's own home server through 10's message-request path and blocks through §10.3.

Requests from the same inviter are grouped. The request list is a separate tab ("Message requests"), never interleaved with accepted conversations.

10.5 After Accept

  1. The client obtains a remote session at the hosting server (06), subscribes to the context, and resumes from the highest seq it holds from the request (03).
  2. It refreshes the participants' IdentityStates from their home servers itself, as 07 does for any DM. It pins silently every participant it has no pin for (07 §16.2). A key that differs from an existing pin is a key change: 07's W2 rules apply (W2 in this DM, and for a verified contact sending is blocked until "Accept new key"). Messages already shown stay shown.
  3. If the request was truncated, welcome was null, or the client deferred the Welcome, it fetches the Welcome (13 §7.9) and handshakes from the hosting server (13), and the missing events, including any withheld content (§8.2), through 11's timeline API. If it processed the Welcome before Accept, it repeats the external-sender check of 13 §6.2 item 2 against the hosting server's own ServerMetadata once it has caught up with the group (13 §10.3 item 4).
  4. In a secure DM it appends the history keys it learned to its key archive (14, 08), so the user's other devices can read the conversation.
  5. The user's other devices learn of the acceptance from dm.index_updated. Each first fetches its own pending Welcome (13 §7.9), since the creator or adder normally added every enrolled device of the person; only on mls.welcome_not_found does it join by external commit (13), which is allowed because the person is listed in sv_participants.

10.6 Limits on requests

Limit Value Enforced by
New DMs, and group adds, inviting people who have never replied (invitations still pending), per creating or adding account 20 per 24 h. In addition, 10's young-account cap applies: newAccount.maxNewDmsPerDay (default 5) per 24 h for local accounts younger than newAccount.ageMs (default 24 h) (10 §12.1, §12.2) Hosting server; excess gets 429 core.rate_limited
Incoming dm.request invitations at a recipient's home 20 per 24 h per sender address; 200 per 24 h per origin server. Excess is dropped silently. Recipient home (§8.4 step 8)
Pending requests stored per recipient 200; the oldest is expired first Recipient home
Pending requests per recipient from one hosting server 20; further invitations are acknowledged and dropped silently Recipient home
Request lifetime at the recipient's home 90 days, then expired (no response is sent) Recipient home
Invitation lifetime at the hosting server 90 days after the latest invitation's addedAt (§8.1) Hosting server
Quiet period after decline 30 days per (host, ctx), from declinedAt Hosting server (§8.1) and recipient home (§8.4 step 6)

Every row is this document's, apart from 10's young-account cap. The values are defaults, and servers MAY change them. 10 also owns server-wide anti-spam measures and the report workflow. A request dropped silently MUST look delivered to the sender (10 §12.1).

10.7 User experience notes

  • The 1:1 request card says plainly who is writing and what they can learn: "Alice (alice@a.com) wants to send you messages. They won't know you've seen this unless you accept or reply." (After Accept the client connects to the hosting server, and its MLS and read-state activity can show that the user is there.)
  • A group request card says: "Alice (alice@a.com) added you to Weekend trip. Others in the group will see that you joined if you accept."
  • Decline is quiet: the sender isn't told. Block is permanent until undone in Settings.
  • A dm_request notification never shows message content, in any mode: the lock screen says only "New message request from Alice (alice@a.com)" (19).
  • An auto-accepted DM appears directly in the DM list, with a normal notification.
  • A bot's request carries the bot badge from its IdentityCertificate (secure bots) or account kind (insecure bots).
  • In every card and notification text above, the address in brackets is the display form (01 §6.6), with the domain always included (01 §4.4 rule 3), never the wire form.

11. DM security

11.1 Computation

The security of a DM is computed, never chosen (D-050):

computed_security(DM):
    if DM.kind == direct:
        P := both DM participants, whatever their participation state (§6.3)
        return secure if sec(p) == secure for both p in P else insecure
    ; group
    if wasSecure(DM): return secure                   ; never downgrades (SM-9)
    C := current participants (states reserved, pending, active)
    return secure if sec(p) == secure for all p in C else insecure

sec(p) comes from the newest IdentityState the evaluator holds (07). Device enrolment doesn't enter the computation: it decides only what one device can do (G2). wasSecure(DM) is true when the evaluator has ever known the group DM as secure. For the hosting server that is its own record (security is secure). For a client it is its secure-state pin for the group, below, never the value the hosting server reports.

Who computes. The hosting server computes it to decide what it accepts. It refreshes participants' IdentityStates on identity.changed (it is in their audiences, §9.2), and otherwise uses IdentityStates no older than 300 s when deciding what to accept, refetching older ones. Clients compute it too, from IdentityStates they verified themselves, and act on their own result:

  • A client MUST NOT send plaintext into a DM whose security it computes as secure, whatever the hosting server says.
  • A client that last knew a 1:1 DM as secure MUST NOT send plaintext into it until it has verified, itself, an IdentityState of the peer with sec: insecure and a ver higher than the one it held.
  • Group DMs. A client MUST record a secure-state pin, (host, ctx), for every group DM it has seen as secure or for which it holds MLS state, as a sec_pin record of kind group_dm (09 §13.2), stored as 09 §13.1 says: in the AccountVault (08) on devices that can use it, so that all the user's devices share it, and in device-local storage otherwise (merged into the vault on enrolment). For a pinned group it takes the participant set from sv_participants, not from the hosting server's list, and it MUST NEVER send plaintext there again. If the hosting server presents a pinned group as insecure, the client refuses to send and treats it as W9: a hard error, with "Leave" offered (00 §4.12.1, W9).
  • When the hosting server reports a security the client disagrees with, the client refetches the IdentityStates concerned (at most once per 30 s per DM) and keeps outgoing messages queued meanwhile.

Rationale: a hosting server could otherwise present a secure DM as insecure and collect plaintext. The peer's home server signs IdentityState, so the hosting server can't fake a 1:1 downgrade; a home server that fakes one triggers W2 (07). A group DM never downgrades (SM-9), so a pinned secure state is never legitimately lost.

11.2 1:1 DMs: both ways, one thread

A 1:1 DM changes mode in the same conversation whenever its participants change (SM-8):

Change Hosting server Clients
Insecure → secure: the last insecure participant turned on encryption (D-019) active → upgrading → (bootstrap, §11.4) → active, security: secure. Emits dm.security_eligible, then dm.security_changed. K1 at the switch; W7 disappears. No other prompt. A contact who upgrades is pinned silently if the client has no earlier pin for that address; if a pin exists from before a downgrade, the new key raises W2 per 07 (00 HP-2).
Secure → insecure: a participant downgraded (a reset, D-019) Sets security: insecure, retires the MLS group (it accepts no more handshakes or SealedMessages for that generation, and keeps them for reading), emits dm.security_changed. If the hosting server is a secure server, it goes to encryption_pending or closes the DM instead (§6.2, §13.1). The secure participant sees W2 (downgrade variant, 07) and then W7, and K2 at the switch. For a verified contact, sending stays blocked until the user takes the blocking W2's accept action, "Continue without encryption" (07 §16.3, §16.5; copy in 20 §3.2).
A participant reset their identity (still secure) Removes the old leaves (13). The DM stays secure. W2 for the peer (07); then the peer's client re-adds the new device (§11.5).

Earlier messages stay readable in both directions: plaintext stays on the hosting server, and SealedMessages stay decryptable with the history keys the client already holds.

11.3 Group DMs: up, never down

Change Hosting server Clients
Created with every participant secure Created secure. Closed lock.
Created with any insecure participant Created insecure. W3 for each secure participant, naming the insecure ones.
Insecure group, every current participant now secure (an upgrade, or the last insecure participant left or was removed) upgrading → bootstrap → active, security: secure. K1 at the switch; W3 disappears. Participants at the switch keep reading the earlier plaintext; people added afterwards aren't served it (D-007, §12.5).
Adding an insecure account to a secure group Refuses with 409 security.would_downgrade, data.insecure listing the insecure addresses (D-069). Explains that the person hasn't turned on encryption and offers "Start a new group without encryption", which opens a new group draft with the current participants plus the new person (and no history).
A participant of a secure group downgrades Removes them, reason encryption_turned_off (§12.4). The group stays secure. System line "Bob left because they turned off encryption". Other participants also see W2 per 07 for that contact.
A participant of a secure group resets (still secure) Removes the old leaves; the person stays a participant. W2 per 07; re-add per §11.5.

11.4 Becoming secure: eligibility and bootstrap

When the computed security of an insecure DM becomes secure, the hosting server:

  1. sets state to upgrading and emits the durable event dm.security_eligible with the next group generation;
  2. sends dm.entry_updated to every current participant's home, so devices that aren't connected learn of it;
  3. from then on refuses plaintext posts and call joins with 409 dm.upgrade_in_progress (retryable: true), for every session whatever its device's enrolment. A client on an unenrolled device of a secure account then shows G2 by itself (11 §4.7, §13.3).

Who bootstraps. Exactly one device at a time holds the bootstrap grant for a DM's current generation, and the hosting server reports it as 13's bootstrapAllowed (13 §7.2, §10.1):

  • At creation: for a secure 1:1 DM, the bootstrap travels inside POST /v1/dms (§7.2), so no grant is needed. For a secure group DM, the creator's session that sent POST /v1/dms holds the grant for 60 s after the 201.
  • Otherwise (state upgrading, a reopened DM, or a creator's grant that lapsed without a bootstrap): the first enrolled device of an active participant that asks for the group (GET …/mls/groupinfo, 13 §7.3) while no grant is live receives bootstrapAllowed: true and holds the grant for 30 s. Every other device receives bootstrapAllowed: false while it is live, and a bootstrap from another device fails with 403 mls.bootstrap_not_allowed (13). When a grant lapses without an accepted bootstrap, the next device that asks receives it.

A device of a pending participant never asks: it doesn't contact the hosting server before Accept (§10.4).

Any enrolled device of an active participant that sees dm.security_eligible, or receives dm.upgrade_in_progress, MUST then, without asking the user:

  1. verify fresh IdentityStates of all current participants and confirm the computed security itself (§11.1); if it disagrees, stop and retry later;
  2. ask for the group (GET …/mls/groupinfo). If it doesn't receive the grant, it waits until the group exists (13's mls.welcome or mls.group_created event), then fetches its Welcome (GET …/mls/welcome, 13 §7.9) and processes it; only on mls.welcome_not_found does it join by external commit, which is allowed because it is listed in sv_participants. It stops here;
  3. with the grant: pin silently every participant not yet pinned (first contact), or handle a changed key through 07's W2 rules;
  4. only now claim KeyPackages through its own home server (13) for every enrolled device of every other current participant and for its own account's other enrolled devices;
  5. create the group with group_id sv1:<host>:<ctx>:<groupGeneration + 1>, sv_participants listing every current participant (a person with no claimable KeyPackage is still listed, §12.6), and the hosting server as external sender; upload the bootstrap and, in the same POST …/mls/bootstrap request, the first commit that adds every claimed KeyPackage, with its Welcome (13 §7.4).

13's compare-and-set admits exactly one bootstrap per generation. When the hosting server accepts it, it atomically sets security to secure, increments groupGeneration, sets state to active, and sequences dm.security_changed (marker K1); securitySinceSeq is that event's seq. A device whose bootstrap still loses (409 mls.group_exists, for example after its grant lapsed) discards its group and continues as step 2 says: it waits for its Welcome and joins by external commit only on mls.welcome_not_found. The winner's first commit skips any device that already has a leaf (13 D2).

Rationale: one grant holder means only one device claims KeyPackages for everyone, so a large group doesn't burn every participant's one-time KeyPackages, or 13's claim limits, in a race.

Plaintext before the switch stays on the hosting server, readable by the participants who were in the group before the switch (§12.5); people added afterwards are served nothing from before their join, that plaintext included (D-007). Plaintext is never sealed, archived or shared through a HistoryShare (14). Messages that were waiting in a client's outbox are sent as SealedMessages after the switch; their mid doesn't change (11).

Rationale: refusing plaintext while upgrading means two people who both turned on encryption never keep chatting in plaintext just because nobody created the group yet. The first enrolled device that asks creates it, so the wait is normally a second or two.

11.5 Identity changes of a participant in a secure DM

This section applies only while the participant's inc stays the same. A different inc is a different account: §6.4 applies instead, and nobody re-adds it (D-086).

When a participant's identity key changes (a reset, 07) and the person is still secure (D-071):

  1. The hosting server removes the person's old leaves through 13's removal procedure (reason identity_changed). The person stays a participant. The delivery cut is bound to the old identity generation (13 §13.2): the person's devices of the new generation, including the device that reset, which keeps its did (08 §11.2 S2), may subscribe to the DM and receive its events and their Welcomes.
  2. The person's new devices can't join by external commit, because sv_participants still lists the old identity-key thumbprint (00 HP-3, 13 E6). Each waits in 13's awaiting_readd state (13 §16) until a commit lists the new thumbprint, then processes its Welcome or, if that commit added no leaf for it, joins by external commit.
  3. Every other participant's client, as soon as it has accepted the new key under 07's W2 rules (immediately for an unverified contact; after "Accept new key" for a verified one), whichever source of 07 §14.1 brought the evidence, commits a change to sv_participants with the new thumbprint and, in the same commit, adds the person's enrolled devices from KeyPackages claimed through its own home server with purpose dm_readd (13 §9.4). If the claim yields no usable KeyPackage for the person (a status other than ok, or KeyPackages that fail 13 §9.6), the commit still replaces the thumbprint, without Adds for that person; the person's devices then join by external commit when they see it (item 2). The first such commit wins (13's compare-and-set); the others see the list already updated and do nothing. The device that reset uploads its first KeyPackages with the reset itself (07 §11.6, 08 §11.2 S5), so they normally exist before any participant learns of the change.
  4. Nothing from before the re-add (D-007). In 1:1 DMs and group DMs alike, the person is served nothing sequenced before the re-add, as for a newcomer. When the hosting server starts 13's identity_changed procedure for the person in this DM, it sets the person's joinedSeq (§6.3) and the account's visibleFromSeq (14) to the DM's lastSeq + 1, so nothing already in the timeline is served to the account again. When it accepts the commit that lists the new thumbprint, it sets both to that commit's seq. 11 §7.5 applies them on every path, plaintext included (for example messages from before the DM became secure). The person's devices keep what they stored locally; an old device of the person that is set up again (08 §11.4) keeps its own copy, but the hosting server doesn't serve the earlier items again. Every later identity change repeats this. The person's client shows K6 at the re-add point (00 §4.12.3). Another participant may deliberately share earlier messages with them (§12.5, 14 §7): any participant in a group DM, and the other participant in a 1:1 DM.
  5. Until a commit lists the new thumbprint, the reset person's client shows the DM with the status line of §11.7. Messages the person writes wait in the outbox (waiting_for_keys, 11 §13.3) and are sent once the device has joined. Calls can't be started or joined meanwhile (15 §10.5).

11.6 Warnings, markers and gate cards in DMs

Clients show only these, with copy from 20 (D-055):

ID In DMs, shown when Hidden when
W2 07's trigger: a pinned contact's identity key changed or the contact downgraded. Shown in the 1:1 DM and every secure group DM with that contact, as 07 §16.3 and 20 §3.2 specify. The new-account wording (07 §16.8, D-086) is shown in the 1:1 DM only, at the point where it reopens after peer_deleted (§6.4), by every client, with or without encryption. Per 07.
W3 A group DM has security: insecure, the viewer's account is secure, and at least one current participant (including pending) is insecure. Names them, with "Ask them to turn on encryption" (which pre-fills a message in this group, for the user to send). Persistent, collapsible. The group becomes secure, or no insecure participant remains (the group is then upgrading).
W6 A secure bot is added to a secure group DM, or a secure 1:1 DM with a secure bot starts (D-061). — (one system line per event).
W7 A 1:1 DM has security: insecure, the viewer's account is secure, and the peer's sec is insecure. Persistent, collapsible. Also shown on a 1:1 DM in encryption_pending. The DM becomes secure, or the viewer's account becomes insecure.
W9 A group DM the client holds a secure-state pin for is presented as insecure (§11.1). Sending and calls disabled; "Leave" offered. — (per context).
G1 An insecure account hits security.account_required or security.upgrade_required in a DM action. The upgrade completes; the action resumes.
G2 An unenrolled device of a secure account opens a secure DM, or gets security.device_not_enrolled. The device is set up; the action resumes.
K1 At dm.security_changed to secure. —
K2 At dm.security_changed to insecure (1:1 only); also at the start of an insecure successor of a secure 1:1 DM (§13.3). —
K4 On a user's own new device while it restores keys from the key archive, and above messages shared with the user while they load (14, 20 §5). —
K5 At dm.closed with reason host_secure, between the closed DM's last message and its successor's first. —
K6 At the viewer's own join point in a secure group DM, when earlier items exist that the viewer isn't served (D-007; 11's withheldBeforeSeq); also at the viewer's own re-add point after the viewer's identity change, in any secure DM (§11.5 item 4). —
K7 Above messages another participant shared with the user, in a secure 1:1 DM or group DM (§12.5, 14). —
K8 Where a participant shared earlier messages with another participant, for every participant other than the recipient, the sharer included (K8.self, 20 §5), in a secure 1:1 DM or group DM (§12.5, 14). —

An insecure participant never sees W3 or W7. A DM that is upgrading shows neither W3 nor W7, but the status line of §11.7 while outgoing messages wait.

In DM and group DM headers and participant lists, clients show the full canonical address of every participant whose domain differs from the viewer's own home domain (D-031; layout and copy in 20). The hosting server's domain means nothing to most users, so it isn't the reference.

11.7 Status lines

These lines report progress, not risk. They aren't security warnings, gate cards or markers, and never block anything the user could do instead. Their copy lives in 20; the lead may list them in 00 §4.12 as non-warning status lines.

Status line (intent) Shown when Section
"Setting up encryption…" The DM is upgrading and outgoing messages wait. §11.4
"Waiting for another member's app to come online" (1:1: "Waiting for {person}'s app to come online") The viewer's own identity changed and no participant's client has listed the new key yet (13 §16 awaiting_readd). Messages wait in the outbox; this line replaces the call button while it shows (15 §10.5). §11.5
"You can write again once Bob turns on encryption." The DM is encryption_pending (shown with W7 and a disabled composer). §13.2
"Waiting to send — the server for this chat isn't reachable right now." The hosting server is unreachable and messages wait in the outbox. §15
"Waiting for your server…" The user's own home server is unreachable, so a DM on another server can't be created yet. §15

12. Group DM membership

12.1 Owner and permissions

Action Who may do it
Read and post Every active participant
Add people (§12.2) Every active participant
Rename (PATCH name) Every active participant
Leave (§12.3) Every current participant (a pending one declines through their home server instead, §10.3)
Remove someone else (§12.3) While the group has an owner, the owner only. Once it has none, every active participant (D-087).
Share earlier messages with one participant (§12.5) Every active participant of a secure group DM except a bot account (D-007, 14 §11)

The owner of a group DM is its creator, from the group's creation until the creator first stops being a current participant, for any reason: leaving, a removal by the hosting server (for example a server-scope ban, 10 §9.4 step 7), turning off encryption, or account deletion. From that moment the group has no owner for the rest of its life (D-087): every active participant may remove any other current participant, ownership never passes to anyone, and every participant can still leave. If the creator is added again later, they come back as an ordinary participant, not as the owner. Ownership can't be transferred in v1.

Proposed decision: while the creator of a group DM is a current participant, only the creator may remove other participants, and ownership is never restored once the creator has left; D-087 settles who may remove others after that. Rationale: open adding matches how people use group chats, and restricting removal to one person while that person is present stops a member silently ejecting others. A single one-way transition matches D-087's "once the creator has left", and means re-adding the creator's address can never hand removal powers back to whoever holds it then (after an address reuse, D-086, that may be someone else).

12.2 Adding people

POST /v1/dms/{ctx}/participants, body { "participants": [addr, …], "communityHints": [domain, …] }: 1 to 10 canonical addresses, and optionally up to 10 community domains as in §7.2, which the hosting server copies into the dm.request batch 1 of each new invitation. The hosting server checks, in order:

  1. the DM is a group (else 409 dm.not_group), in state active (else the state's error, §6.2);
  2. the caller is active (else 403 dm.not_participant; a pending caller gets 403 dm.not_accepted);
  3. each address is canonical, exists (404 dm.recipient_not_found) and isn't already a current participant (400 dm.invalid_participants, reason duplicate); participants in left, removed or declined may be added again. Adding a person who has an active server-scope ban at the hosting server fails with 403 moderation.banned (10);
  4. federation blocks (06) and the rate limits of §10.6;
  5. the total of current participants stays within maxGroupDmParticipants (409 dm.too_many_participants, data.max);
  6. if the group is secure, every new person is secure (else 409 security.would_downgrade, D-069), and the caller's session is from an enrolled device (else 403 security.device_not_enrolled).

Insecure group: each new person becomes pending with addedBy = caller and joinedSeq per §12.5. The hosting server emits dm.participant_added, sends dm.request (§8.1) and dm.entry_updated to the other participants' homes, and answers 200 with the Dm.

Adding a secure person to an insecure group doesn't change its mode. The hosting server recomputes security (§11.1) after every membership change, so an insecure group becomes upgrading only when its last insecure participant leaves or turns on encryption.

Secure group, two phases:

  1. The hosting server sets each new person to reserved for the caller, valid 60 s, and answers 202 with the Dm.
  2. The caller's client claims KeyPackages for the new people's enrolled devices through its own home server (13), and submits one commit (13) that adds those devices and lists the new people in sv_participants with their identity-key thumbprints, together with the Welcome. The client pins new people silently first (first contact, 07). A new person for whom no KeyPackage could be claimed is still listed, and the add proceeds; their devices join later (§12.6).
  3. When the hosting server accepts that commit, each reserved person becomes pending; it emits dm.participant_added and sends dm.request carrying the Welcome.
  4. If no such commit arrives within 60 s, the reservation lapses, the person is dropped, and a late commit listing them is refused with 409 dm.reservation_expired; the client starts again.

After Accept, the added person's devices fetch their Welcome, and any device that wasn't added joins by external commit (§10.5, 13). They read from their join on, and their client shows K6 at the join point (§12.5, D-007). Nobody is asked to share earlier messages with them.

12.3 Leaving and removing

DELETE /v1/dms/{ctx}/participants/{addr}, with {addr} the canonical address, percent-encoded.

  • {addr} is the caller: leave. The participant becomes left, reason left.
  • {addr} is someone else: while the group has an owner, the caller must be the owner (else 403 dm.not_owner); once it has none (§12.1, D-087), the caller must be an active participant (else 403 dm.not_participant; a pending caller gets 403 dm.not_accepted). The participant becomes removed, reason removed. Whoever may remove others may also remove pending and reserved participants (withdrawing an invitation).
  • 1:1 DMs: 409 dm.not_group. A 1:1 DM can't be left; the user hides it or blocks the peer (§9).

Returns 204. A participant who left can't come back by themselves; another participant must add them again.

12.4 Effects of a removal

For every way a person stops being a current participant of a group DM (leave, removal by another participant, decline or block, downgrade, account deletion, expired invitation, a server-scope ban by the hosting server (10 §9.4 step 7)), the hosting server:

  1. records the new state and reason; if the person was the owner, the group has no owner from then on, even if the creator is added again later (§12.1, D-087), and the hosting server emits dm.settings_changed with owner: null and by: null;
  2. emits dm.participant_removed with the reason as others may see it (§6.5);
  3. stops delivering the DM's events, Welcomes, GroupInfo and media to the person's sessions, and revokes their voice leases (15);
  4. sends dm.entry_updated to the person's home (their entry goes to left) and to every remaining participant's home;
  5. in a secure group: runs 13's removal procedure (Remove proposals for all the person's leaves, content freeze, designated committer). The committing member MUST include, in the same commit, the change to sv_participants that removes the person (§12.6);
  6. recomputes security (§11.1): an insecure group whose remaining current participants are all secure becomes upgrading.

A reserved person whose reservation lapses (§12.2) was never announced and holds no leaves: the hosting server just drops them, with no dm.participant_removed, no dm.entry_updated to their home, and no MLS action.

The reason of 13's Remove proposals (13 §13.1, §13.6 item 4) for each way of leaving:

Participation change (§6.3 reason) 13 reason sv_participants
left participant_left Person dropped in the same commit
removed (including removed by a server-scope ban, 10 §9.4 step 7), declined (including a block), invitation_expired participant_removed Person dropped in the same commit
encryption_turned_off account_downgraded Person dropped in the same commit
account_deleted account_deleted Person dropped in the same commit
(identity reset; still a participant, §11.5) identity_changed Unchanged until a member accepts the new key

A removed person's client keeps what it already has but can read nothing new. From the removal on, the hosting server serves them no timeline item at all, including items from before the removal (§6.5), and in a secure group they hold no keys for later epochs.

12.5 History

There is no history setting (revised D-007; D-070 is superseded). What a participant can read depends on the DM's security mode:

Insecure group DM Secure group DM
A new participant's joinedSeq 1: the hosting server serves the whole timeline (D-007 changes nothing for insecure contexts) The seq of their dm.participant_added event: the start of their membership
Earlier items Served Not served: no sealed item, nothing derived from content, and no plaintext of an earlier insecure period
What the client shows Nothing special K6 at the join point (20)
  • joinedSeq is fixed when a participant is added and limits every timeline item the hosting server serves to them, plaintext included (11 applies it). A participant who left or was removed and is added again gets a new joinedSeq by the same table: in a secure group DM that is the new add, so earlier memberships aren't served again, and their devices keep what they stored locally.
  • In a secure DM or group DM, 14's visibleFromSeq for a participant always equals its joinedSeq; it limits sealed items on every path, as 14 specifies. The hosting server serves an item only if it passes both.
  • A group DM that became secure (§11.4): the participants at the switch keep reading the plaintext from before it; people added afterwards aren't served it (D-007).
  • A participant re-added after an identity change is served nothing from before the re-add (§11.5 item 4, D-007).
  • 1:1 DMs: both participants are present from seq 1 (joinedSeq 1), except after a reopening (§6.4) or an identity change and the re-add that follows it, which set the affected participants' joinedSeq and visibleFromSeq as §6.4 and §11.5 item 4 say (D-007). A participant whose identity changed is served nothing from before the re-add (§11.5 item 4); their devices keep only what they stored locally.
  • A user's own new devices get everything that user could already read, from the key archive (D-007, D-054): the hosting server serves the account from its joinedSeq, whichever device asks.
  • Bots follow the same rules (D-061).

Manual history sharing (D-007). In a secure group DM, any active participant other than a bot account MAY share earlier messages they can read with one specific other active participant, and in a secure 1:1 DM either participant, unless it is a bot account, MAY share with the other, through 14's HistoryShare. In a 1:1 DM, this matters only after the other person was re-added after an identity change (§11.5 item 4). W2 has already told the sharer that the key changed, and the share action names the person. Every participant other than a bot account holds the equivalent of share_history there; no role or grant is involved (10 §3.4). A bot may receive a share but never creates one (14 §11). Clients offer it only as the deliberate action of 20 §5.1: never automatically, never as a default and never prompted, including when someone is added or re-added. The hosting server records a VisibilityGrant and serves the shared sealed items and their attachments to the recipient (14); the recipient sees K7 and the other participants see K8. DMs have no audit log, so K8 is the record. Insecure DMs don't use it (14 §7.1).

12.6 DM commit policy and sv_participants

13 enforces this policy for every DM group, and clients check it as part of the DM Authentication Service (07).

In a group DM, sv_participants lists exactly the persons in state pending or active (a reserved person becomes pending when the commit listing them is accepted). In a 1:1 DM it always lists both people (§6.3), whatever their participation state. Each person is listed with the thumbprint (ikf) of the identity key the members accepted for them.

A listed person MAY have no leaf: after a reset, a revocation or an eviction removed all their leaves, or when no KeyPackage could be claimed for them at a bootstrap or add. Such a person's devices join later: by external commit while the listed thumbprint is theirs; after a reset, by the Welcome of the member commit that lists the new thumbprint, or by external commit once that commit has listed it without adding them (§11.5). A bootstrap or add never waits for, or fails because of, a person without a claimable KeyPackage.

A member commit in a DM MAY contain:

  • Add proposals (by value) for KeyPackages whose sv_device credential names a person listed in the sv_participants that results from the commit, with the listed thumbprint;
  • Remove proposals by value for leaves of persons removed from sv_participants in the same commit, or for leaves whose credential thumbprint differs from the person's listed thumbprint (stale after a reset), and Remove proposals by reference to the hosting server's proposals;
  • a GroupContextExtensions proposal changing sv_participants, limited to: adding persons, removing persons, and replacing a person's thumbprint;
  • an UpdatePath, which every commit carries (13 §12.3); Update proposals are never used (13 §3.8).

The hosting server accepts a member commit only if: every person it adds is reserved by the committer (§12.2), or is a current participant whose thumbprint changed (§11.5); every person it removes from sv_participants is no longer a current participant at the hosting server (in a 1:1 DM, nobody is ever removed); and every replaced thumbprint equals the person's current IdentityState. It refuses other commits as 13 specifies.

Clients check the structural invariants of 13 §5.3 and reject (as a positive rejection, 13 §15.4, followed by 13's resync) a commit that breaks them, for example an external commit from an identity that isn't listed. A valid member commit that newly lists a person, or replaces a person's thumbprint, with a key that differs from the client's pin is processed, never rejected (13 §5.3 item 4): the client passes the key to 07's pin logic, which raises W2 for that person and, for a verified contact, blocks sending until "Accept new key". Until the user accepts, the client doesn't attribute that person's messages to the pinned identity. Rejecting such a commit would cut the client out of every later epoch.

External commits in a DM are allowed only from a device whose credential names a person listed in sv_participants with a matching thumbprint (the person's later devices, and resync); they contain ExternalInit and at most one Remove of the committer's own stale leaf (13).

12.7 Size limit

maxGroupDmParticipants (ServerMetadata limits) is the maximum number of current participants, creator included: default 25, floor 10 (00 §7.12, D-059). A hosting server MAY advertise more. A secure group is also bounded by maxSecureLeaves (13), counted in devices.

13. Closing, successors and server upgrades

13.1 When a hosting server becomes secure

A server upgrade (09) is irreversible (D-073). At the moment it takes effect, the hosting server applies these rules to every DM it hosts, in the same transaction as the upgrade:

DM Result
Secure (1:1 or group) Unchanged.
Insecure group DM closed, reason host_secure; dm.closed with marker K5.
Insecure 1:1 DM, rule host (with the new flags) is a server that isn't secure closed, reason host_secure; dm.closed with marker K5.
Insecure 1:1 DM, rule host is a secure server (this one or the other home: both homes are now secure servers) encryption_pending in place (§13.2); dm.state_changed.

From the moment the server stops plaintext ingress (09 §11.4 T1) until this transaction completes, a plaintext post to an insecure DM hosted here fails with the error of the state this table gives it: 409 dm.closed (reason host_secure, successor null) or 409 dm.encryption_pending.

Later, if a secure 1:1 DM hosted on a secure server would become insecure (a participant downgrades or becomes upgrade_required), the hosting server applies the same test with fresh flags: if the rule host isn't a secure server, it closes the DM (K5) and a successor starts there; otherwise it retires the group, emits dm.security_changed (K2) and goes to encryption_pending in place (§6.2).

Test vectors, with the participants of H-1 to H-5 (§4.6):

# Before Change Result
U-1 Insecure DM on a.com, no server secure (H-1) a.com upgrades Rule host d.com (H-3) isn't secure: closed (K5); successor on d.com
U-2 Insecure DM on d.com, a.com secure (H-3) d.com upgrades Rule host a.com (H-5) is secure: encryption_pending on d.com
U-3 Insecure DM on a.com, d.com secure (H-4) a.com upgrades Rule host a.com (H-5) is secure: encryption_pending on a.com
U-4 Secure DM on a.com, a.com secure, d.com not (H-3 was d.com, but the DM was created before a.com upgraded, §4.5) Dan downgrades Rule host d.com isn't secure: closed (K5); insecure successor on d.com, with K5 then K2
U-5 Secure DM on a.com, both servers secure (H-5) Dan's sec becomes insecure Rule host a.com is secure: security insecure (K2), encryption_pending

00 HP-9, 00 §4.10 and 09 §11.4 step T6 refer to this table for the effect of a server upgrade.

For each closed DM it sends dm.entry_updated to every current participant's home. A closed DM stays readable to the participants who could read it, under its existing history rules. The hosting server keeps it at least as long as its normal retention for DMs and MAY delete it afterwards. These kept messages are pre-upgrade plaintext, like a channel's history before upgradeSeq (09); the hosting server never accepts new plaintext.

13.2 encryption_pending

A 1:1 DM is encryption_pending when its hosting server is a secure server and its computed security is insecure. This happens only when both homes are secure servers and one participant's sec is insecure, normally an upgrade_required account (SM-3); that participant can do nothing until they turn on encryption anyway. The hosting server refuses content and calls with 409 dm.encryption_pending, data.waitingFor naming the insecure participants. The other participant sees W7 and a disabled composer with the status line "You can write again once Bob turns on encryption." (§11.7). When the participant turns on encryption, the DM goes through upgrading to secure (§11.4), in the same thread, on the server that holds it.

POST /v1/dms for a new DM whose computed security would be insecure on a secure server fails with the same error (§7.2 step 9, and §4.3 for groups).

13.3 Successors

When a participant's client wants to send into a DM whose index entry or Dm object is closed with reason host_secure, it creates a successor without asking the user:

  • 1:1: compute the rule host with fresh inputs (§4.1); register (POST {home}/v1/me/dms with the new host and the same ctx); POST {newhost}/v1/dms with replaces set to the closed DM; then send. The successor has the same dm: reference on the new host.
  • Group: before creating, check the closed entry's successor (another participant may have created one already, §9.1) and use it if set. Otherwise POST /v1/dms at the host host_group selects with this participant as creator, with the closed DM's current participants, name and replaces. The sender becomes the new group's creator and owner.

The recipients' homes receive dm.request with replaces, which auto-accepts under §10.2 (c) (for a group, only when the new creator is homed at the new hosting server, §10.2), and set successor on the closed entry. Clients SHOULD render a closed DM and its successor as one conversation: the old messages, K5, then the new ones. If the closed DM was secure and the successor is insecure (§13.1, U-4), K2 follows K5.

Two participants may create successor groups at the same moment; both groups then exist and both appear in everyone's list. This is rare and harmless.

13.4 Reopening

A closed DM can reopen only after peer_deleted (§6.4), when a ban that closed it ends (§6.2, in place, with its participants and history), or when a later successor creation for the same dm: reference selects its own hosting server again (§7.2 step 6). Since §13.1 keeps an insecure 1:1 DM in place (encryption_pending) whenever both homes are secure servers, the last case is rare. Group DMs never reopen.

On POST /v1/dms for a closed 1:1 DM (§7.2 steps 5 to 11), the hosting server reopens it: it computes the security, sets state to active (insecure), upgrading (secure; the DM gets a new group generation through §11.4) or encryption_pending, sets replaces from the request, emits dm.state_changed and returns 200. The caller becomes active. After peer_deleted, every other participant becomes pending with a new invitation, whether or not it was removed, so that neither side's acceptance of the earlier conversation carries over to the new account (D-086); each participant's inc is recorded from the IdentityStates of §7.2 step 5; and both participants' joinedSeq and visibleFromSeq are set to the dm.state_changed event (§6.4). Because deletion is final (D-091), a reopening after peer_deleted always involves a new account.

14. DM calls

Calls exist in DMs and voice channels only (D-064). 15 owns call control; this section says which DMs can have calls and how their media travels.

Every DM can have calls: 1:1 and group, insecure and secure. In every DM, all call media travels through the hosting server's relay or SFU (15). Clients MUST NOT send media to each other directly (D-094).

Further rules:

  • Only active DM participants may start or join a call (as call participants, 15). A DM in state upgrading accepts no new joins, and one in state encryption_pending or closed has no calls (§6.2).
  • A call has its DM's security mode (SM-11). A call already running when the DM enters upgrading continues until the switch. At dm.security_changed to secure (1:1 or group), the call ends with 15's reason security_upgraded, and clients rejoin it as a secure call automatically, keeping mic and push-to-talk state (a planned migration, 00 HP-13). When a 1:1 DM becomes insecure during a call, the call ends with 15's reason security_downgraded and clients don't rejoin automatically; the user starts a new call after seeing W2 and W7. When a DM is closed (K5, §13.1), its call ends with 15's reason context_closed, and clients don't rejoin it.
  • Unenrolled devices can't join calls in secure DMs (G2).
  • One call per user per hosting server applies (D-067).

Because every call participant connects only to the hosting server and its relay or SFU, a DM call never reveals one participant's IP address to another; the hosting server learns it, as for any context (§20).

14.1 Call entries and ringing

When 15 creates or ends a call in a DM, the hosting server sequences the durable event dm.call_logged (§16.1) in the DM's timeline: phase: "started" when the call is created, and phase: "ended" when it ends. A start is a content event (§2.1), so a call can open a DM and starts its dm.request (§8.1) like a first message. Clients show these events as call entries ("Alice called", "Missed call", duration).

Ringing (15 §13, 19 call_ring) goes only to active DM participants, and never to a 1:1 participant who blocked the caller (§8.5): the hosting server MUST NOT send call_ring for a pending participant (§8.1, 19 §4.2). A pending participant learns of the call only from the dm.call_logged start in the dm.request, which the request shows as a missed call. The recipient's home also never rings for an entry in state requested (15 §13.1, 19), so both sides hold the rule. Nobody is rung by a stranger. A notify.event call_ring for an entry in state requested is ignored; the request shows the missed call only from the dm.call_logged start in its batches (§8.4 step 11).

15. When a server is unreachable

Unreachable Effect What the user sees (intent; copy in 20)
Hosting server Messages wait in the outbox with their mid and are retried (11); creation of a 1:1 DM is queued too, and the conversation appears at once because its ctx is known; a group DM appears as a local draft. Remote sessions follow 06's extension rules. Messages show a clock and the status line "Waiting to send — the server for this chat isn't reachable right now. Your messages will send automatically." (§11.7). The server's domain appears only in a details view, because users don't know which server hosts a DM. Nothing is lost.
Creator's home server No HomeAssertion for a remote session and no KeyPackage claims, so creating a DM on another server, and every secure add, waits. A DM on the home server itself is unaffected for insecure content. "Waiting for your server…"
Recipient's home server The hosting server retries dm.request and dm.entry_updated under 06's rules for 24 h. If delivery still fails, it sends the invitation's batches again at the next content event. The sender sees nothing different (§6.5).
Community servers during the (e) check That candidate counts as "not shared" (§10.2). The DM may arrive as a request instead of directly.

A client MUST NOT move a DM to another server because its hosting server is down: the host changes only through §13.

16. Events

16.1 Context events at the hosting server

Delivered on the DM's context to participants' sessions, and forwarded to pending participants inside dm.request batches. All are durable (they carry seq).

Type Transport Direction Class Stream Timeline item Payload d
dm.created client WebSocket hosting server → client durable the DM's context Yes kind, createdBy, security, participants (addresses), name, replaces
dm.participant_added client WebSocket hosting server → client durable the DM's context Yes participant (DmParticipant, filtered per §6.5), addedBy
dm.participant_removed client WebSocket hosting server → client durable the DM's context Yes addr, reason (as visible to the receiver, §6.5), by (for removed through §12.3, the address of the participant who removed them: the owner, or, once the group has no owner, any active participant (D-087); null for every other way of leaving, including a removal by the hosting server)
dm.participant_updated client WebSocket hosting server → client durable the DM's context Yes, rendered as a line only when state becomes active in a group DM: "{person} joined" addr, state (for example pending → active), role
dm.settings_changed client WebSocket hosting server → client durable the DM's context Yes Changed members among name, owner; by (address, or null when the hosting server made the change, for example owner becoming null when the creator left)
dm.call_logged client WebSocket hosting server → client durable the DM's context Yes callId (15), phase (started or ended), by (the caller's address), video (boolean), at; for ended also durationMs and answered (boolean). Unknown phase values are ignored.
dm.security_eligible client WebSocket hosting server → client durable the DM's context No generation (the next group generation), participants ({addr, security} for every current participant)
dm.security_changed client WebSocket hosting server → client durable the DM's context Yes (K1/K2) security (new), previous, generation (the group generation now in force, or the retired one when becoming insecure), lastSeqBefore (the last seq under the previous mode), marker (K1 or K2), cause (all_secure or participant_insecure)
dm.closed client WebSocket hosting server → client durable the DM's context Yes (K5) reason (host_secure, peer_deleted or banned), marker (K5 or null)
dm.state_changed client WebSocket hosting server → client durable the DM's context No state (new), previous, reason (encryption_pending, security_recomputed or reopened)

Timeline items appear in 11's timeline pages as SystemItems (11 §7.1) and count toward lastItemSeq (03 §5.7).

Receivers ignore unknown members and unknown reason and cause values, and treat an unknown marker as none.

Example:

{
  "v": 1,
  "t": "dm.security_changed",
  "id": "01938f55-1a2b-7c3d-8e4f-506172839405",
  "ctx": "dm:KBXfagPoLlQyKu3QOiLfgw",
  "seq": 212,
  "ts": "2026-12-05T09:12:44.871Z",
  "d": { "security": "secure", "previous": "insecure", "generation": 1,
         "lastSeqBefore": 210, "marker": "K1", "cause": "all_secure" }
}

16.2 Account events at the home server

Delivered with ctx: "me" on the home server's WebSocket. All are durable.

Type Transport Direction Class Stream Timeline item Payload d
dm.index_updated client WebSocket home server → client durable me at the home server No entry (DmIndexEntry, without pendingEvents). Emitted on every change to an entry.
dm.index_removed client WebSocket home server → client durable me at the home server No id. Emitted when an entry is deleted: by DELETE /v1/me/dms/{id}, or when a declined entry's 30 days end (§9.2).
dm.request_received client WebSocket home server → client durable me at the home server No request (DmRequest list form, §10.3), batch
dm.request_resolved client WebSocket home server → client durable me at the home server No id, state
dm.block_updated client WebSocket home server → client durable me at the home server No addr, blocked (boolean), block (DmBlock, or null when unblocked)
dm.settings_updated client WebSocket home server → client durable me at the home server No settings (DmSettings, §9.4)

16.3 Server-to-server events

Each type is registered in the form 06 §10.1 requires. Delivery, retries, lanes and deduplication on (iss, event id) follow 06.

Type Class Origin → destination Payload Lane orderKey Subject binding (federation.event_not_authorized on failure) expiresAt Give-up hook
dm.request s2s Hosting server → each recipient's home §8.2 normal Context reference host equals iss, and recipient is homed at the receiver. The further host-legitimacy checks of §8.4 step 3 then fail as rejected with dm.host_mismatch. None The invitation's batches are sent again, from batch 1, at the next content event (§15)
dm.response s2s Recipient home → hosting server §8.5 normal Context reference recipient is homed at iss None None: the recipient home answers again when the next dm.request batch arrives (§8.4 steps 5 and 6)
dm.entry_updated s2s Hosting server → participant's home §8.6 normal Context reference recipient is homed at the receiver; iss equals the host of the receiver's existing entry (else ignored) None None: the next update supersedes it

Beyond 06's deduplication: a dm.request batch already stored under (host, ctx, invitationId, batch) is ignored (§8.4 step 4); dm.response is applied last-writer-wins per (ctx, recipient) by at (§8.5); dm.entry_updated is applied only when newer, by lastSeq, then ts (§8.6).

17. Error codes

All use the problem-details object of 00 §7.9.

Code HTTP retryable userAction Meaning data
dm.wrong_host 409 true retry This server isn't the host the rule selects (§4.4). host, ctx
dm.invalid_participants 400 false none The participant set is invalid. reason: self, duplicate, too_few, ctx_mismatch; addr
dm.recipient_not_found 404 false none An address names no user or bot account. addr
dm.too_many_participants 409 false none maxGroupDmParticipants would be exceeded. max
dm.security_mismatch 409 true retry expectSecurity differs from the computed security (§7.2). security, participants: [{addr, sec}]
dm.upgrade_in_progress 409 true none The DM is upgrading; an enrolled client bootstraps the group (§11.4) and retries. generation
dm.encryption_pending 409 true wait A secure hosting server can't take this insecure DM until the named people turn on encryption (§13.2). waitingFor
dm.closed 409 false none The DM is closed. With reason host_secure the client continues in a successor (§13.3); with banned there is no successor, and the DM reopens in place when the ban ends (§6.2); with peer_deleted it can only be reopened as §13.4 allows. reason, successor (for host_secure, if the hosting server knows it; otherwise null)
dm.not_participant 403 false none The caller isn't a current participant. —
dm.not_accepted 403 false none The caller hasn't accepted this DM yet. —
dm.not_group 409 false none The operation needs a group DM. —
dm.not_owner 403 false none The group has an owner (its creator, §12.1), and only the owner may remove other participants. A group without an owner never gives this error (D-087). owner (the owner's canonical address)
dm.reservation_expired 409 true retry A secure add's commit came after the 60 s reservation lapsed (§12.2). addr
dm.request_not_pending 409 false none The message request was already answered or has expired. state
dm.entry_active 409 false none An active index entry can't be deleted (§9.3). state
dm.host_mismatch 403 false none S2S, as the error of a rejected EventResult (06 §9.3): the sender isn't a legitimate host for this context, or ctx doesn't match the participants (§8.4 step 3). ctx

This document also uses security.would_downgrade, security.device_not_enrolled, security.account_required and security.upgrade_required (00 §4.11), address.non_canonical (01), core.* (03), federation.blocked and federation.event_not_authorized (06), moderation.banned (10), and 13's mls.* codes, in particular mls.group_not_found, mls.group_exists, mls.bootstrap_not_allowed and mls.welcome_not_found.

18. Limits and timers

Name Value Section
maxGroupDmParticipants Default 25, floor 10 §12.7
maxDmRequestBytes Default 64 KiB, floor 64 KiB; cumulative per invitation §8.3
IdentityStates in dm.request Counted in maxDmRequestBytes; each at most 32,768 bytes (07); ordered and omitted as §8.3 says §8.3
ServerMetadata age for hosting decisions ≤ 1 h; on dm.wrong_host the client refetches all, and a server refetches any older than 60 s before answering §4.1
IdentityState age at the hosting server Maximum age 300 s when deciding what to accept (older ones are refetched); invalidated by identity.changed §11.1
Bootstrap grant 60 s for the creator's session after a group DM's creation; 30 s for any other device §11.4
Client recheck on security disagreement At most once per 30 s per DM §11.1
dm.wrong_host second attempt After 5 s, once §4.4
Request batch coalescing ≤ 1 batch per 5 s per invitation §8.1
Activity hint coalescing ≤ 1 dm.entry_updated per 60 s per DM per participant §8.6
Secure add reservation 60 s §12.2
Community check timeout; cache 5 s; positive 1 h, negative 10 min (09 §5.2) §10.2
Communities checked for rule (e) ≤ 10; each with memberCount ≤ 200 (count cached 24 h) §10.2
communityHints ≤ 10 domains §7.2, §12.2
Group name 1–100 scalar values, ≤ 400 bytes §6.1
Adds per request 1–10 addresses §12.2
New invitations to people who never replied, per creating or adding account 20 per 24 h, plus 10's young-account cap (10 §12.1) §10.6
Incoming requests at the recipient's home 20 per 24 h per sender; 200 per 24 h per origin server §10.6
Pending requests per recipient; per hosting server 200; 20 §10.6
Request lifetime at the recipient's home 90 days §10.6
Invitation lifetime at the hosting server 90 days after the latest invitation §8.1
Decline quiet period 30 days §8.1, §10.6
Auto-accepted events kept at the home ≤ 7 days §8.4
Blocks per account 10,000 §9.5

19. Registry additions

  • ServerMetadata limits (02, 03): maxGroupDmParticipants, maxDmRequestBytes, as already listed in 00 §7.12.
  • S2S event types (06 catalogue, 03 registry): dm.request, dm.response, dm.entry_updated, with the lane, orderKey, binding and give-up hook of §16.3.
  • Client event types (03 registry): those of §16.1 (including dm.call_logged) and §16.2 (including dm.block_updated and dm.settings_updated), all durable.
  • Error codes (03 registry): those of §17.
  • Notification record kinds used (owned by 19): dm_request, dm_message, call_ring.
  • Crypto labels: sv1 dm (already in 00 §7.15). No new labels.

20. Security considerations

What the hosting server learns. A hosting server sees every DM's participants, their device counts, who posts when and how much, call timing, IP addresses of connecting clients, group names, and, in insecure DMs, all content and media (00 §5.4). Under the hosting rule this is normally one participant's own home server. Users should understand that an insecure DM is readable by that server; W7 and W3 say so to secure users. Group names are metadata even in secure groups; clients SHOULD NOT suggest they are private.

Secure servers never get plaintext. The hosting rule and §13 keep insecure DMs off secure servers (SM-10), apart from pre-upgrade history kept read-only after a server upgrade, which is the same trade-off D-057 makes for channels. A secure server that is only the recipient's home receives insecure DM requests without their content (§8.2) and strips any content that arrives anyway.

Malicious hosting server. It can delay, drop or reorder events, refuse service, lie about participation states, and remove participants (denial of service). It can't add a person to a secure DM, because sv_participants changes only by member commits that clients check (D-036, 13 §5.3). It can't silently downgrade a 1:1 DM, because clients compute its security themselves from home-signed IdentityStates, or a secure group DM, because clients keep a secure-state pin for it and treat an insecure presentation as W9 (§11.1). It can invent a group DM naming any participants, since recipient homes can check only that it is the creator's or a listed participant's home (§8.4 step 3). Such an invented group reaches a user as a message request unless the server vouches for its own user as the inviter (§10.2), so it can't impersonate a contact of the user's on another server to skip the request filter; at most it can make its own users look like they're in a group with that contact, which the request card shows "via" that server.

Removal once the creator has left. Once a group DM's creator has left, every active participant may remove any other (D-087, §12.1), so one participant can eject the rest. Removals are durable timeline events that name the remover (dm.participant_removed by, §16.1), and any remaining participant can add a removed person back (§12.2). In a secure group a removal also cuts the person out of later epochs and out of sv_participants (§12.4), so it is never silent. Nobody takes the creator's place, so re-adding the creator's address doesn't hand control back to anyone (§12.1).

First-contact spam. Requests are filtered at the recipient's home server, capped in size (64 KiB) and number (§10.6), rate-limited at the hosting server, and silenced by decline (30 days) and block (permanent). The sender never learns of a decline or block. Senders can rotate addresses; server-wide defences (10) and federation blocks (06) cover that. communityHints can't widen the auto-accept rule (§10.2) and can make a recipient's home query at most 10 community servers the recipient chose. Large communities (over 200 members) don't count for auto-accept, so a big public server's default membership (D-068) doesn't open everyone's inbox to everyone else.

IP privacy. Before Accept the recipient's client contacts only its own home server (§10.4), so a stranger can't learn the recipient's IP address by sending a message, an attachment, a link or a call. Reports of a request also go to the home server (10). After Accept the hosting server learns it, as for any context. Other DM participants never learn it from a call, because all call media goes through the hosting server's relay or SFU (§14, D-094).

Identity at first contact. Pins are trust on first use (07). Before Accept the client verifies the carried IdentityStates with server keys its home server relays (§10.1, serverKeys), for display only, and creates no pin (07 §14.7). After Accept it fetches them from the participants' home servers and pins from those (§10.5). A home server that fakes a contact's IdentityState, or the keys that sign it, at first contact could make its own user see a wrong key before Accept; this is the inherent limit of trust on first use, and safety-number verification (07) addresses it. The hosting server's external-sender key reaches the client before Accept the same way (§10.1). A home server that relays a wrong key can only make its user's client defer the Welcome until after Accept; the client then checks the group's external sender against the hosting server's own metadata (13 §6.2 item 2), and the GroupInfo inside the Welcome is signed by the inviter's leaf, which the home server can't forge.

Successor abuse. A dm.request naming a predecessor (replaces) is auto-accepted only if the recipient's entry for that predecessor is accepted, its hosting server reported it closed, and the inviter was a participant (§10.2 (c)). A hosting server therefore can't use replaces to skip the request filter.

Reused addresses. After an account is deleted and its address registered again, the same dm: reference returns, but the new account has a new incarnation (D-086). The hosting server records each participant's inc, and the first HomeAssertion or IdentityState that shows a new inc closes the DM as account.deleted would (§6.4), so this works even at a hosting server that missed account.deleted. The DM then reopens as a new conversation: neither side reads the earlier messages through the server, neither side's earlier acceptance applies (§13.4), auto-accept counts no conversation with the earlier account (§10.2), and clients show W2's new-account wording (07 §16.8).

History. Nobody who joins or is re-added to a secure DM or group DM is served anything from before their join (D-007). An OIDC account takeover that forces a reset (D-071) therefore gets no earlier conversation once the participants' clients re-add the new identity; for a verified contact, W2 blocks that re-add until the user accepts the new key (07). The hosting server withholds the old ciphertext, and nothing hands the new identity a key, so even a hosting server that served the ciphertext would serve something unreadable. A participant can still deliberately share earlier messages with someone (§12.5): in a group DM any participant, in a 1:1 DM the other participant. The recipient then reads them, and every participant other than the recipient, the sharer included, sees K8. Sharing with someone who shouldn't see them is the remaining risk (22 RR-55). Content keys don't expire on members' devices (00 §10 item 3).

Unverified resets in DMs. Under D-071 a reset takes effect at once; for unverified contacts the other participant's client re-adds the new identity automatically after showing W2 (§11.5). Users who need stronger assurance verify their contacts, which turns W2 into a blocking prompt (07). Even then the hosting server serves the new identity nothing from before the re-add (§11.5 item 4, D-007), so a hijacked login that forces a reset can't fetch the conversation's past. Between the reset and the re-add, the person's new-generation devices receive the DM's events as any participant does (13 §13.2), but no sealed item and no earlier timeline item.

21. Open questions

  1. maxDmRequestBytes and large Welcomes. 00 says the 64 KiB cap covers "the Welcome and first SealedMessages". A Welcome with its ratchet tree for a group of 25 people with several devices each can exceed 64 KiB by itself, so this document falls back to omitting the whole Welcome (§8.3; 13 §3.6 forbids omitting the tree), and the recipient then sees the messages only after Accept. Any bound must also respect 06's maxFederationEventBytes (default and floor 128 KiB per S2S event, envelope included). Recommendation: count only events toward maxDmRequestBytes, and bound the welcome member separately at 96 KiB, so that it fits one S2S event; a Welcome larger than that travels alone in a batch of its own, if the recipient home advertises a larger maxFederationEventBytes, and otherwise after Accept.
  2. Who controls a group DM once its creator leaves. Settled by the owner (D-087): once the creator has left, every participant may remove other participants (§12.1). The history control that D-070 gave the creator no longer exists (revised D-007).
  3. History after a reset, in 1:1 DMs and group DMs. Settled by the owner (revised D-007): a participant re-added after an identity change gets nothing from before the re-add, in 1:1 DMs and group DMs alike; §11.5 implements it by restarting the participant's joinedSeq and visibleFromSeq, and there is no history handover to block.

22. References

22.1 Normative

  • 00-overview.md (conventions, security model, HP-3, HP-9), 01-addressing.md, 02-discovery.md, 03-transport.md, 06-federation.md, 07-identity.md, 09-communities-channels.md (membership check, §10.2), 10-roles-moderation.md (DM rate limits and request reports, §10.6), 11-messaging-attachments.md, 13-mls-profile.md, 14-secure-content-history.md
  • RFC 2119, RFC 8174 — requirement key words
  • RFC 5234 — ABNF; RFC 7405 — case-sensitive strings in ABNF
  • RFC 8259 — JSON; RFC 7493 — I-JSON
  • RFC 3339 — timestamps
  • RFC 4648 — base64url
  • RFC 9562 — UUIDv7
  • RFC 9457 — problem details
  • RFC 6234 / FIPS 180-4 — SHA-256
  • RFC 9420 — Messaging Layer Security (Welcome, GroupContextExtensions, external commits, ratchet_tree extension)
  • RFC 7638 — JWK thumbprint
  • RFC 3986 — URIs (percent-encoding of path segments)

22.2 Informative

  • 05-accounts-auth.md, 08-device-setup-recovery.md, 15-calls-control.md, 19-notifications-push.md, 20-client-requirements.md, 22-security-considerations.md
  • RFC 9750 — MLS architecture
  • RFC 8265 — PRECIS usernames; Unicode UTS #39 — confusables (address preparation, via 01)
  • spec/DECISIONS.md — D-007 (revised), D-048, D-049, D-050, D-069, D-087 in particular