Objects
Every wire object and enum, with its fields and allowed values.
462 objects and 425 enums. Types in field tables link here.
00 Overview, architecture and conventions
LabelledSignature other
SignLabelled(key, label, content) = Ed25519-Sign(key, "sv1 sig" || 0x00 || label || 0x00 || content); content is a deterministic length-prefixed binary encoding (never JSON). Labels: sealed, history-share, media-attest; history-link retired. Registry owned by 04.
PostMessageRequest object
Body of POST {base}/v1/contexts/{ctx}/messages (owned by 11/14). Insecure contexts carry content; secure contexts carry sealed whose plaintext is the same content JSON.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | Message ID client-generated; idempotency key |
content | MessageContent | No | Plain content insecure contexts |
sealed | SealedMessage | No | Sealed content secure contexts |
mentions | array<string> | No | Cleartext mention hint (D-063); shown in secure example canonical addresses |
mentionAll | boolean | No | Cleartext mention-all hint (D-063) |
ProblemDetails object
RFC 9457 problem object for HTTP errors (application/problem+json) and WS errors (in d).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | Yes | Problem type URI urn:sloppyv:error:<code> |
code | string | Yes | Registered code <area>.<reason> |
title | string | Yes | Short English summary; clients don't parse it |
status | integer | Yes | HTTP status |
detail | string | No | Human-readable detail |
retryable | boolean | Yes | Whether the same request may succeed later |
retryAfterMs | integer | No | When to retry ms |
userAction | UserAction | Yes | One-tap fix the client renders without parsing text |
data | object | No | Code-specific structured data, defined by the code's owner |
PushGatewayRequestToken jws
typ sv-push+jwt, max lifetime 60 s. Owned by 19.
SFrameKID other
KID = (context_id << (S + E)) + (leaf_index << E) + (epoch mod 2^E), E = 4, S = 16; context_id = (joinNonce << 4) | sourceId; joinNonce fresh random 32-bit per encryptor instance. Owned by 18.
AccountSecurityState (IdentityState sec) enum
| Value | Meaning |
|---|---|
insecure | No account keys |
secure | Has identity key |
AccountState (named values) enum
| Value | Meaning |
|---|---|
upgrade_required | Account homed on a secure server that hasn't turned on encryption; can only turn on encryption or delete itself (SM-1, SM-3; full state set in 05 §8.6) |
AuthorizationScheme enum
| Value | Meaning |
|---|---|
Bearer <token> | home and remote session tokens |
Bot <token> | bot tokens |
Bearer <sv-s2s+jwt> | server-to-server endpoints |
CallEndReason (named values) enum
| Value | Meaning |
|---|---|
security_upgraded | Active call ended by a channel upgrade; clients rejoin as a secure call automatically, keeping mic and PTT state |
CallSeatState (named values) enum
| Value | Meaning |
|---|---|
reconnecting | Seat held for 30 s after an unexpected drop; others see a badge and hear no leave/join sound |
CommunityChannelMembershipState enum
| Value | Meaning |
|---|---|
active | |
pending | |
needs_encryption | Insecure account in a context that became secure; keeps pre-upgrade reads |
banned | |
left |
ConformanceClass enum
| Value | Meaning |
|---|---|
Server | |
SFU-capable server | |
Full client | |
Web client | |
Bot client | |
Push gateway |
DelegationEvidence enum
| Value | Meaning |
|---|---|
dnssec | TXT answer validated under DNSSEC |
same-site | Base-URL host is the queried domain or shares its registrable domain |
wellknown | https://<fqdn>/.well-known/sloppyv agrees with TXT |
dns-only | No further authentication |
DevicePlatform (plat) enum
| Value | Meaning |
|---|---|
desktop | |
web | |
ios | |
android | |
bot |
DmCloseReason (named values) enum
| Value | Meaning |
|---|---|
host_secure | DM closed because its hosting server is a secure server and the DM is or became insecure; marker K5 (12 §13.1) |
DmParticipationState enum
| Value | Meaning |
|---|---|
reserved | |
pending | |
active | |
declined | |
left | |
removed |
DmState (named values) enum
| Value | Meaning |
|---|---|
encryption_pending | Insecure 1:1 DM whose homes are both secure servers: stays in place, refuses content and calls until the insecure participant turns on encryption (12 §13.1) |
FeatureName enum
| Value | Meaning |
|---|---|
voice-dc/1 | mandatory |
video-dc/1 | mandatory |
sfu-rtp/1 | optional |
webhooks | optional, insecure contexts only |
GateCard enum
| Value | Meaning |
|---|---|
G1 | security.account_required or remote security.upgrade_required -> Turn on encryption |
G2 | security.device_not_enrolled -> Set up encryption on this device |
GatewayPolicy (named values) enum
| Value | Meaning |
|---|---|
any | Default: servers deliver to any push gateway (D-093); owned by 19 |
HkdfHmacLabel enum
| Value | Meaning |
|---|---|
sv1 ekid | Epoch key ID from K_hist, 8 bytes (14) |
sv1 msg | K_msg from K_hist and mid (14) |
sv1 kc | Key commitment HMAC label (14) |
sv1 vault | Vault record keys from K_vault (08) |
sv1 vault id | Vault record IDs (08) |
sv1 backup | KeyBackup wrap key from the Argon2id output (08) |
sv1 pair | Pairing payload key from the CPace session key (08) |
sv1 dm | 1:1 DM context ID hash prefix (12) |
HpkeInfoLabel enum
| Value | Meaning |
|---|---|
sv1 vault grant | VaultKeyGrants (08) |
sv1 history-share | K_share of a HistoryShare (14) |
LabelledSignatureLabel enum
| Value | Meaning |
|---|---|
sealed | 14 |
history-share | 14 |
media-attest | 18 |
history-link | reserved and retired; MUST NOT be reused |
LockIndicator enum
| Value | Meaning |
|---|---|
closed | Context advertised secure and client holds current MLS state |
open | "Not encrypted", secure account on insecure context |
gated | Outline "Encrypted" lock in lists/previews/gate card for contexts the user can't open |
MessageCarrier (named values) enum
| Value | Meaning |
|---|---|
plain | Example value of message.created d.carrier for insecure content; full set owned by 11 |
NotifyKind (named values) enum
| Value | Meaning |
|---|---|
call_ring | DM call ring sent in notify.event (F7); full set owned by 19 |
RetiredLabel enum
| Value | Meaning |
|---|---|
sv1 link | Withdrawn automatic history handover; reserved, MUST NOT be reused |
sv1 anchor | Withdrawn automatic history handover; reserved, MUST NOT be reused |
history-link | Retired labelled-signature label; MUST NOT be reused |
SecurityErrorScope (security.account_required data.scope) enum
| Value | Meaning |
|---|---|
community | with data.domain |
channel | with data.ctx (channel, DM or group DM); unknown scope treated as channel |
SecurityMode enum
| Value | Meaning |
|---|---|
insecure | Server can read content; no keys used |
secure | End-to-end encrypted context |
ServerKeyPurpose enum
| Value | Meaning |
|---|---|
sign | |
mls-external-sender |
ServerKeyStatus enum
| Value | Meaning |
|---|---|
next | Published at least 25 h before first use |
active | |
retired | Kept published at least 7 days |
revoked | Compromised, with revocation time |
SFrameSourceId enum
| Value | Meaning |
|---|---|
0 | microphone |
1 | screen video |
2 | screen or application sound |
3 | webcam |
4-15 | reserved |
StreamName (envelope ctx) enum
| Value | Meaning |
|---|---|
ch:<UUIDv7> | channel |
dm:<22-char base64url> | 1:1 DM |
gdm:<UUIDv7> | group DM |
me | account-level events |
community | community-level events |
TypeAndErrorArea (area ownership) enum
| Value | Meaning |
|---|---|
core | 03 (errors only) |
session | 03 |
address | 01 |
discovery | 02 |
crypto | 04 |
auth, account, device, bot | 05 (event type device.revoked is defined by 07) |
federation | 06 |
identity | 07 |
pairing, backup, vault | 08 |
community, member, channel, invite | 09 |
role, permission, moderation, report | 10 |
message, reaction, typing, read, presence, attachment | 11 |
dm | 12 |
mls | 13 |
history, sealed | 14 |
call, relay, sfu | 15 |
media | 18 |
notify, push, notification | 19 |
security | 00 (errors only) |
relayctl | 21 (sloppyv-relay-control.v1 subprotocol messages only; no event types or error codes) |
x-<name> | Implementation extensions (03 §10.4) |
Warning enum
| Value | Meaning |
|---|---|
W1 | Secure account enters insecure community/channel |
W2 | DM contact key changed, downgraded, or address is a new account |
W3 | Group DM has insecure participants |
W4a | Your identity was reset from elsewhere |
W4b | A device not yours under your address in a roster |
W4c | New device enrolled on your account |
W4d | New sign-in on a new device |
W5 | Admin upgrading channel/server confirmation |
W6 | Bot joined a secure context |
W7 | 1:1 DM insecure because contact insecure |
W8 | Recovery key not saved |
W9 | Pinned-secure context presented as insecure |
01 Addresses, display names and links
address.deleted data object
The data member of the 410 address.deleted problem object; MUST NOT carry deletedAt or anything about the deleted account.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
formerKind | string | Yes | What the deleted entry was. user or channel; a bot is reported as user |
address.invalid_local_part data object
data member of the 400 address.invalid_local_part problem object.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | enum LocalPartFailureReason | Yes | Why the local part fails. §3.9; unknown value treated as disallowed_code_point |
index | integer | No | Position of the offending code point. Zero-based code-point index; present only when one code point is to blame and the failure was found in step 4 (index into the string after step 2) or in step 10 / shape rule 1 leading_mark (index into the string after step 9) |
address.non_canonical data object
data member of the 400 address.non_canonical problem object.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | enum NonCanonicalReason | Yes | Why the address isn't canonical. malformed, local_not_prepared, domain_not_alabel, alias_domain; unknown treated as malformed |
field | string | No | Which member held the non-canonical address. JSON Pointer (RFC 6901) to the member, or a claim name |
canonical | string | No | The canonical form of the address. Present if the server knows it |
address.not_allowed data object
data member of the 403 address.not_allowed problem object.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | enum NotAllowedReason | Yes | Why local policy refuses the local part. too_short or blocked |
minChars | integer | No | The server's registration minimum in code points. With too_short |
address.not_found data object
The data member of the 404 address.not_found problem object.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
available | boolean | Yes | Whether an ordinary person could register this local part as a user right now. Advisory |
reason | enum AddressNotFoundReason | No | Why the local part isn't available. Required when available is false; unknown value treated as taken |
minChars | integer | No | Server's registration minimum in code points. When reason is not_allowed because of length |
address.too_similar data object
data member of the 409 address.too_similar problem object; MUST NOT reveal the entry collided with.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
field | enum TooSimilarField | Yes | Which one collided. local or name |
AddressInfo object
200 response of the address lookup; MUST NOT include anything else (no member counts, topics, membership, online state, security state, account age or linked providers).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | enum AddressInfoKind | Yes | What the address names. user or channel; not the Channel object's kind |
address | string (canonical address) | Yes | Canonical address (current address for a renamed channel's old local part during reservation). §7; server's canonicalDomain |
name | string | Yes | Display name. §6.2; receivers apply §6.4 |
bot | boolean | No | Whether the account is a bot. When kind is user |
ctx | string | No | Channel context reference. When kind is channel; ch:<UUIDv7> |
channelKind | enum ChannelKind | No | Channel kind. When kind is channel; text or voice; unknown treated as text |
security | enum ChannelSecurity | No | Channel security mode. When kind is channel; insecure or secure; unknown treated as secure for display, never pins |
AddressRef object
JSON convention for an address carried with its display name; embedding documents MAY add members such as did.
canonicalize() result other
Result of canonicalize(input, defaultDomain), the single function that turns input form into wire form.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string (canonical address) | No | Canonical address. L@C; absent for a community target |
domain | string | Yes | Canonical domain C. Lowercase A-label; always present per §7.2 step 7 table (required flag inferred; spec gives no explicit flag) |
local | string | No | Prepared local part L. Absent for a community target |
baseUrl | string | Yes | The server's base URL. always present per §7.2 step 7 table (required flag inferred; spec gives no explicit flag) |
viaAlias | boolean | Yes | true if typed domain D differs from C. Diagnostics only; MUST NOT be shown; always present per §7.2 step 7 table (required flag inferred; spec gives no explicit flag) |
evidence | delegation evidence level (02) | Yes | Delegation evidence of discovery. Delegation evidence level of 02 (D-030); always present per §7.2 step 7 table (required flag inferred; spec gives no explicit flag) |
invite | string | No | Invite code from a link, if any. Opaque; 09 owns format |
Display name other
The local part with only spaces and capitalization added; display-name = dn-word *( %x20 dn-word ); linked to local part (linkPrepare(N) = L), single U+0020 spaces only (none leading/trailing/doubled), NFC, at most 128 UTF-8 octets.
links.join template variables other
RFC 6570 URI Template (Level 3 or below) published in ServerMetadata links.join (member owned by 02); literal scheme and authority; host must be base-URL host or one of domains, checked by discovery; MUST reference local and invite, MAY reference domain.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | No | Display-local form of the target address. Undefined (not empty) when the target is a community; expansion percent-encodes UTF-8 |
domain | string | Yes | Canonical domain of the target's server. A-label; never undefined |
invite | string | No | Invite code. 09's canonical form; undefined when none |
Namespace entry other
One row of a server's single shared namespace table (users, bots, channels share it); storage is an implementation matter but behaviour must be atomic against the whole table.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | The local part. Prepared local part; unique in the table |
kind | enum NamespaceEntryKind | Yes | user, bot, channel, reserved, renamed or quarantined. |
collisionKeys | array<string> | Yes | Collision keys recorded for the entry. §5.3 |
uv | string | Yes | Unicode version under which the entry was registered or last re-keyed. |
class | enum ReservedClass | No | P, A or C. For reserved entries |
ctx | string | No | The channel that holds the reservation. For renamed entries |
renamedAt | timestamp | No | When the channel was renamed. For renamed entries |
deletedAt | timestamp | No | When the entry was deleted. For quarantined entries |
formerKind | string | No | What the entry was before deletion. For quarantined entries |
sloppyv URI other
sloppyv://[local@]domain[?invite=CODE]; names a user, bot, channel or community, optionally with an invite. web+sloppyv is an equivalent scheme for browsers (never generated for sharing).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
scheme | string | Yes | Scheme. sloppyv or web+sloppyv, case-insensitive |
userinfo | string | No | Local part; absent for a community target. Display-local or prepared local part, non-ASCII as percent-encoded UTF-8; never contains ':'; generated with every octet outside ALPHA/DIGIT percent-encoded with uppercase hex |
host | string | Yes | Domain. A-label domain on generation (canonical domain); on parsing also percent-encoded UTF-8; no port, no IP literal |
invite | string | No | Invite code, opaque to 01. Exactly one; 1 to 64 code points after percent-decoding, valid UTF-8; generated in 09's canonical form (12 Crockford base32 chars, no hyphens) |
AddressInfoKind enum
| Value | Meaning |
|---|---|
user | A user or bot account |
channel | A channel |
AddressInvalidReason (address.invalid data.reason) enum
| Value | Meaning |
|---|---|
too_long | parseInput input over 1,024 code points |
multiple_at | More than one @ |
missing_domain | No domain and no defaultDomain |
empty | Nothing left after trimming/unwrapping |
invalid_utf8 | mailto: percent-decoding gave invalid UTF-8 |
AddressNotFoundReason (address.not_found data.reason) enum
ChannelKind enum
| Value | Meaning |
|---|---|
text | Text channel (default for unknown values) |
voice | Voice channel |
ChannelSecurity enum
| Value | Meaning |
|---|---|
insecure | Insecure channel |
secure | Secure channel (assumed for unknown values when deciding pre-join display) |
Also described in 09 §6.1.
ContextDomain enum
| Value | Meaning |
|---|---|
channel/community screens | Hosting server's canonical domain (timeline, member list, roster, call, mentions picker, member search; community member/role lists, audit log, moderation) |
1:1 DM or group DM | Viewer's home server's canonical domain |
anywhere else | Viewer's home server's canonical domain (contacts, DM index, message requests, notifications, global search) |
DisplayNameMismatchReason (address.display_name_mismatch data.reason) enum
| Value | Meaning |
|---|---|
not_linked | linkPrepare fails or differs from the local part |
too_long | Over 128 octets |
DomainFailureReason (address.invalid_domain data.reason) enum
| Value | Meaning |
|---|---|
empty | Nothing left after trimming |
white_space | White space inside the domain |
empty_label | Leading dot, two dots in a row, or second trailing dot |
ip_literal | Bracketed literal or last label numeric / 0x-hex (WHATWG ends-in-a-number) |
port | Contains ':' |
idna | UTS #46 ToASCII error or invalid xn-- label; fallback for unknown values |
single_label | Fewer than two labels |
too_long | Over 253 octets |
numeric_tld | Last label all digits after mapping |
FormerKind enum
| Value | Meaning |
|---|---|
user | Deleted user (bots reported as user in address.deleted) |
channel | Deleted or long-renamed channel |
InvalidLinkReason (address.invalid_link data.reason) enum
| Value | Meaning |
|---|---|
scheme | Not sloppyv: or web+sloppyv: |
userinfo_password | Userinfo contains ':' |
port | Host has a port |
ip_literal | Bracketed host |
invalid_utf8 | Percent-decoding gave invalid UTF-8 |
duplicate_param | More than one invite parameter |
bad_invite | invite empty, invalid UTF-8 or over 64 code points |
not_a_share_link | No usable alternate sloppyv link found |
fetch_failed | Network error or unreadable (opaque) CORS response while fetching a share link |
LocalPartFailureReason (address.invalid_local_part data.reason) enum
| Value | Meaning |
|---|---|
empty | Nothing left after removing white space |
too_long | Over 64 octets after preparation, or over 256 code points of input |
too_short | Shorter than registration minimum (registration only, inside address.not_allowed) |
disallowed_code_point | Never-allowed character; also the fallback for unknown reasons |
restricted_code_point | Identifier_Type not Recommended/Inclusion/Limited_Use |
unassigned | Unassigned in the implementation's Unicode version |
leading_mark | Starts with a combining mark |
no_letter | No letter at all |
too_many_marks | Run of more than 4 Mn in NFD |
repeated_mark | Mn immediately following an identical Mn |
confusable_mark | U+0307 after a Soft_Dotted letter |
mixed_script | Fails Highly Restrictive script rule |
mixed_digits | Digits from two decimal digit systems |
bidi_rule | Fails RFC 5893 Bidi Rule |
unstable | Preparation isn't idempotent |
contains_at | Input to a local-part-only field contained @ (§9.2) |
invalid_utf8 | Percent-decoded path or link segment wasn't valid UTF-8 |
NamespaceEntryKind enum
| Value | Meaning |
|---|---|
user | User account |
bot | Bot account |
channel | Channel |
reserved | Reserved local part (registry or server-local) |
renamed | Old local part of a renamed channel, reserved for 90 days |
quarantined | Deleted local part in quarantine |
NonCanonicalReason (address.non_canonical data.reason) enum
| Value | Meaning |
|---|---|
malformed | Most general value; receivers treat unknown values as malformed (§12.1). §7.5 does not map individual checks to reasons. |
local_not_prepared | Listed reason (§7.5); by its name, the local part isn't a prepared local part |
domain_not_alabel | Listed reason (§7.5); by its name, the domain isn't a lowercase A-label |
alias_domain | Listed reason (§7.5); by its name, the domain is an alias rather than the canonicalDomain (example in §12.2) |
NotAllowedReason (address.not_allowed data.reason) enum
| Value | Meaning |
|---|---|
too_short | Below the server's registration minimum (with minChars) |
blocked | Refused by local policy (e.g. offensive-word list) |
ReservedClass enum
| Value | Meaning |
|---|---|
P | Protocol: nobody may register as user, bot or channel, not even the operator |
A | Administrative: only the operator may assign to a user/bot it runs (outside the protocol); members with manage_channels MAY use for channels |
C | Channel names: refused for sign-up and bot creation; members with manage_channels MAY create channels with them |
ReservedLocalParts enum
| Value | Meaning |
|---|---|
me | P: account-level context reference and /v1/me paths |
everyone | P: mention keyword |
here | P: mention keyword |
all | P: mention keyword |
system | P |
server | P |
community | P |
sloppyv | P |
null | P |
undefined | P |
none | P |
unknown | P |
nobody | P |
anonymous | P |
deleted | P |
deleteduser | P |
admin | A |
administrator | A |
administrators | A |
root | A |
sysadmin | A |
superuser | A |
owner | A |
operator | A |
staff | A |
team | A |
official | A |
moderator | A |
moderators | A |
mod | A |
mods | A |
support | A |
help | A |
helpdesk | A |
security | A |
abuse | A |
postmaster | A |
hostmaster | A |
webmaster | A |
noreply | A |
info | A |
contact | A |
billing | A |
legal | A |
privacy | A |
status | A |
announcements | A |
news | A |
notifications | A |
sloppyvoice | A |
general | C |
lobby | C |
rules | C |
welcome | C |
chat | C |
voice | C |
music | C |
gaming | C |
events | C |
TooSimilarField (address.too_similar data.field) enum
| Value | Meaning |
|---|---|
local | The local part collided |
name | The display name collided |
02 Discovery, server metadata and server keys
AuthProvider object
Element of auth.providers.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Used in /v1/auth/authorize?provider=<id> (05). 1–32 octets of [a-z0-9_-], unique |
name | string | Yes | Button label. 1–64 code points |
type | ProviderType | Yes | Button styling hint. google | github | microsoft | apple | oidc; unknown -> oidc |
icon | string | No | Button icon for oidc providers. https URL ≤ 512 octets; cosmetic |
signup | boolean | No | Whether this provider may create new accounts (05 §8.3). absent means true; non-boolean ignored |
DiscoveryRecord other
DNS TXT record at _sloppyv.<D>; record text = concatenation of all character-strings of one RR. ABNF: sv-record = WSP "v=sv1" 1(1*WSP sv-param) *WSP; url-param exactly once; ext-param ignored. Example: v=sv1 url=https://chat.sloppyvoice.com/server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | string | Yes | Version tag. first token, exactly v=sv1 (case-insensitive) |
url | string | Yes | Base URL of the server. exactly once; a base-url (§3.3); parameter name case-insensitive |
<ext-param> | string | No | Extension parameters, ignored by v1 consumers. param-name = ALPHA (ALPHA / DIGIT / "-"); param-value = 1VCHAR; no name twice |
Also described in 00 §2.1, §8 F1.
DiscoveryResult other
Internal output of a successful resolution; wire projection is ResolveResult.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The queried domain D. |
baseUrl | string | Yes | Normalized base URL. normalized |
source | Source | Yes | Where the delegation came from. |
evidence | Evidence | Yes | Delegation evidence. |
canonicalDomain | string | Yes | Server's canonical domain. verified per §5.3 |
metadata | ServerMetadata | Yes | Validated metadata. validated per §7.4 |
resolvedAt | timestamp | Yes | When the delegation was obtained. |
delegationExpiresAt | timestamp | Yes | Freshness of the delegation half. |
metadataExpiresAt | timestamp | Yes | Freshness of the metadata half. |
stale | boolean | Yes | True while a stale copy is being used. |
KeyRotation jws
Compact JWS (typ sv-keyrot+jwt) in which the server's active sign key vouches for a new key of the same server; permanent (no exp); ≤ 2,048 octets compact.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
header.alg | string | Yes | Algorithm. "EdDSA" |
header.typ | string | Yes | Type. "sv-keyrot+jwt" |
header.kid | string | Yes | kid of the signing key. |
iss | string | Yes | Server's canonical domain. equals canonicalDomain |
n | integer | Yes | Position in the chain. 1 for the first rotation, then +1 |
iat | integer | Yes | When signed. NumericDate |
prev | string | Yes | Thumbprint of the signing key. thumbprint of the key named by header kid |
key | KeyRotationKey | Yes | The new key. exactly kty, crv, x, kid, purpose; kid domain = iss; thumbprint ≠ prev |
url | string | Yes | Base URL the server authorises from this rotation on. normalized base URL; once a new URL is named, every later KeyRotation names it until the next move |
Also described in 00 §6 HP-7, §7.13.
KeyRotationKey object
The key claim of a KeyRotation: exactly these members; status and times live in keys.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kty | string | Yes | Key type. "OKP" |
crv | string | Yes | Curve. "Ed25519" |
x | base64url | Yes | Public key. 32 octets |
kid | string | Yes | Key ID. server-kid; domain equals iss |
purpose | KeyPurpose | Yes | Purpose. |
MetadataAuth object
ServerMetadata auth.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
providers | array<AuthProvider> | Yes | OIDC providers configured by the admin. 0–16, in display order; MAY be empty |
registration | Registration | Yes | Who may create an account. open | invite | closed; unknown -> closed |
MetadataChangedPayload object
Payload d of discovery.metadata_changed; receivers MUST NOT take any value from it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
canonicalDomain | string | Yes | Server whose metadata changed. |
updatedAt | timestamp | Yes | New updatedAt. |
changes | array<MetadataChange> | Yes | Changed areas. |
urgent | boolean | Yes | Key revoked. |
MetadataContact object
ServerMetadata contact; all optional, each invalid member ignored.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
operator | string | No | Who runs the server. ≤ 100 code points |
admin | string | No | General admin contact. mailto: or https: URI |
abuse | string | No | Abuse reports. mailto: or https: URI; RECOMMENDED |
security | string | No | Security reports. mailto: or https: URI |
url | string | No | About page. https URL |
MetadataEndpoints object
ServerMetadata endpoints.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
api | string | Yes | The server's base URL; every API path is relative to it. normalized base URL; MUST equal the normalized base URL the metadata was fetched from, else discovery.metadata_invalid |
relayUrl | string | Yes | Default media relay base URL; connection is {relayUrl}/connect (15). base-url; a call-join response's relay URL takes precedence for that call |
push | MetadataPush | Yes | How this server, as home server, delivers pushes (19). |
MetadataLimits object
Container of non-negative integers named max<Thing><Unit>; members owned by 00 §7.12 / 03 §16.3 registrations. Server MUST include every registered limit and never below its floor; consumer uses the floor when missing/invalid; unknown members ignored.
MetadataLinks object
ServerMetadata links.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
join | string | No | Share-link template. RECOMMENDED; RFC 6570 template level ≤ 3, ≤ 512 octets; variables only local, domain, invite; expansions https; scheme and authority literal; host = endpoints.api host or one of domains; invalid -> treated as absent |
web | string | No | Origin of the server's own web client (20 §16.11). https URL ≤ 512 octets; NOT cosmetic: invalid value kept as 'present, matching no origin' |
terms | string | No | Terms of service. https URL; cosmetic |
privacy | string | No | Privacy notice. https URL; cosmetic |
help | string | No | Help page. https URL; cosmetic |
MetadataPush object
ServerMetadata endpoints.push.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
gatewayPolicy | GatewayPolicy | Yes | Which push gateways the server delivers to. any | listed; unknown -> listed; software default any (D-093) |
gateways | array<string> | No | Allowed push gateways. required when gatewayPolicy is listed; 0–32 normalized base-urls (gatewayUrl of 19 §9.1 without /v1/push) |
webPushKey | base64url | No | VAPID public key; absent means no Web Push. 65-octet uncompressed P-256 point |
MetadataSoftware object
ServerMetadata software; diagnostics only, consumers MUST NOT change behaviour based on it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | Implementation name. ≤ 64 code points |
version | string | No | Implementation version. ≤ 32 code points |
PeerPin object
Wire form of a pin (admin API and discovery.peer_suspended payload).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Queried domain. |
state | PinState | Yes | Pin state. unknown -> suspended |
canonicalDomain | string | Yes | Pinned canonical domain. |
baseUrl | string | Yes | Pinned base URL. |
secure | boolean | Yes | Pinned secure flag. |
evidence | Evidence | Yes | Evidence at creation/last change. unknown -> dns-only |
keys | array<PeerPinKey> | Yes | Pinned keys. |
revoked | array<string> | Yes | Revoked thumbprints. |
firstSeenAt | timestamp | Yes | First seen. RFC 3339 |
changedAt | timestamp | Yes | Last changed. RFC 3339 |
lastVerifiedAt | timestamp | Yes | Last verified. RFC 3339 |
suspendedAt | timestamp | No | When suspended. present when suspended |
reason | PinReason | No | Why suspended. present when suspended; unknown -> generic conflict |
observed | PeerPinObserved | No | Rejected candidate. present when suspended |
PeerPinKey object
Key entry in PeerPin.keys and observed.keys.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kid | string | Yes | Key ID. |
thumbprint | string | Yes | Thumbprint. RFC 7638 base64url |
purpose | KeyPurpose | Yes | Purpose. unknown -> show as unknown |
status | KeyStatus | Yes | Status. unknown -> show as unknown |
PeerPinObserved object
PeerPin.observed: the rejected candidate.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
baseUrl | string | Yes | Observed base URL. |
canonicalDomain | string | Yes | Observed canonical domain. |
secure | boolean | Yes | Observed secure flag. |
evidence | Evidence | Yes | Observed evidence. |
keys | array<PeerPinKey> | Yes | Observed keys. |
observedAt | timestamp | Yes | When observed. |
PeerResumedPayload object
Payload d of discovery.peer_resumed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Domain. |
how | ResumeHow | Yes | How it resumed. unknown -> auto |
baseUrl | string | Yes | Base URL (the spec gives only its type). |
PinAcceptRequest object
Body of POST /v1/resolve/pins/{domain}/accept; must equal the observed values.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
baseUrl | string | Yes | Reviewed base URL. = observed.baseUrl |
canonicalDomain | string | Yes | Reviewed canonical domain. = observed.canonicalDomain |
keyThumbprints | array<string> | Yes | Reviewed keys. = observed key thumbprints |
PinList object
200 body of GET {base}/v1/resolve/pins: {"items": [PeerPin…], "nextCursor": …} (cursor pagination, 00 §7.10).
ResolveResult object
200 body of GET /v1/resolve.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The queried domain. lowercase A-label |
baseUrl | string | Yes | Normalized base URL. normalized |
canonicalDomain | string | Yes | Canonical domain, verified per §5.3. |
source | Source | Yes | Delegation source. unknown -> wellknown |
evidence | Evidence | Yes | Delegation evidence. unknown -> dns-only |
resolvedAt | timestamp | Yes | Time of the delegation. RFC 3339 |
expiresAt | timestamp | Yes | When the client's cached copy expires. ≤ 86,400 s after the response |
stale | boolean | Yes | Server is using a stale copy. |
ServerKey object
Ed25519 public JWK (RFC 7517/8037) in ServerMetadata keys; identified by RFC 7638 thumbprint over crv, kty, x; kid is only a lookup hint. MUST NOT contain d. use/key_ops/x5c/x5t/x5u/jku ignored and never fetched.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kty | string | Yes | Key type. "OKP" |
crv | string | Yes | Curve. "Ed25519" |
x | base64url | Yes | Public key. exactly 32 octets, canonical, not small order (04) |
kid | string | Yes | Key ID for JWS headers. server-kid (§11.2); unique within keys |
purpose | KeyPurpose | Yes | What the key may sign. sign | mls-external-sender; unknown -> key ignored |
status | KeyStatus | Yes | Lifecycle state. next | active | retired | revoked; unknown -> key ignored |
nbf | integer | Yes | From when the key may sign. NumericDate |
exp | integer | Yes | After which nothing signed by the key is accepted (except §12.3 continuity check). NumericDate; nbf < exp ≤ nbf + 63,158,400 (731 days) |
retiredAt | integer | No | When the key stopped being active. required when status is retired; nbf ≤ retiredAt < exp |
rvt | integer | No | Earliest possible compromise time (or revocation time). required when status is revoked; NumericDate |
alg | string | No | JWS algorithm. if present "EdDSA" |
Also described in 00 §6 HP-7, §7.7.
ServerMetadata object
Body of {base}/meta: I-JSON, UTF-8, at most 262,144 octets, unknown members ignored; 'cosmetic' members are dropped when invalid instead of invalidating the document. Not signed; integrity rests on TLS.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
canonicalDomain | string | Yes | The server's one canonical domain. lowercase A-label valid per §5.1; element of domains; immutable for the life of the server |
domains | array<string> | Yes | Canonical domain plus alias domains. 1–100 elements, no duplicates, each lowercase A-label valid per §5.1 |
name | string | Yes | Display name. 1–64 code points after trimming; NFC; MUST equal Community name (09) |
description | string | No | One-paragraph description. ≤ 500 code points; cosmetic |
icon | string | No | Square icon image. https URL ≤ 512 octets; PNG/WebP/JPEG, ≥ 256×256 RECOMMENDED; cosmetic |
secure | boolean | Yes | The server's secure flag. MUST equal Community secure (09); never true -> false (D-073) |
securedAt | timestamp|null | Yes | When the server became (or was created) secure. null while secure is false; MUST equal Community securedAt; immutable once set |
versions | array<string> | Yes | Protocol versions spoken. each a proto-version (03 §12.1); one per major version, giving highest minor; v1 servers list "1.0" or later "1.x" |
minClient | string | Yes | Lowest protocol version a client must implement. proto-version; "1.0" unless a later minor is needed |
features | array<string> | Yes | Every feature implemented, mandatory ones included. each a feature (03 §12.2) ≤ 64 octets; MUST include voice-dc/1 and video-dc/1; unknown names ignored |
keys | array<ServerKey> | Yes | Server public keys. 1–16 elements; §11.5 rules |
keyChain | array<string> | Yes | KeyRotation chain. 0–64 compact KeyRotation JWSs; §12.2 rules; empty if never rotated |
endpoints | MetadataEndpoints | Yes | Where to reach the server's parts. |
auth | MetadataAuth | Yes | Login and registration information. |
limits | MetadataLimits | Yes | Advertised size limits. |
links | MetadataLinks | Yes | Link templates and public pages. MAY be empty object |
contact | MetadataContact | No | Operator and contact info. RECOMMENDED; cosmetic |
software | MetadataSoftware | No | Implementation name and version. cosmetic; diagnostics only |
updatedAt | timestamp | Yes | When any other member last changed. RFC 3339 |
Also described in 00 §2.1, §7.8, §6 HP-7.
WellKnownDocument object
JSON at https://D/.well-known/sloppyv, at most 4,096 octets; unknown members ignored.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | string | Yes | Protocol version. MUST be "sv1" |
url | string | Yes | Base URL for D. base-url |
ChainStatus enum
| Value | Meaning |
|---|---|
ok | |
fork | Element at n = chainHead.n differs |
rollback | Chain empty or ends before chainHead.n |
failed | Shape error, signature failure or claim check failure |
Evidence enum
| Value | Meaning |
|---|---|
dnssec | TXT answer (and CNAME chain) validated Secure by a trusted validating resolver; never recorded by web clients |
same-site | Base-URL host equals D or shares D's registrable domain (PSL ICANN+PRIVATE) |
wellknown | Source wellknown, or TXT confirmed by a matching .well-known document (W-c) |
dns-only | Only the DNS answer; accepted on first use and pinned |
GatewayPolicy enum
| Value | Meaning |
|---|---|
any | Deliver to any push gateway a device registers (default) |
listed | Only to gateways in gateways; unknown values treated as listed |
KeyPurpose enum
| Value | Meaning |
|---|---|
sign | Every JWS the server signs (HomeAssertion, S2S token, IdentityState, RelayTicket, sv-push+jwt, KeyRotation) |
mls-external-sender | MLS messages as the group's external sender; never signs a JWS |
KeyStatus enum
| Value | Meaning |
|---|---|
next | Published ahead (nbf ≥ 25 h after first appearance) |
active | Currently signing; exactly one per purpose |
retired | Stopped signing; retiredAt set; verifiable for iat ≤ retiredAt until exp |
revoked | Compromised or lost; rvt set; never returns |
KeyUnusableReason enum
| Value | Meaning |
|---|---|
wrong_purpose | |
revoked | |
expired | |
not_yet_valid | |
stale |
MetadataChange enum
| Value | Meaning |
|---|---|
keys | |
domains | |
endpoints | |
auth | |
limits | |
features | |
versions | |
secure | |
other | Anything else; fallback for unknown values |
MetadataInvalidReason enum
| Value | Meaning |
|---|---|
not_json | |
too_large | |
redirect | |
missing_member | |
bad_member | |
bad_domains | |
api_mismatch | |
invalid_keys | |
invalid_key_chain | |
private_key_published | A ServerKey contains d |
PinReason enum
| Value | Meaning |
|---|---|
key_unrevoked | A revoked thumbprint reappeared with another status; never accepted, not admin-acceptable |
secure_downgrade | secure true -> false; never accepted, not admin-acceptable |
canonical_changed | Canonical domain changed |
chain_fork | keyChain element at chainHead.n has a different hash |
chain_rollback | keyChain ends before chainHead (replaces base_url_changed/keys_changed) |
base_url_changed | Base URL changed without strong evidence or URL-bound rotation |
keys_changed | New or re-labelled keys not vouched for and evidence weak |
ProviderType enum
| Value | Meaning |
|---|---|
google | |
github | GitHub |
microsoft | Microsoft |
apple | Apple |
oidc | Any other OIDC issuer; also the fallback for unknown values |
Also described in 05 §3.3, §4.1.
RecordInvalidReason enum
| Value | Meaning |
|---|---|
malformed | |
conflicting | |
bad_url | |
wellknown_invalid |
Registration enum
| Value | Meaning |
|---|---|
open | Anyone signing in with a listed provider |
invite | Only with an invite |
closed | No new accounts; fallback for unknown values |
Also described in 05 §8.3.
ResumeHow enum
| Value | Meaning |
|---|---|
auto | Re-check matched the pin again (fallback for unknown) |
evidence | Re-check found the difference now acceptable |
admin | Admin accepted the observed result |
Source enum
| Value | Meaning |
|---|---|
txt | Delegation from the discovery record |
wellknown | Delegation from the .well-known document alone |
WellKnownCase enum
| Value | Meaning |
|---|---|
W-a | No TXT record (everyone) |
W-b | Temporary DNS failure (everyone); freshness ≤ 300 s |
W-c | Valid TXT record that would be dns-only: servers MUST, native clients SHOULD for home server at sign-in, MAY otherwise |
WellKnownFetchOutcome enum
| Value | Meaning |
|---|---|
present | 200 with a valid body |
invalid | 200 with an invalid body |
absent | 404/410, bad redirect outcome, or D has no A/AAAA |
unavailable | Connection/TLS failure, timeout, 429, 5xx or other unexpected status |
03 Client transport, envelopes and errors
AuthorizationHeader other
authorization = auth-scheme 1SP credentials; auth-scheme = "Bearer" / "Bot" (case-insensitive); credentials = 14096token-char; token-char = ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" / "=" (RFC 9110 token68, max 4,096 chars).
Base64urlIds other
b64u-64 = 10b64u-char b64u-last2 (8 bytes, 11 chars); b64u-128 = 21b64u-char b64u-last4 (16 bytes, 22 chars); b64u-256 = 42b64u-char b64u-last2 (32 bytes, 43 chars). b64u-last2 in AEIMQUYcgkosw048; b64u-last4 in AQgw. did = b64u-128; key-thumbprint (ikf, dkf) = b64u-256; ekid = b64u-64; jti = 22*86b64u-char and canonical.
CollectionPage object
Response of collection endpoints paged by opaque cursor.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<object> | Yes | The page. order defined by owner, MUST be stable |
nextCursor | string|null | Yes | Cursor for the next page. cursor grammar; null at the end |
total | integer | No | Total count. owner MAY define exact or estimated |
Also described in 00 §7.10.
ContextReference other
ctx-ref = channel-ref / dm-ref / gdm-ref; channel-ref = %s"ch:" uuid7; dm-ref = %s"dm:" b64u-128; gdm-ref = %s"gdm:" uuid7. ch:/gdm: generated by hosting server; dm: computed from the two canonical addresses (12).
Envelope object
Every WebSocket message in either direction; one JSON object per UTF-8 text message. Not used on HTTP bodies.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Envelope version. MUST be 1 on sloppyv.v1 |
t | string | Yes | Message or event type. event-type grammar <area>.<name>, or reserved type error |
id | uuidv7 | Yes | ID of this envelope. for durable events fixed when sequenced, same in every delivery/replay; otherwise fresh |
re | uuidv7 | No | The id of the message being answered. server-to-client only on replies; client-to-server only on session.pong |
ctx | string | No | The stream the event belongs to: a context reference, me or community. server-to-client on every event, absent on control messages; client-to-server absent/ignored |
seq | integer | No | Sequence number in the stream ctx names. 1 to 2^53 − 1; durable events only; absent/ignored client-to-server |
ts | timestamp | No | Server timestamp; for durable events the time it was sequenced, same in every delivery. required server-to-client; optional and ignored client-to-server |
d | object | Yes | Payload, defined by the owner of t. {} when nothing to carry |
Also described in 00 §7.4.
ErrorCodeAndEventTypeGrammar other
error-code = area "." reason; area = LCALPHA (LCALPHA / DIGIT) / ext-area; ext-area = %s"x-" 1(LCALPHA / DIGIT); reason = LCALPHA *(LCALPHA / DIGIT / ""). event-type = area "." name / %s"error"; name = LCALPHA *(LCALPHA / DIGIT / "").
FeatureName other
feature = feat-name ["/" %x31-39 *2DIGIT]; feat-name = LCALPHA *(LCALPHA / DIGIT / "-"); at most 64 characters.
Head object
Value in session.heads.heads map.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
headSeq | integer | Yes | The stream's latest seq. |
lastItemSeq | integer | No | seq of the latest durable timeline-item event this socket's account would receive with full payload; withheld events don't count. absent if none |
lastItemAt | timestamp | No | That event's ts. |
IdempotencyKeyHeader other
Idempotency-Key = idempotency-key / (DQUOTE idempotency-key DQUOTE); quoted and unquoted forms are the same key.
IdentifierRegistry other
The identifier format registry of 03 §8.4 (makes 00 §7.6's table normative). Each entry: format, wire type, who generates it, owner of semantics. Identifiers are compared as exact byte strings (addresses in canonical form); non-canonical spellings are rejected with 400 core.invalid_request.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
Address | string | — | Generated at registration (05, 09); owner 01 canonical local@domain: local part PRECIS-prepared, case-folded, UTF-8 NFC; domain a lowercase A-label (D-032); display form in a separate name member |
ctx | string | — | Context reference; generated by hosting server, dm: computed by anyone; owner 03 (format), 09, 12 ctx-ref (§8.3) |
stream | string | — | Stream name; owner 03 stream (§8.3) |
mid | uuidv7 | — | Message ID, generated by the sending client; owners 11, 14 uuid7 |
other object IDs | uuidv7 | — | Generated by the server; each object's owner uuid7 |
id / conn | uuidv7 | — | Envelope id (sender of the envelope) and connection conn (server); owner 03 uuid7 |
did | base64url | — | Device ID, generated by the home server at device registration; owner 05 b64u-128: 16 random bytes, 22 characters |
pid | integer | — | Participant index, generated by the hosting server; owner 15 0 to 65,535, unique within a call |
jti | base64url | — | Generated by the issuer of the JWS; owners 04, 06 jti grammar: at least 128 random bits, at most 64 bytes, canonical; issuers SHOULD use exactly 16 bytes |
server kid | string | — | Server key ID, generated by the server; owner 02 server-kid, e.g. a.com#2026-12a |
ikf / dkf | base64url | — | Identity and device key IDs, computed by anyone; owners 04, 07 key-thumbprint: RFC 7638 SHA-256 JWK thumbprint, 43 characters |
MLS group_id | MLS bytes | — | Generated by the group creator; owner 13 mls-group-id carried as UTF-8 bytes inside MLS |
ekid | base64url | — | Epoch key ID, computed by anyone from K_hist; owner 14 b64u-64 (11 characters) |
seq | integer | — | Generated by the server that owns the stream; owner 03 1 to 2^53 − 1 per stream, gap-free for durable events |
Idempotency-Key value | header | — | Generated by the client; owner 03 idempotency-key (§14.2) |
cursor | string | — | Pagination cursor generated by the server; owner 03 cursor, opaque (§13.2) |
instance | string | — | Problem instance generated by the server; owner 03 problem-instance (urn:uuid:<uuid7>) |
feature name, version, event type, error code | string | — | Registry values; owners 03 and others §12.2, §12.1, §11.1, §10.4 |
InvalidRequestErrorItem object
Item of data.errors of core.invalid_request (array of at most 32 items).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
source | enum InvalidRequestSource | Yes | Where the error is. body|query|path|header; unknown treated as body |
pointer | string | No | Offending member. required when source is body; RFC 6901 JSON Pointer |
name | string | No | Parameter or header name. required when source isn't body |
reason | enum InvalidRequestReason | Yes | Kind of failure. unknown treated as other |
detail | string | No | Plain-text detail for developers. |
MiscIdentifierGrammars other
server-kid = canonical-domain "#" key-id; key-id = 132(ALPHA / DIGIT / "." / "" / "-"); mls-group-id = %s"sv1:" canonical-domain ":" ctx-ref ":" generation; generation = "0" / (%x31-39 15DIGIT); idempotency-key = 164(ALPHA / DIGIT / "-" / "." / "" / "~"); cursor = 1512(ALPHA / DIGIT / "-" / "." / "_" / "~"); problem-instance = %s"urn:uuid:" uuid7.
PolicyAndLimitNames other
policy-name = 164(LCALPHA / DIGIT / "_" / "." / "-"); limit-name = %s"max" thing unit; thing = (%x41-5A 1(LCALPHA / DIGIT)); unit = %s"Bytes" / %s"Ms" / (%x41-5A 1LCALPHA).
ProblemObject object
RFC 9457 problem details (application/problem+json) for HTTP errors; also d of a WebSocket error, and problem in SubscriptionResult, session.subscription_ended and session.closing.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | Yes | Clients use code, not type. urn:sloppyv:error: followed by code |
code | string | Yes | The registered error code. error-code grammar (§10.4) |
title | string | Yes | Short summary; clients don't parse it. at most 200 characters; English unless server honours Accept-Language |
status | integer | Yes | The HTTP status. over HTTP MUST equal the response status |
detail | string | No | Human-readable detail. at most 1,000 characters |
instance | string | No | Identifies this occurrence; server logs it. urn:uuid:<UUIDv7> (problem-instance grammar) |
retryable | boolean | Yes | Whether the same request may succeed later without any change. |
retryAfterMs | integer|null | No | Minimum delay before retrying. absent or null = no hint; required for core.rate_limited |
userAction | UserAction | Yes | One-tap fix the client offers, as the code's registry entry defines. unknown value treated as none |
data | object | No | Code-specific structured data defined by the code's owner. |
ProtocolVersion other
version = major "." minor; major = %x31-39 *2DIGIT; minor = "0" / (%x31-39 *3DIGIT).
SessionClosing object
Payload d of session.closing (see events).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | ClosingReason | Yes | Close reason. |
reconnect | boolean | Yes | Reconnect automatically? |
retryAfterMs | integer | No | Minimum reconnect delay. |
problem | ProblemObject | No | For session_ended, unauthenticated, unsupported_version, rate_limited. |
StreamName other
stream = ctx-ref / %s"me" / %s"community". me and community are never context references and never appear in a {ctx} path parameter.
SubscriptionResult object
Outcome of subscribing one stream, in session.ready and session.subscribed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
stream | string | Yes | The stream. stream name (§8.3) |
level | enum SubscriptionLevel | Yes | Subscription level. full|heads |
status | enum SubscriptionStatus | Yes | Result. ok|refused; unknown treated as refused |
headSeq | integer | No | Stream's latest seq when the subscription took effect. required when ok; 0 if the stream has no events yet |
replayThrough | integer | No | Events from requested position + 1 up to this value are replays. equal to headSeq; present only when replay follows |
problem | ProblemObject | No | Why refused; core.not_found (never core.forbidden) for contexts the caller may not know about. required when refused |
TimelinePage object
Response of timeline endpoints (owned by 11) paged by seq with before/after/limit.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<object> | Yes | Timeline items, each with its seq (item objects owned by 11). always ascending seq order whichever direction; seq values not contiguous |
hasMore | boolean | Yes | With before or neither: older items visible to caller exist. With after: newer items exist up to headSeq. empty page has hasMore false |
headSeq | integer | Yes | Stream head when the page was read; used by §7.5 resync. never advances the client position |
Also described in 00 §7.10.
Timestamp other
timestamp = date %s"T" time "." 3DIGIT %s"Z" — RFC 3339 UTC, exactly 3 fractional digits, uppercase Z. Producers emit exactly this; consumers SHOULD accept any RFC 3339 date-time, converting to UTC and truncating to ms.
UUIDv7 other
uuid7 = 8LHEX "-" 4LHEX "-" %x37 3LHEX "-" uuid-var 3LHEX "-" 12LHEX; uuid-var = 8/9/a/b; lowercase hex only, 36 chars. RFC 9562 §5.7; rand_b from CSPRNG; binary form = 16 bytes in hex-string order.
WithheldPayload object
D4a withheld form of a durable event's d for a subscriber who may see nothing of the payload: same t, ctx, seq, id, ts; d = {"withheld": true}. Owner MAY add members identifying the affected object (e.g. 11's target). withheld is reserved in every durable payload.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
withheld | boolean | Yes | Client advances P past the event and does nothing else; never shown as a timeline item; doesn't count toward lastItemSeq. true |
Also described in 09 §7.2, §14.1.
ClientSocketState enum
| Value | Meaning |
|---|---|
idle | No socket needed. |
connecting | Handshake in progress. |
awaiting_ready | hello sent, waiting up to 15 s for session.ready. |
ready | Operating. |
backoff | Waiting to reconnect. |
stopped | Update required or unrecoverable auth. |
CloseCode enum
| Value | Meaning |
|---|---|
1000 | Normal closure by the client. |
1001 | Going away; reconnect with backoff if still needed. |
1002 | WebSocket protocol violation; reconnect with backoff, diagnostic. |
1003 | Binary message; reconnect with backoff, diagnostic. |
1007 | Invalid UTF-8; reconnect with backoff, diagnostic. |
1009 | too_large; reconnect with backoff, diagnostic. |
1011 | Internal server error; reconnect with backoff. |
1012 | server_shutdown; reconnect after retryAfterMs or random 1-10 s. |
1013 | Try again later; reconnect after retryAfterMs or backoff of at least 5 s. |
4000 | protocol_error; reconnect with backoff, diagnostic. Browser substitute for 1002/1003/1007/1009. |
4001 | unauthenticated; recover token (§3.3), reconnect at once first time after recovery, else backoff. |
4004 | session_ended; don't reuse token; follow problem userAction; remote sessions recreated silently. |
4008 | hello_timeout/idle_timeout; reconnect at once, then with backoff. |
4010 | replaced; reconnect silently once only if no other local instance known (§5.12). |
4011 | slow_consumer; backoff at least 1 s; SHOULD move unviewed streams to heads (never a call's context). |
4026 | unsupported_version; stop, show update required. |
4029 | rate_limited; reconnect after retryAfterMs or 60 s. |
ClosingReason enum
| Value | Meaning |
|---|---|
too_large | Close 1009: a message exceeded maxEventBytes. |
server_shutdown | Close 1012: restart or connection moved. |
protocol_error | Close 4000: invalid envelope or hello payload, message before hello. |
unauthenticated | Close 4001: token invalid/expired/revoked at hello, or auth deadline passed without reauth. |
session_ended | Close 4004: the client session ended. |
hello_timeout | Close 4008: no hello within 10 s. |
idle_timeout | Close 4008: no message for 75 s. |
replaced | Close 4010: a newer socket of the same client session took over. |
slow_consumer | Close 4011: client couldn't keep up. |
unsupported_version | Close 4026: protocol below minClient or unknown envelope v. |
rate_limited | Close 4029: too many client messages or connections. |
EventClass enum
| Value | Meaning |
|---|---|
durable | Has seq in exactly one stream, retained for replay, delivered to every full subscriber. |
ephemeral | No seq, never replayed, at most once, may be coalesced/dropped. |
s2s | S2S-only types carried by 06's S2S envelope. |
Also described in 00 §7.4.
Feature enum
| Value | Meaning |
|---|---|
voice-dc/1 | Owner 16. Servers mandatory; mandatory for Full and Web clients, optional for Bot clients. Voice frames over WebRTC data channels through the hosting server's relay (D-094). |
video-dc/1 | Owner 17. Servers mandatory; mandatory for Full and Web clients, optional for Bot clients. Screen share and webcam over data channels. |
sfu-rtp/1 | Owner 17. Optional for servers, required for SFU-capable server class; mandatory for Full and Web clients, optional for Bot. RTP via SFU. |
webhooks | Owner 11. Optional for servers; not applicable to clients. Webhooks in insecure contexts. |
IdempotencyConflictReason enum
| Value | Meaning |
|---|---|
mismatch | Key or client-generated ID reused with a different fingerprint; retryable false. |
in_progress | First request with that key still processing; retryable true, retryAfterMs >= 500. |
InvalidRequestReason enum
| Value | Meaning |
|---|---|
missing | Missing. |
type | Wrong type. |
format | Bad format. |
range | Out of range. |
length | Bad length. |
enum | Not an allowed enum value. |
duplicate | Duplicate. |
not_allowed | Not allowed. |
other | Other; fallback for unknown values. |
InvalidRequestSource enum
| Value | Meaning |
|---|---|
body | Request body (fallback for unknown). |
query | Query parameter. |
path | Path parameter. |
header | Header. |
NotFoundReason enum
| Value | Meaning |
|---|---|
unknown_endpoint | core.not_found data.reason: server doesn't implement the endpoint; caller treats feature as absent. Unknown values ignored. |
RateLimitPolicy enum
| Value | Meaning |
|---|---|
session | Per client session. |
ip | Per IPv4 address / IPv6 /64. |
peer | Per federation peer (canonical domain of S2S token iss). |
socket | Client messages on the WebSocket. |
handshake | WebSocket handshakes per IP address. |
Also described in 08 §15, §5.7, §6.10.
ResyncReason enum
| Value | Meaning |
|---|---|
gap_too_large | H − P > maxReplayEvents. Fallback for unknown values. |
expired | Events no longer retained. |
ahead | P > H; client MUST discard event-derived cached state. |
access_changed | Read access lapsed and was regained after P (or server can't tell). |
buffer_overflow | Server dropped queued durable events under backpressure (§7.6). |
server_reset | Stream deleted and recreated / renumbered; client MUST discard event-derived cached state. |
ServerSocketState enum
| Value | Meaning |
|---|---|
awaiting_hello | Handshake done, up to 10 s for session.hello. |
ready | Authenticated. |
closed | Closed. |
SubscriptionLevel enum
| Value | Meaning |
|---|---|
full | Socket receives every durable and ephemeral event of the stream. |
heads | Socket receives only session.heads updates; context references only. |
SubscriptionStatus enum
| Value | Meaning |
|---|---|
ok | Subscribed. |
refused | Refused; problem explains. Unknown values treated as refused. |
UnknownEnumRule enum
| Value | Meaning |
|---|---|
fallback | Treat as a named known value. |
ignore item | Ignore the containing array element or object (client default when unspecified). |
reject | Whole message invalid; only where other readings could be unsafe. |
UserAction enum
| Value | Meaning |
|---|---|
none | Nothing the user can do; show short failure message, no button. Fallback for unknown values. |
retry | Trying again may work; offer Try again; retry automatically first where §2.7 allows. |
wait | Temporary overload/unavailability; retry automatically after retryAfterMs; waiting state only if user waits > 2 s. |
sign_in | Client session gone; recover silently first (§3.3), then home sign-in screen (M1). Only the home server can cause this screen. |
enable_encryption | Account must turn on encryption; show G1 (M4), resume action afterwards. |
set_up_device | Device must be set up for encryption; show G2 (pairing M5 or recovery key), resume afterwards. |
update_app | App too old for this server; show update required screen. |
contact_admin | Only the operator can fix; offer ServerMetadata contact info and show instance. |
Also described in 00 §7.9.
04 Cryptographic conventions
Argon2idParams object
Parameters of a stored Argon2id computation (e.g. KeyBackup kdf, 08 §5.1). Output length is always 32 bytes and isn't carried. Unknown members ignored.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
alg | string | Yes | Algorithm "argon2id"; other → crypto.unsupported_algorithm |
v | integer | Yes | Argon2 version (0x13) 19 |
m | integer | Yes | Memory in KiB 65,536 to 262,144 (KiB); producers use 65,536 |
t | integer | Yes | Passes 3 to 10; producers use 3 |
p | integer | Yes | Lanes 1 |
salt | base64url | Yes | Salt exactly 16 bytes decoded (22 chars); from CSPRNG |
CPace values in 08 pairing messages (cpace_a, cpace_b, confirm_a) other
08 owns the message bodies (08 §6.6.2); 04 defines the byte values, each base64url-encoded in the body. cpace_a (initiator): cred, ya, ad. cpace_b (responder): yb, ad, tb. confirm_a (initiator): ta.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cred | enum CPacePrsKind | Yes | How the user entered the secret "qr" (prs_kind 1) or "code" (prs_kind 2); in cpace_a |
ya | base64url | Yes | Initiator share Ya 32 bytes; in cpace_a |
yb | base64url | Yes | Responder share Yb 32 bytes; in cpace_b |
ad | base64url | Yes | Associated data 26 bytes CPaceAD (ADa in cpace_a, ADb in cpace_b) |
tb | base64url | Yes | Responder confirmation tag 32 bytes HMAC(K_cb, transcript); in cpace_b |
ta | base64url | Yes | Initiator confirmation tag 32 bytes HMAC(K_ca, transcript); in confirm_a |
CPaceAD tls-record
CPace associated data for each party, TLS-encoded, 26 bytes: 0x08 || role || 0x01 || did. ADa uses role "sv1 init" and the initiator's did; ADb uses "sv1 resp" and the responder's did. Receiver must check role, version = 1 and the expected peer did.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
role | opaque<V> | Yes | CPace role label "sv1 init" or "sv1 resp" |
version | uint8 | Yes | Profile version 1 |
did | opaque[16] | Yes | Sender device ID binary device ID of the sending device |
CPaceChannelIdentifier (CI) binary-frame
CI = lv_cat("sv1 pair ci", u8(prs_kind), pairing_id, address); pairing_id is the 16-byte binary pairing session UUIDv7, address the UTF-8 canonical account address. sid = pairing_id.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
label | bytes | Yes | Domain separation "sv1 pair ci" |
prs_kind | uint8 | Yes | Secret kind 1 (QR) or 2 (6-digit code) |
pairing_id | opaque[16] | Yes | Pairing session ID binary UUIDv7 |
address | bytes | Yes | Account address UTF-8 canonical address |
Ed25519Jwk object
Every Ed25519 public key in JSON or a JWS payload is an RFC 7517/8037 OKP JWK. Identity keys and DSKs (ik, dsk) carry exactly kty, crv, x; other owners (02) may add non-key metadata members, which never enter a thumbprint. Never contains d or other private members.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kty | string | Yes | Key type "OKP" |
crv | string | Yes | Curve "Ed25519" |
x | base64url | Yes | Public key bytes canonical base64url of the 32-byte public key (43 chars); must pass §4.3 items 1 and 2 |
JwsCommonClaims (time and audience profile) object
Profile rules every JWS payload follows; owners define the rest of the claims. Unknown claims are ignored.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iat | integer (NumericDate) | Yes | Issued-at JSON integer 0 to 2^53 − 1, no fraction/exponent; valid only if iat <= now + 60 |
exp | integer (NumericDate) | No | Expiry Required/Forbidden/Optional per typ registry; > iat; exp − iat <= type max lifetime; valid only if now < exp + 60 |
nbf | integer (NumericDate) | No | Not-before Only on types whose owner defines it; >= iat; valid only if nbf <= now + 60; present on any other type → crypto.invalid_claims (forbidden) |
aud | string | No | Audience Only if owner defines it; single string (canonical domain, or URL for sv-relay+jwt / sv-push+jwt); array → crypto.invalid_claims (array) |
iss | string | No | Issuer (server-signed types) canonical domain for server-class types; must equal domain part of kid |
JwsProtectedHeader object
I-JSON object with exactly three members alg, typ, kid. Any other member (jwk, jku, x5u, x5c, x5t, x5t#S256, crit, b64, zip, cty, enc, nonce, anything else) is rejected with crypto.header_rejected. Decoded size at most 1,024 bytes. Producers SHOULD serialize in order alg, typ, kid with no white space; verifiers accept any order.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
alg | string | Yes | Signature algorithm "EdDSA" only (Ed25519 key); else crypto.unsupported_algorithm |
typ | JwsTyp | Yes | Object type value from the §6.3 registry; byte-for-byte, case-sensitive; must equal the type the context expects, else crypto.wrong_type |
kid | string | Yes | Signing key ID; a cross-check, not a pointer server-kid (<canonical-domain>#<key-id>, key-id 1-32 of ALPHA/DIGIT/./_/-) for Server class; 43-char key thumbprint (ikf or dkf) for Identity and Device classes |
Also described in 00 §7.13.
LabelledSignatureInput binary-frame
Bytes signed by a labelled signature: "sv1 sig" || 0x00 || label || 0x00 || content. Only DSKs make labelled signatures in v1. In JSON the signature is base64url of 64 bytes (86 chars). content is an owner-defined injective binary encoding that starts with a uint8 version and is never JSON.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
prefix | bytes | Yes | Domain separator for labelled signatures ASCII "sv1 sig" followed by 0x00 |
label | SignatureLabel | Yes | Registered label (§7.3) ASCII, 1-32 chars, lc-alnum *31(lc-alnum / "-"), followed by 0x00 |
content | bytes | Yes | Signed content owner-defined, injective, starts with uint8 version, binds context/object ID/epoch |
SVF1Blob binary-frame
blob = SVF1Header || C_0 || ... || C_(n−1). Plaintext framed = u64(len(file)) || file || zero padding to bucket P = pad(len(file)+8); cut into 65,536-byte segments (last 4,096..65,536). C_i = AES-256-GCM(K_enc, N_i, header, segment_i) incl. 16-byte tag; N_i = nonce_prefix || u32(i) || u8(f), f = 1 only for the last segment. Blob size 43 + P + 16·n; segment i starts at 43 + 65552·i.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
header | SVF1Header | Yes | Header 43 bytes |
segments | array<bytes> | Yes | Segment ciphertexts with tags n = ceil(P / 65536); each 65,552 bytes except possibly the last (>= 4,112) |
SVF1Header tls-record
43-byte header of an SVF1 encrypted attachment blob; also the AAD of every segment.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
magic | opaque[4] | Yes | Format magic/version "SVF1" = 0x53 0x56 0x46 0x31 |
nonce_prefix | opaque[7] | Yes | Nonce prefix for all segments random per blob from CSPRNG |
commitment | opaque[32] | Yes | Key commitment, checked in constant time before decrypting HKDF-Expand(K_file, "sv1 file kc", 32) |
SvJws (compact JWS) jws
Every Sloppy Voice signed object outside MLS and SFrame (except the VAPID JWT) is a compact-serialization JWS: b64-header "." b64-payload "." b64-signature (signature exactly 86 chars / 64 bytes). Signing input is the ASCII of header.payload as transmitted. Stored, relayed and embedded as the exact string; never decoded and re-encoded. No JSON serialization, detached/unencoded payload, alg none or JWE.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
b64-header | base64url | Yes | Protected header canonical; decodes to JwsProtectedHeader <= 1,024 bytes |
b64-payload | base64url | Yes | Claims defined by the type owner canonical; decodes to I-JSON object, UTF-8, <= 8 nesting levels, no duplicate members, no lone surrogates |
b64-signature | base64url | Yes | Signature exactly 86 chars (64 bytes); Ed25519 strict verification §4.3 |
SvTestJwt (sv-test+jwt payload) jws
Test-vector-only JWS type. No production verifier expects it. Max lifetime 300 s, max size 8,192 bytes; does not define nbf.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Issuer |
sub | string | Yes | Subject |
iat | integer (NumericDate) | Yes | Issued-at §6.6 |
jti | base64url | Yes | Unique ID 16 to 64 bytes |
exp | integer (NumericDate) | No | Expiry exp − iat <= 300 |
aud | string | No | Audience single string |
TestVector object
One test vector. Inside inputs/outputs, member names ending Hex = lowercase hex bytes, B64 = canonical base64url bytes, Utf8 = text; other strings verbatim wire values; integers JSON numbers; times NumericDate named now, iat...; large inputs as generator {"pattern": "i mod 251", "length": N} with sha256Hex.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Vector ID <NN>-<name>-<n>, unique in repository, e.g. "04-thumbprint-1" |
section | string | Yes | Section of the owning document e.g. "§5.2" |
operation | string | Yes | What is computed e.g. "jwk-thumbprint", "ed25519-verify", "hkdf-expand", "svf1-encrypt" |
description | string | No | For humans one line |
inputs | object | Yes | Inputs every input, including values otherwise random |
expect | enum TestVectorExpect | Yes | Expected kind of result "value", "accept" or "reject" |
outputs | object|null | Yes | Expected outputs null when expect is accept/reject or status is tbd |
error | string | No | Expected crypto.* or owner code only with reject |
status | enum TestVectorStatus | Yes | Whether outputs are computed "final" or "tbd" |
TestVectorFile object
Machine-readable vector file, spec/vectors/<NN>-<topic>.json (e.g. 04-crypto.json; pending).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
format | string | Yes | Format name "sv1-test-vectors" |
formatVersion | integer | Yes | Format version 1 |
suite | string | Yes | Crypto suite "sv1-c1" |
document | string | Yes | Owning document number e.g. "04" |
vectors | array<TestVector> | Yes | Vector objects |
X25519Jwk (DeviceCertificate dbk) object
The only place an X25519 public key appears as a JWK: the dbk claim of a DeviceCertificate (07 §4.1). Exactly kty, crv, x. Ed25519 checks of §4.3 don't apply. Elsewhere in JSON (BoxKey pub, HPKE enc) X25519 keys are raw 32-byte base64url.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kty | string | Yes | Key type "OKP" |
crv | string | Yes | Curve "X25519" |
x | base64url | Yes | X25519 box public key; compared with raw keys by these 32 bytes 32 bytes |
CPacePrsKind (08 cred) enum
| Value | Meaning |
|---|---|
1 / "qr" | User scanned the QR code; PRS = 16-byte QR secret |
2 / "code" | User typed the 6-digit code; PRS = ASCII of 6 digits with leading zeros |
CryptoInvalidClaimsReason enum
| Value | Meaning |
|---|---|
missing | Required time claim missing |
type | Not an integer |
forbidden | Present when forbidden (incl. nbf on a type that doesn't define it) |
order | Ordered wrongly (e.g. exp <= iat, nbf < iat) |
lifetime | Over the maximum lifetime |
array | aud is an array |
CryptoMalformedReason enum
| Value | Meaning |
|---|---|
encoding | Bad/non-canonical base64url |
length | Wrong decoded length (or SVF1 length rules) |
json | Invalid or duplicate-member JSON, not an I-JSON object |
structure | Wrong structure (JWS parts, SVF1 magic) |
size | Over the size limit |
depth | Nested more than 8 levels |
CryptoSuite enum
| Value | Meaning |
|---|---|
sv1-c1 | The only v1 suite; implied by protocol version, never listed or carried |
sv1-c2 | Reserved for a future post-quantum hybrid suite; v1 must treat as unsupported |
Also described in 00 §7.15.
DecryptFailedReason enum
| Value | Meaning |
|---|---|
tag | AEAD/HPKE tag failure, incl. truncation/extension of SVF1 |
commitment | Key commitment mismatch |
format | SVF1 too short, wrong magic or last segment too short |
padding | SVF1 size/bucket mismatch or non-zero padding |
content_hash | Decrypted attachment doesn't match AttachmentRef size/sha256 |
DomainSeparationString (hashes, HPKE, CPace) enum
| Value | Meaning |
|---|---|
sv1 dm | SHA-256("sv1 dm" || 0x00 || P1 || 0x0A || P2), P1 < P2 canonical addresses; DM context ID dm: + base64url(first 16 bytes); owner 12 |
sv1 upgrade plan | SHA-256 upgrade plan version (09 §10.6); owner 09 |
sv1 vault grant | HPKE info for VaultKeyGrant; owner 08 |
sv1 history-share | HPKE info: "sv1 history-share" || 0x00 || mid16(shareId) || did16(did); owner 14 |
sv1 pair ci | CPace channel identifier; owner 04 |
sv1 init | CPace ADa role label; owner 04 |
sv1 resp | CPace ADb role label; owner 04 |
sv1 safety | Iterated SHA-512 safety-number chain prefix; 5,200 rounds; owner 07 |
ForbiddenJwsHeaderMembers (explicitly named; every other non-alg/typ/kid member too) enum
| Value | Meaning |
|---|---|
jwk | Rejected with crypto.header_rejected |
jku | Rejected with crypto.header_rejected |
x5u | Rejected with crypto.header_rejected |
x5c | Rejected with crypto.header_rejected |
x5t | Rejected with crypto.header_rejected |
x5t#S256 | Rejected with crypto.header_rejected |
crit | Rejected with crypto.header_rejected |
b64 | Rejected with crypto.header_rejected |
zip | Rejected with crypto.header_rejected |
cty | Rejected with crypto.header_rejected |
enc | Rejected with crypto.header_rejected |
nonce | Rejected with crypto.header_rejected |
JwsTyp enum
| Value | Meaning |
|---|---|
sv-assert+jwt | HomeAssertion; Server class (home server); iss; exp Required; max lifetime 300 s; max size 4,096 bytes; owner 06 |
sv-devproof+jwt | DeviceProof; Device class (DSK); exp Required; 60 s; 1,024 bytes; owner 06 |
sv-s2s+jwt | S2S request token; Server class (sending server); iss; exp Required; 60 s; 4,096 bytes; owner 06 |
sv-relay+jwt | RelayTicket; Server class (hosting server); iss; exp Required; 60 s; 8,192 bytes; owner 15 |
sv-push+jwt | Push gateway request token; Server class (home server); iss; exp Required; 60 s; 4,096 bytes; owner 19 |
sv-idstate+jwt | IdentityState; Server class (home server); iss; exp Required; 86,400 s (24 h); 32,768 bytes; owner 07 |
sv-idcert+jwt | IdentityCertificate; Identity class; exp Forbidden; until reset; 2,048 bytes; owner 07 |
sv-devcert+jwt | DeviceCertificate; Identity class; exp Forbidden; until revoked or reset; 2,048 bytes; owner 07 |
sv-devrevoke+jwt | DeviceRevocation; Identity class; exp Forbidden; permanent; 1,024 bytes; owner 07 |
sv-keyrot+jwt | KeyRotation; Server class (previous active sign key for a new sign key, current active sign key otherwise; 02 §12.1); iss; exp Forbidden; permanent; 2,048 bytes; owner 02 |
sv-test+jwt | Test vectors only; Any signer; exp Optional; 300 s; 8,192 bytes; owner 04; rejected by every production verifier |
Also described in 00 §7.13.
KdfLabel (HKDF/HMAC label registry) enum
| Value | Meaning |
|---|---|
sv1 ekid | HKDF-Expand(K_hist(e), "sv1 ekid", 8): epoch key ID; owner 14 |
sv1 msg | HKDF-Expand(K_hist(e), "sv1 msg" || mid16, 32): K_msg; no separator; prefix reserved; owner 14 |
sv1 kc | HMAC(K_msg, "sv1 kc") truncated to 16: key commitment kc; owner 14 |
sv1 link | Reserved and retired; owner 14 |
sv1 anchor | Reserved and retired; owner 14 |
sv1 vault | HKDF-Expand(K_vault, "sv1 vault" || 0x00 || context): 32 bytes (8 for key check value); owner 08 |
sv1 vault id | HMAC(K_vid, "sv1 vault id" || 0x00 || context) truncated to 16: vault record IDs and buckets; owner 08 |
sv1 backup | HKDF-Expand(Argon2id output, "sv1 backup" || 0x00 || lv(addr), 32): KeyBackup key; owner 08 |
sv1 pair | HKDF-Expand(CPace ISK, "sv1 pair" || 0x00 || u8(dir), 32), dir 0x01 payload / 0x02 ack; owner 08 |
sv1 file key | HKDF-Expand(K_file, "sv1 file key", 32): SVF1 K_enc; owner 04 |
sv1 file kc | HKDF-Expand(K_file, "sv1 file kc", 32): SVF1 commitment; owner 04 |
sv1 cpace kc | HKDF-Expand(ISK, "sv1 cpace kc", 64): K_ca || K_cb; owner 04 |
sv1 push collapse | HMAC(K_coll, "sv1 push collapse" || 0x00 || opaque(topic)) truncated to 16: push collapse keys; owner 19 |
MlsExporterLabel enum
| Value | Meaning |
|---|---|
sv1 history | Context empty, length 32: K_hist(e); owner 14 |
SFrame 1.0 Base Key | Context empty, length 16: SFrame epoch secret per RFC 9605 §5.2; owner 18 |
Also described in 00 §7.15.
PairKeyDirection (sv1 pair u8(dir)) enum
| Value | Meaning |
|---|---|
0x01 | Pairing payload key |
0x02 | Pairing ack key |
PakeFailedReason enum
| Value | Meaning |
|---|---|
malformed | Malformed message (mapping inferred from §11.7's failure list; §15.2 gives only the names) |
version | AD with an unknown version (inferred) |
peer_mismatch | AD with the wrong role or did (inferred) |
identity_element | Neutral-element result for K (inferred) |
confirmation | Confirmation tag mismatch (per V-11d) |
timeout | Timeout set by 08 (inferred) |
RngFailureReason enum
| Value | Meaning |
|---|---|
unavailable | CSPRNG unavailable |
error | CSPRNG returned an error |
SignatureLabel enum
| Value | Meaning |
|---|---|
sealed | DSK; SealedMessage header fields and ciphertext; owner 14 |
history-share | DSK; HistoryShare fields and bundle ciphertext (14 §7.5); owner 14 |
history-link | Reserved and retired; must not be signed, accepted or reused; owner 14 |
media-attest | DSK; MediaAttestation (18 §9.2, §9.4); owner 18 |
vault-box-key | DSK; box key binding: address, did, identity generation, X25519 box public key (08 §10.1); owner 08 |
vault-generation | DSK; VaultGenerationTBS (08 §10.2); owner 08 |
test | Test vectors only; owner 04 |
SignerClass enum
| Value | Meaning |
|---|---|
Server | kid = <canonical-domain>#<key-id>; key from the domain's ServerMetadata keys (02), purpose "sign"; domain must equal issuer claim; one metadata refetch per minute per domain on miss |
Identity | kid = ikf thumbprint; key is the ik the context expects (in the IdentityCertificate itself, or the one a DeviceCertificate/DeviceRevocation is validated against) |
Device | kid = dkf thumbprint; key is the dsk of the expected DeviceCertificate |
TestVectorExpect enum
| Value | Meaning |
|---|---|
value | Compute outputs |
accept | Verification accepts |
reject | Verification rejects with error |
TestVectorStatus enum
| Value | Meaning |
|---|---|
final | Outputs computed |
tbd | Outputs not computed yet |
05 Accounts, login, sessions, devices and bots
Account object
A user or bot account at its home server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | canonical address (01); never changes |
name | string | Yes | Display name; prepared local part if no other capitalization/spacing chosen or it collided at registration. Receivers apply 01 §6.4 and fall back to the local part (01 §6.5). never empty; linked to local part (01 §6.1), meets 01 §6.2 |
kind | AccountKind | Yes | user | bot; never changes; unknown treated as bot |
inc | base64url | Yes | Account incarnation (D-086). Other servers key on (address, inc). 16 CSPRNG bytes, base64url no padding, 22 chars (did grammar); immutable; never reused for a local part |
state | AccountState | Yes | §11.2. active | upgrade_required | suspended | deleted; unknown treated as suspended |
security | AccountSecurity | Yes | insecure | secure; always equals sec claim of latest IdentityState (07) |
igen | integer | Yes | Identity generation from latest IdentityState (07). 0 for never-secure accounts |
about | string | Yes | plain text, 0-190 code points, at most 4 line breaks; empty string when unset |
avatar | Avatar|null | Yes | §11.7. |
profileVersion | integer | Yes | starts at 1; +1 on every change to name, about or avatar |
createdAt | timestamp | Yes | |
owner | string | No | Local account that owns the bot (§15.1). bots only; canonical address |
AccountDeletedPayload object
d of account.deleted (client and S2S).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Canonical address. |
kind | AccountKind | Yes | user | bot |
inc | base64url | Yes | Receivers apply only to this incarnation. |
deletedAt | timestamp | Yes | |
igen | integer | Yes | Last identity generation. 0 if never secure |
reason | DeletionReason | Yes | user | owner | admin | unconfirmed; unknown treated as admin |
AccountProfileChangedPayload object
d of account.profile_changed (S2S).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | |
inc | base64url | Yes | |
profileVersion | integer | Yes | New version. |
AccountSuspendedPayload object
d of account.suspended (S2S).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | |
inc | base64url | Yes | Apply only to this incarnation. |
kind | AccountKind | Yes | user | bot |
suspendedAt | timestamp | Yes |
AuthorizationRedirect other
Query parameters of the 302 from /v1/auth/callback or /v1/auth/consent to the client's redirect_uri (§6.6). The client MUST check state and iss and discard the response otherwise.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
code | string | No | On success. svc_ + 43 base64url chars; single use; 60 s |
state | string | Yes | The client's state, echoed. |
iss | string | Yes | Issuer identifier. the home server's base URL (RFC 9207) |
error | string | No | On failure. RFC 6749 §4.1.2.1 code (access_denied, invalid_request, temporarily_unavailable, server_error) |
error_description | string | No | On failure. |
sv_code | string | No | On failure. this document's error code, e.g. auth.access_denied |
AuthorizationTransaction other
Server-side state for one pass through /authorize: client params, intent, bound account/device (reauth, link), provider, upstream state/nonce/PKCE verifier, cookie hash, start time, state (§6.7).
Avatar object
Avatar descriptor inside Account and PublicProfile.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
url | string | Yes | {base}/v1/users/{local}/profile/avatar?v={profileVersion} |
sha256 | base64url | Yes | SHA-256 of served image bytes. |
contentType | string | Yes | image/png | image/jpeg | image/webp |
width | integer | Yes | 1-1024 pixels |
height | integer | Yes | 1-1024 pixels |
Bot object
A bot with its active devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
account | Account | Yes | kind bot, has owner |
devices | array<DeviceRecord> | Yes | active devices only |
BotTokenResponse object
201 response of POST /v1/bots/{local}/tokens.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
token | string | Yes | svb_ |
device | DeviceRecord | Yes |
BotTokenRotateResponse object
200 response of token rotation.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
token | string | Yes | svb_ |
device | DeviceRecord | Yes | |
oldTokenValidUntil | timestamp | Yes |
ClientIdMetadataDocument object
JSON served at the client_id URL (GET <client_id>, Accept: application/json); fetched by the home server over HTTPS, no redirects, public addresses only, 5 s timeout, <=16 KiB, cached 5 min-24 h.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
client_id | string | Yes | MUST equal the fetch URL exactly |
client_name | string | Yes | Shown on Continue page. 1-64 characters |
redirect_uris | array<string> | Yes | §5.2. 1-10 entries |
client_uri | string | No | Home page. HTTPS |
logo_uri | string | No | HTTPS; servers MAY ignore |
ConsentForm other
application/x-www-form-urlencoded form posted by the server's own Continue page.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
tx | base64url | Yes | Consent token embedded in the page form. 43 chars (32 random bytes); single use |
decision | ConsentDecision | Yes | continue | cancel |
CreateBotRequest object
Body of POST /v1/bots.
CreateBotResponse object
201 response of POST /v1/bots; token shown only once.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
bot | Bot | Yes | |
token | string | Yes | svb_; shown only once |
DeviceAddedPayload object
d of device.added.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
device | DeviceRecord | Yes | |
via | DeviceAddedVia | Yes | login | signup | bot_token; unknown treated as login |
DeviceRecord object
One device = one home session = one token family (or one bot token).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | base64url | Yes | Device ID (§12.4). 16 random bytes, 22 chars, last char A|Q|g|w; never reused |
name | string | Yes | User-renamable. 1-64 code points, no control characters; default device_name or '<Platform> device' |
platform | Platform | Yes | Same values as DeviceCertificate plat (07). desktop|web|ios|android|bot; unknown treated as desktop for logic, generic icon |
clientSoftware | string | Yes | §5.3 |
state | DeviceState | Yes | active | revoked; unknown treated as revoked |
enrolled | boolean | Yes | §12.8: did listed in latest IdentityState devices. always false for insecure account |
dkf | string | No | DSK fingerprint from IdentityState. present while enrolled is true |
sharedComputer | boolean | Yes | §12.6; fixed for life of record. |
provider | string|null | Yes | Provider ID used to create the session. null for bot devices |
authAt | timestamp|null | Yes | Most recent provider-leg completion (sign-in, sign-up or reauth). Equals 08 DeviceSummary authAt. null for bot devices |
createdAt | timestamp | Yes | |
lastSeenAt | timestamp | Yes | Last activity (§12.5). at most 60 s stale |
expiresAt | timestamp|null | Yes | user devices: lastSeenAt + inactivity limit; bot: token expiry; null for bot without expiry and for every revoked device |
revokedAt | timestamp | No | present when revoked |
revokedReason | RevokedReason | No | §12.3. present when revoked |
current | boolean | Yes | true only for the device the request was made from. |
tokenHint | string | No | bot devices only; last 4 characters of the bot token |
tokenRotatedAt | timestamp | No | When the bot token was last issued or rotated. bot devices only |
did other
Device ID: 16 random bytes base64url no padding (22 chars); last char A|Q|g|w.
inc other
Account incarnation: 16 random bytes base64url no padding (22 chars), same grammar as did.
LinkProviderRequest object
Body of POST /v1/me/providers.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
provider | string | Yes | an enabled provider ID; signup flag irrelevant |
clientId | string | Yes | as client_id §5.1 |
redirectUri | string | Yes | as redirect_uri §5.2 |
codeChallenge | base64url | Yes | as code_challenge |
codeChallengeMethod | string | Yes | S256 |
state | string | Yes | as state |
uiLocales | string | No | as ui_locales |
LinkProviderResponse object
201 response of POST /v1/me/providers.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
requestUri | string | Yes | Pushed request URI with intent link. |
authorizeUrl | string | Yes | Full /v1/auth/authorize URL to open. |
expiresInMs | integer | Yes | 60000 |
LinkTokenResponse object
Code-exchange result for intent link: new access token without refresh token, plus link.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
access_token | string | Yes | sva_ |
token_type | string | Yes | Bearer |
expires_in | integer | Yes | 900 |
link | ProviderLink | Yes |
LogoutOthersResponse object
200 response for scope others.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
revoked | array<string> | Yes | dids revoked. |
LogoutRequest object
Optional body of POST /v1/auth/logout.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
scope | LogoutScope | No | current (default) | others; bots current only; others requires fresh authentication |
revocation | string | No | DeviceRevocation for this device (as §12.9). with scope current only |
MeResponse object
GET /v1/me response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
account | Account | Yes | |
device | DeviceRecord | Yes | |
authAt | timestamp | No | absent for bot tokens; equals device.authAt |
OAuthProblemDetails object
Problem details at /par and /token: RFC 9457 members plus RFC 6749 error and error_description.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | Yes | urn:sloppyv:error:<code> |
code | string | Yes | |
title | string | Yes | |
status | integer | Yes | 400/401/429/500/503 per §7.8 |
detail | string | No | |
retryable | boolean | Yes | |
retryAfterMs | integer|null | No | |
userAction | string | Yes | |
error | string | Yes | RFC 6749 §5.2 code |
error_description | string | No | |
data | object | No |
ProviderConfiguration other
Admin-side provider settings (only id, name, type, icon, signup published).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | provider-id = 1*32([a-z0-9_-]); never reused for another issuer |
protocol | ProviderProtocol | Yes | oidc | github; never published |
type | ProviderType | Yes | cosmetic |
icon | string | No | |
name | string | Yes | 1-64 code points |
issuer | string | No | required for oidc |
issuerTemplate | string | No | multi-tenant, {tenantid} |
clientId | string | Yes | plus client secret or private_key_jwt key |
redirectUri | string | Yes | fixed {base}/v1/auth/callback |
scopes | string | No | default 'openid profile'; email only for labels |
signup | boolean | No | default true |
enabled | boolean | No | default true |
ProviderLink object
Record that an external identity may sign in to the account; the identity key itself is never returned.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
linkId | uuidv7 | Yes | server-generated |
provider | string | Yes | Provider ID. |
providerName | string | Yes | Provider's name at time of response. |
label | string | No | Hint to recognise the provider account. at most 64 characters; built from §4.5 claims at link time, refreshed at each login; shown only to holder |
enabled | boolean | Yes | Whether the provider is currently enabled. |
linkedAt | timestamp | Yes | |
lastUsedAt | timestamp | No | Last login, reauth or sign-up through this link. example shows null when never used |
PublicProfile object
Public profile returned by GET /v1/users/{local}/profile.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address. |
name | string | Yes | Receivers MUST apply 01's display-name check and fall back to local part. never empty |
kind | AccountKind | Yes | user | bot; unknown treated as bot |
inc | base64url | Yes | Incarnation. |
about | string | Yes | as §11.1 |
avatar | Avatar|null | Yes | |
profileVersion | integer | Yes |
PushedAuthorizationResponse object
Response of POST /v1/auth/par (snake_case).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
request_uri | string | Yes | single use, valid 60 s |
expires_in | integer | Yes | Seconds. 60 |
ReauthTokenResponse object
Code-exchange result for intent reauth: new access token, no refresh token.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
access_token | string | Yes | sva_ |
token_type | string | Yes | Bearer |
expires_in | integer | Yes | 900 |
authAt | timestamp | Yes | New authAt. |
RefreshTokenResponse object
Refresh grant response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
access_token | string | Yes | sva_ |
token_type | string | Yes | Bearer |
expires_in | integer | Yes | 900 |
refresh_token | string | Yes | svr_; new token every use |
authAt | timestamp | Yes |
RevokeRequest object
Body of POST /v1/me/devices/{did}/revoke.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | RevokeRequestReason | No | removed (default) | lost_or_stolen; other -> core.invalid_request; ignored for own device |
revocation | string | No | Invalid one fails whole request with device.revocation_invalid. DeviceRevocation JWS (sv-devrevoke+jwt, 07) for this did, signed by identity key |
RevokeResponse object
200 response of POST /v1/me/devices/{did}/revoke.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
device | DeviceRecord | Yes | |
identityStateVer | integer|null | Yes | ver of the IdentityState published by §13 step 3, or null. |
ServerMetadataAuth object
Members of ServerMetadata (owned by 02) this document relies on.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
auth.providers | array<object> | Yes | Enabled providers in admin order. entries id, name, type, icon?, signup? |
auth.providers[].signup | boolean | No | absent means true |
auth.registration | Registration | Yes | unknown -> closed |
links.terms | string | No | Presence means sign-up requires accepting terms. HTTPS URL |
SignupInfo object
The signup member of SignupTokenResponse.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
provider | string | Yes | Provider ID used. |
providerLabel | string | No | Label of §10.1. |
suggestedName | string | No | Display-name suggestion (§8.5). absent if none |
suggestedLocal | string | No | Canonical local part of suggestedName. |
registration | string | Yes | A closed server never issues sign-up tokens. open | invite |
inviteRequired | boolean | Yes | true when registration is invite |
termsUrl | string | No | Presence means sign-up requires acceptTerms. copied from ServerMetadata links.terms |
SignupRequest object
Body of POST /v1/auth/signup.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Chosen display name; local part derived by 01's rule (remove white space, PRECIS). |
inviteCode | string | No | §8.3. required when inviteRequired |
acceptTerms | boolean | No | required when termsUrl set; MUST be true else auth.terms_not_accepted |
platform | Platform | Yes | as §7.3; bot refused with core.invalid_request |
clientSoftware | string | Yes | §5.3 |
deviceName | string | No | as §7.3 |
sharedComputer | boolean | No | default false; §12.6 |
setupToken | string | No | One-time first-admin setup token (21 §11.1 item 7). |
SignupTokenResponse object
Code-exchange result for an unknown external identity: a sign-up token instead of a session.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
access_token | string | Yes | svs_ sign-up token |
token_type | string | Yes | Bearer |
expires_in | integer | Yes | 900 |
signupRequired | boolean | Yes | true |
signup | SignupInfo | Yes |
SvToken other
Every Sloppy Voice credential: token-prefix '_' 43 base64url chars (32 CSPRNG bytes, no padding); 47 chars total. Prefixes sva (access), svr (refresh), svs (sign-up), svb (bot), svc (authorization code). Server stores SHA-256 over ASCII of whole string.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
prefix | TokenPrefix | Yes | lowercase; uppercase rejected |
random | base64url | Yes | 43 chars, no padding |
TokenResponse object
Full token response for login (code grant) and sign-up (201).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
access_token | string | Yes | sva_ token |
token_type | string | Yes | Bearer |
expires_in | integer | Yes | Seconds. 900 |
refresh_token | string | Yes | svr_ token |
authAt | timestamp | Yes | Session's authAt. |
account | Account | Yes | |
device | DeviceRecord | Yes | The new device record (current: true). |
TransactionCookie other
Browser-binding cookie __Secure-svtx-<first 12 chars of upstream state> = 43 b64u chars; Secure, HttpOnly, SameSite=Lax, Path={base path}/v1/auth/, Max-Age=600, no Domain. Read only at /callback and /consent; never an API credential.
UnlinkResponse object
200 response of DELETE /v1/me/providers/{linkId}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
unlinked | uuidv7 | Yes | linkId removed. |
devicesSignedInWithIt | array<string> | Yes | Active dids whose sessions were created through this link. |
AccountKind enum
| Value | Meaning |
|---|---|
user | |
bot | Unknown kinds treated as bot |
AccountSecurity enum
| Value | Meaning |
|---|---|
insecure | |
secure |
Also described in 09 §4.1.
AccountState enum
| Value | Meaning |
|---|---|
active | Normal |
upgrade_required | On a secure server, encryption not yet on |
suspended | Operator or server-scope ban; unknown states treated as suspended |
deleted | Tombstone; never changes again |
ConsentDecision enum
| Value | Meaning |
|---|---|
continue | Issue the code |
cancel | Redirect with error=access_denied |
DeletionReason enum
| Value | Meaning |
|---|---|
user | Deleted by its owner |
owner | Bot deleted by owner/manage_bots holder or because owner was deleted |
admin | Server operator; unknown treated as admin |
unconfirmed | Never-upgraded account on a secure server |
DeviceAddedVia enum
| Value | Meaning |
|---|---|
login | New sign-in; raises W4d; unknown values treated as login |
signup | Sign-up |
bot_token | Bot token creation |
DeviceState enum
| Value | Meaning |
|---|---|
active | |
revoked | Unknown treated as revoked |
Intent enum
| Value | Meaning |
|---|---|
login | Default; sign in or sign up |
reauth | Fresh authentication of the current session; only via PAR with Bearer |
link | Internal: created only by POST /v1/me/providers (§10.3); never a client parameter. Upstream prompt=select_account. |
LogoutScope enum
| Value | Meaning |
|---|---|
current | Default; revoke this device, reason signed_out |
others | Revoke every other active device, reason signed_out_elsewhere; fresh authentication |
Prompt enum
| Value | Meaning |
|---|---|
select_account | Only allowed client prompt value |
ProviderProtocol enum
| Value | Meaning |
|---|---|
oidc | Any OpenID Connect issuer |
github | GitHub OAuth 2.0 profile (§4.6) |
RedirectUriForm enum
| Value | Meaning |
|---|---|
loopback | http://127.0.0.1:<port>/... or http://[::1]:<port>/...; literal IP only, localhost refused, port ignored |
claimed-https | Same origin as client_id URL |
private-use-scheme | Scheme contains a period; not sloppyv/http/https/javascript/data/file/about |
RegistrationClosedReason enum
| Value | Meaning |
|---|---|
server | auth.registration is closed |
provider | provider has signup false |
RevokedReason enum
| Value | Meaning |
|---|---|
signed_out | Device signed itself out |
removed | Removed from another device, incl. via DeviceRevocation |
lost_or_stolen | Removed and marked lost/stolen; triggers new recovery key (08 §10.8) |
signed_out_elsewhere | Sign out of all other devices |
shared_expired | Shared-computer device idle 12 h |
inactive | Inactivity expiry, replaced at device limit, or unused sign-up device |
token_reuse | Refresh-token reuse |
code_reuse | Authorization code redeemed twice |
bot_token_revoked | Bot token revoked |
bot_token_expired | Bot token reached its expiry |
account_deleted | Account deleted |
admin | Server operator revoked it |
other | Anything else; unknown values treated as other |
RevokeRequestReason enum
| Value | Meaning |
|---|---|
removed | Default |
lost_or_stolen |
SuspensionCause enum
| Value | Meaning |
|---|---|
operator | |
ban | with the ban ID; server-scope ban (10 §9.3) |
TokenPrefix enum
| Value | Meaning |
|---|---|
sva | access token |
svr | refresh token |
svs | sign-up token |
svb | bot token |
svc | authorization code |
TransactionState enum
| Value | Meaning |
|---|---|
at_provider | |
consent | |
code_issued | |
redeemed | |
ended |
06 Federation
AssertionRequest object
Body of POST /v1/federation/assertions.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
aud | string | Yes | Remote server domain. 1–253 octets |
AssertionResponse object
200 body of POST /v1/federation/assertions.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
assertion | string (JWS compact, HomeAssertion) | Yes | The HomeAssertion (§4.3). ≤ 4,096 octets |
aud | string | Yes | The canonical domain placed in the assertion's aud claim.canonical domain |
expiresAt | timestamp | Yes | The assertion's exp.RFC 3339 |
identityState | string (JWS, IdentityState, 07) | No | The account's current IdentityState JWS. MUST be present when the assertion's sec is secure; SHOULD be present otherwise |
AudienceRecord other
Home-server record: account, peer canonical domain, time of last assertion, set of sources (assertion, dm_index, community_list). Not exposed except to the account's own view (05).
DeviceProof jws
Binds a HomeAssertion to an enrolled device's DSK. Header {"alg":"EdDSA","typ":"sv-devproof+jwt","kid":"<dkf>"}; ≤ 1,024 octets; unknown claims ignored; nbf rejected.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
aud | string | Yes | Remote server canonical domain. MUST equal the assertion's aud |
ajti | string | Yes | Binds the proof to one assertion. The assertion's jti |
iat | integer | Yes | Creation time. NumericDate |
exp | integer | Yes | Expiry. iat < exp ≤ iat + 60; clients SHOULD use iat + 60 |
Also described in 00 §6 HP-7, §7.13.
EventBatchRequest object
Body of POST /v1/federation/events.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
events | array<S2SEvent> | Yes | The batch. 1–100 events; whole body ≤ destination's maxRequestBytes (03); no two events share an id |
EventBatchResponse object
200 body of POST /v1/federation/events.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<EventResult> | Yes | Per-event outcomes. Exactly one per request event, same order |
EventResult object
Per-event outcome.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | The event's id. |
status | EventResultStatus | Yes | Outcome. Sender treats unknown as deferred |
error | object (RFC 9457 problem) | No | Problem object. Required when rejected; MAY with deferred; its status member gives the HTTP status a single-event request would have had |
retryAfterMs | integer | No | Earliest useful retry. With deferred |
ExtendRequest object
Body of POST /v1/federation/sessions/current/extend.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | string | Yes | Why the extension is requested. Only home_unreachable; other values rejected with 400 core.invalid_request |
FederationBlock object
One blocked peer, keyed by canonical domain and covering all aliases.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Blocked server. Canonical domain, or the domain as entered (lowercase A-label) if unresolvable |
resolved | boolean | Yes | Whether domain is a canonical domain obtained from discovery. |
includeSubdomains | boolean | Yes | Also covers every domain ending with "." + domain. Default false |
note | string | No | Private admin note. ≤ 500 characters; never sent to any peer |
createdAt | timestamp | Yes | Creation time. RFC 3339 |
createdBy | string | Yes | Administrator who created it. Canonical address |
FederationPolicy object
Server's federation mode, allowlist and block count.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mode | FederationMode | Yes | Policy mode.open or allowlist |
allows | array<string> | Yes | Allowlist. Canonical domains (or unresolved as given); empty in open mode |
blockCount | integer | Yes | Number of FederationBlocks. |
HomeAssertion jws
Short-lived (≤300 s), single-use, audience-bound JWS by which a home server vouches for one account and device to one remote server. Header {"alg":"EdDSA","typ":"sv-assert+jwt","kid":"<home canonical domain>#<keyId>"}; no other header members. ≤ 4,096 octets serialized. Unknown claims ignored; nbf rejected; unknown kind/sec values rejected.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Home server's canonical domain. Lowercase A-label canonical domain |
sub | string | Yes | The account. Canonical address; domain part MUST equal iss |
aud | string | Yes | Remote server. Canonical domain; MUST NOT equal iss |
iat | integer | Yes | Issue time. NumericDate |
exp | integer | Yes | Expiry. iat < exp ≤ iat + 300; issuers SHOULD use iat + 300 |
jti | string | Yes | Assertion ID; single use at the audience. ≥16 random bytes, base64url, 22–86 chars |
kind | enum AccountKind | Yes | Account kind (05).user or bot |
inc | base64url | Yes | Account incarnation (D-086). 16 bytes, 22 chars; MUST equal the IdentityState's inc |
sec | enum SecurityState | Yes | Account security state.insecure or secure |
did | base64url | Yes | Device ID (05). 22 chars (16 octets) |
enr | boolean | Yes | True when the device is enrolled. MUST be false when sec is insecure |
isv | integer | Yes | ver of the IdentityState the claims were derived from. ≥ 1 |
igen | integer | No | Identity generation. Present iff enr is true |
ikf | base64url | No | Identity key thumbprint. Present iff enr is true; 43 chars RFC 7638 SHA-256 thumbprint |
dkf | base64url | No | This device's DSK thumbprint. Present iff enr is true; 43 chars RFC 7638 SHA-256 thumbprint |
name | string | No | Account display name (01). 1–128 octets UTF-8 |
Also described in 00 §6 HP-7, §7.13.
RemoteSession object
A session of one account and device at one remote server; 1 h, renewable, extendable to 24 h after last verification while home is unreachable.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sessionId | uuidv7 | Yes | Session ID assigned by the remote server. Stable across renewals and extensions |
token | string | No | Opaque remote session access token. Only in create and renew responses; never returned by GET; session-token = 1*512( ALPHA / DIGIT / "-" / "." / "" / "~" ), >=128 bits entropy, SHOULD be prefixed rs |
tokenType | string | No | Token scheme. Only with token; always Bearer |
state | RemoteSessionState | Yes | Session state (§6.7).active or extended; client treats unknown value as active |
account | object | Yes | The server's view of the account: addr (canonical address), name (assertion name if it passes 01's display-name check, else the prepared local part), kind (user|bot), inc (incarnation from the assertion), security (insecure|secure, server's current view).{addr, name, kind, inc, security} |
device | object | Yes | did, and enrolled (boolean, the server's current view). {did, enrolled} |
secureAccess | SecureAccess | Yes | Whether the session may enter secure contexts. In active: full iff account.security=secure and device.enrolled=true, else none; in extended, §7.3 applies.full, existing_only or none; client treats unknown as none |
createdAt | timestamp | Yes | When the session was created. |
verifiedAt | timestamp | Yes | When an assertion was last verified for it (creation or renewal). |
expiresAt | timestamp | Yes | When the session ends unless renewed or extended. now + 3,600 s on create/renew |
renewAfter | timestamp | Yes | Client SHOULD renew after this time. expiresAt − 600 s |
extendableUntil | timestamp | Yes | Latest expiresAt an extension can reach. verifiedAt + 24 h |
RemoteSessionRecord other
Server-side record per remote session: RemoteSession fields; SHA-256 hash of each live token (never the token); assertion's iss, inc, igen, ikf, dkf, isv; kid that verified the last assertion; jti (replay cache only); client; lastSeenAt; extension count. Kept until 7 days after the session ends.
RevocationMark other
Audience-side marks: revoked (A, did), deleted (A, inc), suspended (A, inc, suspendedAt); kept ≥ 1 h, SHOULD NOT exceed 7 days; consulted by V15.
S2SEvent object
S2S event envelope; carries no origin (origin = S2S token iss); not individually signed; ≤ destination's maxFederationEventBytes.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Event ID. Lowercase, hyphenated; unique among all events the origin sends; retries reuse it |
t | string | Yes | Event type. <area>.<name> (00 §7.5) |
ts | timestamp | Yes | Creation time at origin. RFC 3339 with milliseconds, UTC; ≤ 300 s in the future; > 25 h old is rejected |
orderKey | string | No | Events with equal orderKey (same origin/destination/lane) delivered in creation order. 1–256 characters |
expiresAt | timestamp | No | After this the origin stops trying and the receiver ignores the event. RFC 3339 |
d | object | Yes | Payload. Defined by owner of t |
S2SRequestToken jws
Request-bound bearer token on every S2S request (Authorization: Bearer <sv-s2s+jwt>). Header {"alg":"EdDSA","typ":"sv-s2s+jwt","kid":"<sender canonical domain>#<keyId>"}; ≤ 4,096 octets; single use; unknown claims ignored; nbf rejected.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Sender. Canonical domain |
aud | string | Yes | Destination. Canonical domain |
htm | string | Yes | HTTP method. Upper case |
htu | string | Yes | Full target URI. normalize(target) per §8.3; never a fragment |
bh | base64url | No | Body hash. Present iff request has content (≥1 octet); SHA-256 of the content, no padding |
iat | integer | Yes | Issue time. NumericDate |
exp | integer | Yes | Expiry. iat < exp ≤ iat + 60; senders SHOULD use iat + 60 |
jti | string | Yes | Single use at the destination. ≥16 random bytes base64url (22–86 chars) |
Also described in 00 §6 HP-7, §7.13.
SessionRequest object
Body of POST /v1/federation/sessions; ≤ 64 KiB.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
assertion | string (JWS compact, HomeAssertion) | Yes | The HomeAssertion. ≤ 4,096 octets; aud must be this server's canonical domain |
deviceProof | string (JWS compact, DeviceProof) | No | The DeviceProof (§5). Required when the assertion has enr: true; MUST be absent otherwise (server ignores it if present); ≤ 1,024 octets |
deviceCertificate | string (JWS, DeviceCertificate, 07) | No | The device's DeviceCertificate; needed because IdentityState lists only the DSK thumbprint. Required when the assertion has enr: true; ≤ 2,048 octets (07 §4.1) |
identityState | string (JWS, IdentityState, 07) | No | The IdentityState returned with the assertion; saves the server a fetch. RECOMMENDED whenever the assertion's sec is secure; ≤ 32,768 octets |
client | string | No | Client software identifier. 1–128 printable ASCII characters, as in session.hello (03) |
AccountKind (HomeAssertion.kind, RemoteSession.account.kind) enum
| Value | Meaning |
|---|---|
user | Human account |
bot | Bot account |
AssertionInvalidReason enum
| Value | Meaning |
|---|---|
malformed | |
alg | |
typ | |
claims | |
kid | |
key_unknown | |
key_status | |
signature | |
expired | |
not_yet_valid | |
lifetime | |
subject | |
security_claims |
AudienceSource enum
| Value | Meaning |
|---|---|
assertion | HomeAssertion issued with that aud; removed 30 days after the last |
dm_index | DM index entry in any state hosted by that peer |
community_list | Peer on the account's community list |
DeviceProofInvalidReason enum
| Value | Meaning |
|---|---|
device_certificate | DeviceCertificate failed |
device_proof | DeviceProof parse or signature failed |
device_proof_binding | aud or ajti mismatch |
device_proof_expired | Time check failed |
EventResultStatus enum
| Value | Meaning |
|---|---|
accepted | Durably stored or applied; done |
duplicate | Already received earlier; done |
ignored | Valid but not applicable (unknown type, past expiresAt, unknown subject); done |
rejected | Permanently refused; drop, log, give-up hook |
deferred | Temporarily refused; retry later |
ExtendReason enum
| Value | Meaning |
|---|---|
home_unreachable | Client can't obtain an assertion |
FederationMode enum
| Value | Meaning |
|---|---|
open | Default: federate with every peer except blocked ones |
allowlist | OPTIONAL: federate only with listed peers, never with blocked ones |
IdentityMismatchReason enum
| Value | Meaning |
|---|---|
sec | |
inc | |
igen | |
identity_key | |
kind | |
device |
Lane enum
| Value | Meaning |
|---|---|
high | identity.changed, device.revoked, account.deleted, account.suspended; notify.event expiring within 120 s of ts; discovery.metadata_changed with urgent: true. Sent at once |
normal | Everything else; MAY wait up to 250 ms to fill a batch |
ProbeOutcome enum
| Value | Meaning |
|---|---|
Unreachable | DNS failure, refused/reset, TLS failure, timeout; HTTP 5xx; any other 4xx or a 3xx (logged) |
Reachable | HTTP 429; HTTP 200 with valid IdentityState; HTTP 200 whose IdentityState still fails after refetch (admin alerted); any other response |
Account gone | HTTP 410 problem identity.account_deleted, or 404 with code identity.not_found |
RemoteSessionState enum
| Value | Meaning |
|---|---|
active | Verified within the last hour |
extended | Kept alive past its verified hour because home is unreachable |
S2SUnauthenticatedReason enum
| Value | Meaning |
|---|---|
missing | |
malformed | |
alg | |
typ | |
claims | |
kid | |
issuer_not_canonical | |
key_unknown | |
key_status | |
signature | |
audience | |
method | |
uri | |
body_hash | |
expired | |
not_yet_valid | |
lifetime | |
replayed |
SecureAccess enum
| Value | Meaning |
|---|---|
full | May enter secure contexts |
existing_only | Extended enrolled session: may continue where the device already has a leaf, no new secure joins |
none | No secure access |
SecurityState (HomeAssertion.sec, RemoteSession.account.security) enum
| Value | Meaning |
|---|---|
insecure | Insecure account |
secure | Secure account |
SessionEndReason (federation.session_ended data.reason / event reason) enum
| Value | Meaning |
|---|---|
expired | expiresAt passed |
extension_limit | Extension refused at the 24 h limit and expiresAt passed |
device_revoked | device.revoked accepted (retry yes) |
identity_changed | identity.changed made the enrolled device invalid (retry yes) |
account_deleted | account.deleted, explicit deletion probe answer, or a new inc (retry no) |
blocked | Home domain blocked (retry no) |
key_revoked | Issuer key that verified the last assertion revoked (retry yes) |
moderation | Moderation action of 10 (as 10 specifies) |
replaced | Fifth concurrent session for the same (account, did) (retry no) |
signed_out | DELETE …/sessions/current (retry no) |
admin | Administrator ended it, or account.suspended accepted (retry yes); unknown reasons treated as admin |
07 Identity keys, certificates and verification
Actor object
actor member of identity.changed / device.revoked, only on delivery to the subject's own devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Initiating device |
plat | string | Yes | Its platform |
changedAt | timestamp | Yes | Time of the change RFC 3339 |
Also described in 10 §11.2.
AddedDevice object
device member of identity.changed when change is device_added.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Added device |
plat | string | Yes | Its platform |
DeviceCertificate jws
Identity-key-signed certificate binding one device's DSK and box key to the account and generation. Header exactly {alg: EdDSA, typ: sv-devcert+jwt, kid: thumb(ik)}. Max 2,048 bytes; lifetime until revoked or reset; no exp/nbf. Self-issued by the device for itself only.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sub | string | Yes | Canonical address MUST equal IdentityCertificate sub |
igen | integer | Yes | Generation MUST equal IdentityCertificate igen |
did | string | Yes | Device ID assigned by the home server (05) 16 bytes, base64url, 22 characters |
dsk | OkpJwk (Ed25519) | Yes | Device signing key public key MUST NOT equal ik |
dbk | OkpJwk (X25519) | Yes | Device box key for HPKE sealing to this device kty OKP, crv X25519, x 32 bytes |
plat | Platform | Yes | Device platform 1–16 chars of [a-z0-9_]; bot iff kind is bot |
iat | integer (NumericDate) | Yes | Time of issue ≤ now + 60 s |
Also described in 00 §6 HP-1, §7.13.
DeviceEntry object
One active enrolled device in IdentityState devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Device ID unique within devices; 16 bytes |
dkf | string | Yes | Thumbprint of the device's DSK for the current igenthumb(dsk) |
plat | string | Yes | Copied from the DeviceCertificate |
since | integer (NumericDate) | Yes | When the device was listed (registration time) |
DeviceRevocation jws
Optional identity-key-signed statement that one device ID is revoked for good, in every generation. Header exactly {alg: EdDSA, typ: sv-devrevoke+jwt, kid: thumb(ik)}. Max 1,024 bytes; permanent; no exp/nbf. Accepted as evidence only from revoked[].rev of a verified IdentityState.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sub | string | Yes | Account canonical address |
igen | integer | Yes | Generation of the signing identity key |
did | string | Yes | Revoked device ID |
iat | integer (NumericDate) | Yes | Time of signing |
Also described in 00 §2.4, §7.13.
IdentityCertificate jws
Self-signed certificate binding the account's identity key to its canonical address, generation and kind. Header exactly {alg: EdDSA, typ: sv-idcert+jwt, kid: thumb(ik)}. Max 2,048 bytes; lifetime until next reset; no exp/nbf.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sub | string | Yes | Account canonical address (§4.2) |
ik | OkpJwk (Ed25519) | Yes | Identity public key exactly kty, crv, x; x 32 bytes base64url |
igen | integer | Yes | Identity generation of this key 1 to 4,294,967,295 |
kind | AccountKind | Yes | Account kinduser or bot; MUST equal account kind; unknown rejected |
iat | integer (NumericDate) | Yes | Time of issue ≤ now + 60 s |
Also described in 00 §6 HP-1, §7.13.
IdentityDiagnostic object
The data object of a 15 diagnostic report with kind identity_check; envelope ctx is the context and createdAt the observation time. Sent via POST /v1/diagnostics to the hosting server and own home server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
subject | string | Yes | The member canonical address |
did | string | No | Device ID of the leaf |
reason | IdentityCheckResult | Yes | Identity check result (§10.6) |
ver | integer | No | ver of the IdentityState involved |
IdentityResponse object
Response body of every §11 endpoint (GET /v1/me/identity adds thisDevice).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | The canonical address |
state | string | Yes | The current IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificate JWS of each listed device same order as devices; empty when insecure |
IdentityState jws
The home server's signed statement of an account's current identity, published for every account (insecure and bots included). Header exactly {alg: EdDSA, typ: sv-idstate+jwt, kid: <canonical-domain>#<keyId>}. Max 32,768 bytes; exp − iat 1..86,400 s; no nbf.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Issuer home server canonical domain; equals domain of sub and of header kid |
sub | string | Yes | Account canonical address |
inc | string | Yes | Account incarnation (05 §11.1, D-086) 16 bytes base64url, 22 chars; never changes while the account exists |
ver | integer | Yes | Version 1 to 2^53 − 1; +1 on every content change |
sec | SecurityState | Yes | Account security stateinsecure or secure; unknown = malformed |
igen | integer | Yes | Current identity generation 0 to 4,294,967,295 |
idc | string (IdentityCertificate JWS) | No | IdentityCertificate for igenrequired when sec is secure; MUST be absent when insecure; byte-identical to registered |
devices | array<DeviceEntry> | Yes | Active enrolled devices empty when insecure; at most maxEnrolledDevices, never more than 64; ordered by since then did |
revoked | array<RevokedEntry> | Yes | Recently revoked devices at most 50 entries, at most 8 carrying rev; may be empty |
iat | integer (NumericDate) | Yes | Time of signing |
exp | integer (NumericDate) | Yes | Expiryexp − iat > 0 and ≤ 86,400 |
Also described in 00 §6 HP-2, §7.13.
LocalOwnIdentityState other
Device-local (not vault) record of the last own IdentityState accepted (ver, igen, sec, device set), own enrolment generation, dids whose pairing it approved in the last 24 h, and W4 alerts already raised (including W4d dids).
OkpJwk object
Public key JWK used in ik, dsk (Ed25519) and dbk (X25519). Exactly the members kty, crv, x; anything else is malformed. Ed25519 keys MUST pass 04 §4.3 items 1 and 2.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kty | string | Yes | Key type "OKP" |
crv | string | Yes | Curve "Ed25519" for ik/dsk; "X25519" for dbk |
x | base64url | Yes | Raw public key 32 bytes, no padding |
PinRecord object
A client's stored record of the identity key it accepted for one DM contact address, with its verification state. Stored in the AccountVault (08 owns record type, ID and encryption), shared across the user's enrolled devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Contact's address canonical address |
inc | string | Yes | Contact's incarnation the record belongs to |
state | PinState | Yes | Verification state unknown value treated as verified_blocked (fail safe) |
ik | base64url | No | Pinned identity key 32 bytes; required except in state new_account; in downgraded states the last key |
igen | integer | Yes | Generation of ik |
ver | integer | Yes | Highest IdentityState ver reflected |
kind | AccountKind | Yes | user or bot from IdentityCertificate; in new_account from public profile, user if unknown |
pendingIk | base64url | No | New key awaiting the user's decision required in verified_blocked |
pendingIgen | integer | No | Its generation required in verified_blocked |
prevIk | base64url | No | Key the most recent key change replaced required in changed and accepted |
prevIgen | integer | No | Generation of prevIkwith prevIk |
wasVerified | boolean | Yes | Whether the key most recently replaced, or held at downgrade, was verified |
verifiedAt | timestamp | No | Time of verification RFC 3339; required in verified |
verifyMethod | VerifyMethod | No | safety_number or qrrequired in verified |
changeId | string | No | Identifies the change when a W2 is outstanding: thumb(new key) + ":" + igen, "insecure:" + igen, or "account:" + inc |
w2Dismissed | boolean | Yes | Whether the user dismissed W2 for changeId |
firstSeenAt | timestamp | Yes | Time of first contact RFC 3339 |
updatedAt | timestamp | Yes | Last change to the record RFC 3339 |
Also described in 02 §10.1.
RevokedEntry object
One recently revoked device in IdentityState revoked.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Revoked device ID MUST NOT also appear in devices |
at | integer (NumericDate) | Yes | Time of revocation |
rev | string (DeviceRevocation JWS) | No | DeviceRevocation for this did, if uploadedonly the 8 most recent entries keep it |
SafetyNumber other
60-digit number: two 30-digit Fingerprint(ik, addr) halves sorted as strings. Fingerprint: h = "sv1 safety" || 0x00 || 0x00 0x01 || ik || addr; 5,200 iterations h = SHA-512(h || ik); six 5-digit groups from uint40_be(h[5j..5j+4]) mod 100000. Displayed as 12 groups of 5 digits.
SvDeviceCredential tls-record
Body of the sv_device MLS credential (CredentialType 0xF5A0): two RFC 9420 variable-length vectors holding the IdentityCertificate and DeviceCertificate compact JWS as ASCII. Each vector 1–2,048 bytes, minimal varint length; no trailing bytes; only base64url alphabet and ..
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
identity_certificate | opaque<V> | Yes | IdentityCertificate JWS 1–2,048 bytes ASCII |
device_certificate | opaque<V> | Yes | DeviceCertificate JWS 1–2,048 bytes ASCII |
Also described in 00 §6 HP-1.
ThisDevice object
thisDevice member of GET /v1/me/identity.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | The session's device |
enrolled | boolean | Yes | True when did is listed in devices |
VerifierStore other
Per-subject state each verifier (hosting server, client) keeps: highest accepted IdentityState with ver, igen, kid, iat, acceptedAt; validated-at time; verified DeviceRevocations as (sub, did) with carrying state's kid/iat/acceptedAt (permanent); replaced incarnations. Local only on clients, not synced.
VerifyQR binary-frame
QR verification payload, encoded with RFC 8446 §3.4 fixed 2-byte length prefixes. QR text is SVV1: + base64url(VerifyQR) without padding, byte mode, error correction level M; valid 10 minutes; nonce fresh per display.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | uint8 | Yes | Payload version 1 |
nonce | opaque[16] | Yes | Nonce fresh random each time the screen opens |
own_address | opaque<1..2^16-1> | Yes | Displayer's canonical address UTF-8 |
own_ik | opaque[32] | Yes | Displayer's own identity key |
peer_address | opaque<1..2^16-1> | Yes | The contact's canonical address UTF-8 |
peer_ik | opaque[32] | Yes | Key the displayer trusts for the contactpendingIk if pin is verified_blocked, else pin ik |
ChannelAsCheck enum
| Value | Meaning |
|---|---|
C1 | ValidateSvDeviceCredential on new/updated leaf |
C2 | Leaf sub/did are the session's account/device |
C3 | IdentityState fresh for channel AS (fetch with 5 s timeout; D-083 exception) |
C4 | sec secure and credential IdentityCertificate byte-identical to state idc |
C5 | IsDeviceValid holds |
C6 | L4 |
C7 | L5 and L8; server issues/reissues Remove proposals |
C8 | L6 and L7 |
C9 | Account may join and isn't banned (not an identity check) |
ChannelSilentCheck enum
| Value | Meaning |
|---|---|
S1 | MUST validate every added/updated leaf; L1, L2, L4, L6, L7 |
S2 | SHOULD verify annotated IdentityState in background |
S3 | SHOULD record L5 violation as diagnostic |
S4 | MUST report S2/S3 failures as identity diagnostics |
S5 | MUST NOT show warnings about others in channels |
S6 | MUST NOT create pins from channel rosters |
DmAdmissionCheck enum
| Value | Meaning |
|---|---|
D1 | ValidateSvDeviceCredential |
D2 | sv_participants lists sub with thumb(ik) |
D3 | Pin check |
D4 | New device: IsDeviceValid with state fresh for admission |
D5 | Known device: credential byte-identical |
D6 | L4, L5, L6, L8 hold after change |
IdentityChangeKind enum
| Value | Meaning |
|---|---|
upgraded | First upgrade or re-upgrade |
reset | New identity key |
downgraded | Encryption turned off |
device_added | Device registered |
IdentityCheckResult enum
| Value | Meaning |
|---|---|
malformed | Encoding, JSON, type or size error in a credential or identity object. |
typ_mismatch | Wrong JWS typ. |
bad_signature | A signature doesn't verify, or its key can't be found. |
non_canonical | A sub fails 01 §7.5 (isCanonical); HTTP errors use address.non_canonical. |
subject_mismatch | Two objects, or an object and its context, name different addresses. |
issuer_mismatch | IdentityState iss isn't the home domain of sub. |
generation_mismatch | igen values that must match don't. |
key_mismatch | A kid doesn't match the identity key, or the leaf's identity key differs from the IdentityState's. |
kind_mismatch | kind and plat disagree, or kind differs from the account kind. |
identity_key_as_leaf | A DSK or leaf key equals an identity key (L6). |
dsk_mismatch | The leaf's signature_key isn't the DeviceCertificate's DSK (L2). |
dkf_mismatch | The IdentityState lists the device with a different dkf. |
device_not_listed | The device isn't in the IdentityState's devices. |
device_revoked | The device is covered by a revocation. |
device_mismatch | The leaf's did isn't the device of the session that submitted it. |
account_insecure | The IdentityState says sec: insecure. |
state_stale | No IdentityState fresh enough for the purpose (§7.6). |
state_unavailable | The IdentityState couldn't be fetched. Transient: the only retryable reason of mls.credential_rejected. |
state_rollback | Lower ver or igen than one already accepted, or a replaced/non-generation-starting incarnation. |
state_equivocation | Same ver different content, two IdentityCertificates for one generation, or sec change without igen change. |
duplicate_device_leaf | L4 violated. |
mixed_identity | L5 or L8 violated. |
credential_changed | L7 violated. |
wrong_credential_type | L1 violated. |
not_participant | The person isn't in sv_participants with this identity key (DMs). |
pin_mismatch | The identity key differs from the client's pin and no home-signed evidence supports the change. |
not_permitted | The account may not be in the context (C9); not an identity check; reported via mls.credential_rejected with data.membershipCode. |
InvalidCertificateObject enum
| Value | Meaning |
|---|---|
identityCertificate | IdentityCertificate failed |
deviceCertificate | DeviceCertificate failed |
revocation | DeviceRevocation failed |
KeyReusedWhich enum
| Value | Meaning |
|---|---|
ik | Identity key reused |
dsk | DSK reused or equals identity key |
LeafRule enum
| Value | Meaning |
|---|---|
L1 | Every leaf credential is sv_device; basic/x509 forbidden; capabilities.credentials includes 0xF5A0; group required_capabilities lists it. |
L2 | Leaf signature_key equals raw(dsk) of the DeviceCertificate. |
L3 | encryption_key fresh for each leaf (RFC 9420). |
L4 | No two leaves with the same (sub, did), except within one commit that also removes the older leaf. |
L5 | All leaves of one sub carry byte-identical IdentityCertificates, except leaves the hosting server has proposed to remove. DMs: MUST; channels: diagnostic only. |
L6 | No leaf signature_key equals any leaf's identity key. |
L7 | A leaf's credential never changes in place; Update/UpdatePath must carry byte-identical credential. |
L8 | A member commit admitting a leaf with a different IdentityCertificate for the same sub must remove all older-IdentityCertificate leaves of that sub in the same commit. |
PinState enum
| Value | Meaning |
|---|---|
pinned | Key accepted silently (TOFU) or after W2 dismissed |
verified | User verified current key |
changed | Unverified contact's key changed; W2 outstanding |
verified_blocked | Verified contact's key changed; sending blocked; pendingIk waits |
accepted | User tapped Accept new key; W2 non-blocking banner |
downgraded | Contact turned encryption off; last key kept |
downgraded_blocked | Verified contact downgraded; nothing sent in 1:1 DM until accept |
new_account | New insecure account at a known address; no ik |
Also described in 02 §10.1.
ResetMode enum
| Value | Meaning |
|---|---|
new_key | Replace identity key in a new generation |
downgrade | Turn encryption off (counts as a reset) |
SecurityState enum
| Value | Meaning |
|---|---|
insecure | No identity key; no idc; devices empty |
secure | Has idc and enrolled devices |
SelfAlert enum
| Value | Meaning |
|---|---|
W4a | Your identity was reset from elsewhere (needs a tap) |
W4b | Someone appears under your address (needs a tap) |
W4c | A new device was added (no tap) |
W4d | New sign-in notice; triggered by 05 §12.12 |
VerifyMethod enum
| Value | Meaning |
|---|---|
safety_number | Compared safety number |
qr | Mutual QR scan |
W2Variant enum
| Value | Meaning |
|---|---|
key changed | Contact reset or re-upgraded |
turned off encryption | Contact downgraded |
new account | New incarnation at a known address (1:1 DM only) |
08 Turning on encryption, pairing, backup and the vault
AbortBody object
Body of abort, sent by either participant after cpace_a and before ack; carries no CPace data.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | string | Yes | Abort reason. wrong_code | verification_failed | cancelled | internal; unknown = internal |
AckBody object
Body of ack, sent by the new device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
status | string | Yes | Cleartext status for the server state machine. "ok" | "failed" |
reason | string | No | Failure reason. "verification_failed" | "registration_failed"; only with failed |
proof | {nonce, ct} | Yes | Encrypted AckProof. §6.7.3 |
AckProof object
Plaintext encrypted under K_ack and sent as ack.proof; the approver shows success only after it decrypts and says ok.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Version. 1 |
status | string | Yes | Result. ok | failed |
did | string | Yes | New device. newDid |
dkf | string|null | Yes | Thumbprint of its new DSK, or null. |
ArchiveKeyEntry object
One history key entry in an archive record.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ekid | base64url | Yes | Key ID = HKDF-Expand(key, "sv1 ekid", 8). 8 bytes |
key | base64url | Yes | K_hist. 32 bytes |
source | enum ArchiveKeySource | Yes | Origin of key. v1 writers write only mls |
confirmed | boolean | Yes | Has decrypted a verified SealedMessage. always true for mls |
learnedAt | timestamp | Yes | First learned. |
ArchiveRecord object
Plaintext of an archive vault record: history keys of one (group, epoch).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Type tag. "archive" |
host | string | Yes | Hosting server. canonical domain |
ctx | string | Yes | Context. ch:…, dm:… or gdm:… |
groupId | string | Yes | Group. MLS group_id (00 §7.6) |
gen | integer | Yes | Group generation. 1 to 2,147,483,647; must agree with groupId |
epoch | integer | Yes | Epoch. 0 to 2^53 − 1 |
keys | array<ArchiveKeyEntry> | Yes | Key entries (more than one only on fork). 1 to 4, distinct ekid |
BackupMetaExtras object
Members added to the ?part=meta response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
downloadAllowed | boolean | Yes | Whether a full GET would pass §5.7 now (ignoring rate limits). |
phraseChangePending | boolean | Yes | A new phrase is required before rewriting under the current one. |
BoxKey object
A device's public X25519 box key, certified via devcert's dbk claim and signed by the device's DSK.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Device ID. equal to path and session device |
igen | integer | Yes | Identity generation. |
pub | base64url | Yes | X25519 public key. 32 bytes; = x of devcert dbk |
devcert | string | Yes | DeviceCertificate. JWS |
sig | base64url | Yes | DSK signature over BoxKeyTBS. label vault-box-key |
createdAt | timestamp | No | Stored time. set by server |
BoxKeyTBS tls-record
u8(1) || lv(addr) || did || u32(igen) || pub
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | uint8 | Yes | Version. 1 |
addr | opaque<V> | Yes | Account. canonical address |
did | opaque[16] | Yes | Device ID binary. |
igen | uint32 | Yes | Identity generation. |
pub | opaque[32] | Yes | X25519 public key. |
ConfirmABody object
Body of confirm_a, sent by the initiator.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ta | base64url | Yes | Initiator confirmation tag. 32 bytes |
CpaceABody object
Body of cpace_a, sent by the entering device (CPace initiator).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cred | string | Yes | Which credential was used. "qr" (prs_kind 1) or "code" (prs_kind 2); unknown = CPace failure |
ya | base64url | Yes | 04's Ya. 32 bytes |
ad | base64url | Yes | 04's ADa. 26 bytes |
CpaceBBody object
Body of cpace_b, sent by the displayer (CPace responder).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
yb | base64url | Yes | Yb. 32 bytes |
ad | base64url | Yes | ADb. 26 bytes |
tb | base64url | Yes | Responder confirmation tag. 32 bytes |
DeviceSummary object
Device description built by the home server from the 05 device record.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Device ID. |
plat | enum Platform | Yes | Platform. desktop | web | ios | android |
client | string | Yes | Client software and version. ≤ 64 chars |
name | string | Yes | Display name, e.g. "Chrome · Windows". ≤ 64 chars |
provider | string | Yes | OIDC provider ID the device record was created with. |
authAt | timestamp | Yes | Most recent provider sign-in of the device session. |
KeyBackup object
Encrypted blob on the home server that lets a device with the recovery phrase and a home session become enrolled; the server can never open it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Format version. 1; server refuses others with backup.invalid; client treats unknown as unusable |
addr | string | Yes | Account address. MUST equal account's canonical address |
igen | integer | Yes | Identity generation whose keys the backup holds. |
ikf | string | Yes | Thumbprint of identity public key. RFC 7638 thumbprint, base64url, 43 chars |
vgen | integer | Yes | Newest vault generation whose key the payload holds. 1 to 4,294,967,295 |
phraseId | base64url | Yes | Phrase ID of the phrase that opens this backup. 16 bytes |
kdf | Argon2idParams | Yes | KDF parameters. 04 §12.2: alg, v, m, t, p, salt |
nonce | base64url | Yes | AES-GCM nonce. 12 bytes |
ct | base64url | Yes | AES-256-GCM ciphertext with 16-byte tag. decoded ≤ maxBackupBytes |
ver | integer | No | Version. response only; server; from 1, +1 per accepted write across stagings and igens; never reused |
state | enum KeyBackupState | No | active or staged. response only; unknown = unusable |
updatedAt | timestamp | No | Write time. response only |
updatedBy | string | No | Writing device. response only; did |
KeyBackupAAD other
AEAD associated data of KeyBackup.ct: "sv1 backup" || 0x00 || u8(v) || lv(addr) || u32(igen) || ikf_raw (32 bytes) || u32(vgen) || phraseId_raw (16 bytes) || u8(kdf.v) || u32(kdf.m) || u32(kdf.t) || u32(kdf.p) || lv(salt); ct = AEAD-Seal(BK, nonce, UTF-8(payload JSON), AAD).
KeyBackupPayload object
UTF-8 I-JSON plaintext encrypted into KeyBackup.ct; also the base of the pairing payload.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Version. 1 |
addr | string | Yes | Account address. canonical |
igen | integer | Yes | Identity generation. |
ik | base64url | Yes | Identity private key. 32-byte Ed25519 seed |
idc | string | Yes | Identity certificate. IdentityCertificate JWS exactly as registered |
vaultIdKey | base64url | Yes | K_vid. 32 bytes |
vaultKeys | array<{vgen: integer, key: base64url(32)}> | Yes | Vault keys. MUST contain object's vgen (current when written); SHOULD contain only it |
phrase | base64url | Yes | Phrase entropy E. 10 bytes |
phraseId | base64url | Yes | Phrase ID of E. 16 bytes |
createdAt | timestamp | Yes | When built. |
KeyBackupWrite object
Body of PUT /v1/me/backup: the client-set KeyBackup members plus stage and prevVer.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v, addr, igen, ikf, vgen, phraseId, kdf, nonce, ct | as KeyBackup | Yes | Client-set KeyBackup members. §5.1 |
stage | boolean | No | true to stage a backup for an identity about to be registered or reset. default false |
prevVer | integer | No | The ver of the active KeyBackup this write replaces. required when stage is false |
KeyStorageDiagnostic object
Diagnostic data of kind key_storage.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
keyProtection | enum KeyProtection | Yes | How the wrapping key is protected. hardware | platform | file |
KeyStoreWrapAAD other
Associated data of every wrapped local key-store secret: lv(label) || lv(addr) || did, label e.g. ik, dsk, box, vault:<vgen>, phrase, bk (K-1, §13.3).
NotificationKeySubset object
The only secrets a mobile notification extension or web service worker may read: recent history keys plus public sender DSKs.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Version. 1 |
addr | string | Yes | Account. |
did | string | Yes | Device. |
contexts | array<{host, ctx, <entries>: [{gen, epoch, ekid, khist, learnedAt}]}> | Yes | History keys for contexts with notifications. member name of the entry list not given by the spec; up to 4 entries per context: the current epoch, the two before it, and any other epoch used by a message in the last 24 h |
senders | array<{addr, did, dsks}> | No | Accepted public DSKs per sender device, per context. required whenever contexts non-empty; public data only |
updatedAt | timestamp | Yes | Last write by main app. |
PairingAAD other
AAD(dir, fromDid, toDid) = "sv1 pair" || 0x00 || u8(dir) || pairingId || fromDid || toDid || lv(addr); dir 0x01 for the payload (approver to new device, K_payload), 0x02 for the ack proof (new device to approver, K_ack).
PairingCode other
6-digit code shown as "042 917" (pair-code-shown = 3DIGIT SP 3DIGIT); input strips non-digits after NFKC and needs exactly 6 digits; PRS is the 6 ASCII digits.
PairingMessageItem object
Item of GET …/messages.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
n | integer | Yes | Index. |
type | enum PairingMessageType | Yes | Type. |
from | string | Yes | Sender. did |
body | object | Yes | Body. |
sentAt | timestamp | Yes | Server acceptance time. |
PairingMessageRequest object
Body of POST /v1/me/pairing/{id}/messages.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | enum PairingMessageType | Yes | Message type. |
body | object | Yes | Type body. ≤ 64 KiB payload, ≤ 2 KiB others |
PairingPayload object
Plaintext of the pairing payload: all KeyBackupPayload members plus approverDid and newDid.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
(KeyBackupPayload members) | KeyBackupPayload | Yes | v, addr, igen, ik, idc, vaultIdKey, vaultKeys, phrase, phraseId, createdAt. vaultKeys MUST contain current generation, MAY contain older |
approverDid | string | Yes | Approver's did. |
newDid | string | Yes | New device's did. |
PairingSession object
Server-side record of one pairing attempt.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. server-assigned |
state | enum PairingState | Yes | Session state. unknown = terminal failure |
displayer | enum Displayer | Yes | Who displays the QR/code. |
createdBy | enum Displayer | Yes | Creator role. new_device | enrolled_device |
newDevice | DeviceSummary|null | Yes | The new device, once known. |
approver | DeviceSummary|null | Yes | The approver, once known. |
createdAt | timestamp | Yes | Creation time. |
expiresAt | timestamp | Yes | Deadline. createdAt + 10 min, or confirmedAt + 5 min once confirmed |
endedAt | timestamp|null | Yes | When terminal state reached. |
endReason | enum PairingEndReason|null | Yes | Why ended. unknown = protocol_error |
PairQrPayload binary-frame
QR code content: "SVPAIR1:" + base32 (RFC 4648, no padding) of pair-bin; QR alphanumeric mode, EC level M.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | u8 | Yes | Format version. 0x01; reject others |
displayer | u8 | Yes | Direction. 0x01 new device displays (A); 0x02 approver displays (B); reject unknown |
pairingId | bytes[16] | Yes | Session ID. binary UUID |
secret | bytes[16] | Yes | QR secret (CPace PRS for prs_kind 1). random |
addrLen | lv varint (1 or 2 bytes) | Yes | Address length. one byte below 64; up to 318 |
addr | bytes[addrLen] | Yes | Account address. UTF-8 canonical address; no trailing bytes |
PayloadBody object
Body of payload, sent by the approver: the encrypted PairingPayload.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
nonce | base64url | Yes | AES-GCM nonce. 12 bytes |
ct | base64url | Yes | AEAD-Seal(K_payload, nonce, payload, AAD(0x01, approverDid, newDid)). |
PinVaultRecord object
Plaintext of a pin record: 07's pin record (07 §16.1) plus t: "pin"; members and merge owned by 07; writers keep unknown members.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Type tag. "pin" |
addr | string | Yes | Contact address. 07-owned; used for rid |
RecoveryPhrase other
8 BIP-39 English words encoding 80-bit E plus 8-bit checksum SHA-256(E)[0]; canonical text form lowercase, single spaces (ABNF recovery-phrase = word 7( SP word )). Not a BIP-39 mnemonic.
RecoveryRecord object
The single recovery vault record: current phrase entropy and W8 state, synced to every enrolled device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Type tag. "recovery" |
phrase | base64url | Yes | Current E. 10 bytes |
phraseId | base64url | Yes | Phrase ID. 16 bytes |
reason | enum RecoveryReason | Yes | Why made. unknown = replaced |
createdAt | timestamp | Yes | When phrase made. |
savedAt | timestamp|null | Yes | First completed save. |
saveMethod | enum SaveMethod|null | Yes | How saved. unknown kept and treated as saved |
lastNudgedAt | timestamp|null | Yes | Last W8 banner. |
SecPinVaultRecord object
Plaintext of a sec_pin record: 09's channel, community or group DM pin (09 §13.2), already carrying t: "sec_pin"; 08 uses only host and ctx for the rid.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Type tag. "sec_pin" |
host | string | Yes | Hosting server. 09-owned |
ctx | string|null | Yes | Context. null for community pin |
SettingsRecord object
Plaintext of a settings vault record.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Type tag. "settings" |
name | string | Yes | Setting name. [a-z][a-z0-9_]{0,63} |
value | any JSON | Yes | Value. defined by owner |
updatedAt | timestamp | Yes | For merging. |
VaultChangesPage object
Response of GET /v1/me/vault/changes.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<VaultRecord> | Yes | Changed records incl. tombstones. |
vseq | integer | Yes | Cursor. |
headVseq | integer | Yes | Head. informative |
hasMore | boolean | Yes | More pages. |
VaultGeneration object
One vault key generation as stored by the server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
vgen | integer | Yes | Generation. 1 to 4,294,967,295 |
kcv | base64url | Yes | Key check value kcv(vgen). 8 bytes |
link | VaultKeyLink|null | Yes | Link to previous key. null for generation 1 |
idStateVer | integer | Yes | IdentityState ver used by creator. |
createdBy | string | Yes | Creator. did; client-set |
devcert | string | Yes | Creator's DeviceCertificate. JWS; client-set |
sig | base64url | Yes | Generation signature. label vault-generation |
createdAt | timestamp | Yes | Created. server-set |
VaultGenerationCreate object
Body of POST /v1/me/vault/keys (generation 1, rotation or orphan recovery).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | New generation. 1 for initialization; g + 1 for rotation; c + 1 for recovery |
prevVgen | integer | Yes | Generation this one follows. 0 for generation 1; otherwise the current generation |
kcv | base64url | Yes | kcv(vgen). 8 bytes |
link | VaultKeyLink|null | Yes | Wraps K_vault(linkedVgen); linkedVgen normally g, or l for §10.5.3. null for generation 1 |
grants | array<{did, enc, ct}> | Yes | VaultKeyGrants for every device verified in V3. [] for generation 1 |
idStateVer | integer | Yes | ver of the IdentityState used in V3. |
createdBy | string | Yes | Creating device. did; must be the session's device |
devcert | string | Yes | Creating device's certificate. DeviceCertificate JWS |
sig | base64url | Yes | Generation signature. labelled signature, label vault-generation, over VaultGenerationTBS |
VaultGenerationTBS tls-record
Structure signed by the generation signature.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | uint8 | Yes | Version. 1 |
addr | opaque<V> | Yes | Account. |
igen | uint32 | Yes | Identity generation. |
vgen | uint32 | Yes | Generation. |
linked_vgen | uint32 | Yes | Linked generation. 0 for generation 1 |
kcv | opaque[8] | Yes | Key check value. |
link_nonce | opaque<V> | Yes | Link nonce. empty for gen 1 |
link_ct | opaque<V> | Yes | Link ciphertext. empty for gen 1 |
id_state_ver | uint64 | Yes | IdentityState ver. |
creator_did | opaque[16] | Yes | Creator did. |
VaultGrantsPostResponse object
200 response of POST /v1/me/vault/grants.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
accepted | array<string> | Yes | Grants stored. dids |
rejected | array<{did, reason}> | Yes | Grants refused. reason: not_active | no_box_key |
VaultIntegrityDiagnostic object
Diagnostic data of kind vault_integrity sent via POST /v1/diagnostics (15 §14.3).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
check | enum VaultIntegrityCheck | Yes | Which check failed. |
rid | base64url | No | Record ID. |
vgen | integer | No | Generation. |
VaultKeyGrant object
K_vault(vgen) HPKE-sealed (base mode, DHKEM(X25519, HKDF-SHA256)/HKDF-SHA256/AES-256-GCM) to one device's box key; info = "sv1 vault grant" || 0x00 || lv(addr) || did || u32(igen) || u32(vgen), aad empty. Authenticates nothing by itself.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Recipient device. |
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | Generation. |
enc | base64url | Yes | HPKE encapsulated key. 32 bytes |
ct | base64url | Yes | Sealed key. 48 bytes |
createdAt | timestamp | No | Stored. server-set |
createdBy | string | No | Granting device. server-set |
VaultKeyLink object
The newer vault key's encryption of an older one: AEAD-Seal(K_link(g, l), nonce, K_vault(l), "sv1 vault" || 0x00 || 0x02 || lv(addr) || u32(igen) || u32(g) || u32(l)).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
linkedVgen | integer | Yes | Generation it wraps. normally g − 1 |
nonce | base64url | Yes | Nonce. 12 bytes |
ct | base64url | Yes | Wrapped key. |
VaultKeyLinkAAD other
link(g).ct = AEAD-Seal(K_link(g, l), nonce, K_vault(l), "sv1 vault" || 0x00 || 0x02 || lv(addr) || u32(igen) || u32(g) || u32(l)).
VaultKeysState object
Response of GET /v1/me/vault/keys.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | Current generation. |
rotationPending | boolean | Yes | Rotation needed. |
pendingAt | timestamp|null | Yes | Since when. |
phraseChangePending | boolean | Yes | New phrase required. |
orphaned | boolean | Yes | Current generation lost. |
generations | array<VaultGeneration> | Yes | Generations. |
VaultRecord object
Wire form of one AccountVault record version.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
rid | base64url | Yes | Record ID (§8.5). 16 bytes, 22 chars; client |
type | string | Yes | Record type. [a-z][a-z0-9_]{0,31}; client; unknown types ignored |
bucket | base64url|null | Yes | Bucket tag. 16 bytes; only archive and shared_keys |
igen | integer | Yes | Identity generation. MUST equal vault's igen |
vgen | integer | Yes | Generation whose key encrypted this version. |
nonce | base64url | No | Nonce. 12 bytes; absent on tombstones |
ct | base64url | No | Ciphertext and tag. decoded ≤ maxVaultRecordBytes; absent on tombstones |
ver | integer | Yes | Record version. server |
vseq | integer | Yes | Change sequence of this version. server |
deleted | boolean | Yes | true for a tombstone. server |
updatedAt | timestamp | Yes | Write time. server |
updatedBy | string | Yes | Writing device. server; did |
VaultRecordAAD other
AEAD associated data of a vault record: "sv1 vault" || 0x00 || 0x01 || rid || lv(type) || u32(igen) || u32(vgen) || u32(ver) || lv(addr), where ver = ifVer + 1; ct = AEAD-Seal(K_rec(vgen, rid), nonce, UTF-8(plaintext JSON), AAD).
VaultRecordWrite object
One item of PUT /v1/me/vault/records.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
rid, type, bucket, igen, vgen, nonce, ct | as VaultRecord | Yes | As §8.3. bucket may be null |
ifVer | integer | Yes | Compare-and-set; stored version = ifVer + 1. 0 = create (no record or tombstone may exist); n > 0 = replace version n |
VaultSummary object
Response of GET /v1/me/vault.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | Current generation. 0 = uninitialized |
rotationPending | boolean | Yes | Rotation needed. |
vseq | integer | Yes | Newest vseq. |
recordCount | integer | Yes | Record count. |
bytesUsed | integer | Yes | Quota usage. |
quotaBytes | integer | Yes | Quota. |
retired | array<{igen: integer, expiresAt: timestamp}> | Yes | Retired vaults. |
VaultWriteResponse object
200 response of PUT /v1/me/vault/records.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<VaultWriteResult> | Yes | Per-record outcomes. one per item, in request order |
vseq | integer | Yes | Vault change sequence after the request. |
VaultWriteResult object
Per-record result in the PUT …/records response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
rid | base64url | Yes | Record ID. |
ok | boolean | Yes | Success. |
ver | integer | No | New version. on success |
vseq | integer | No | Change sequence. on success |
error | problem object | No | Per-record error. on failure (RFC 9457) |
AbortReason enum
| Value | Meaning |
|---|---|
wrong_code | Tag mismatch. |
verification_failed | Bad CPace data (unknown cred, wrong length). |
cancelled | User cancelled. |
internal | Other; unknown reasons map here. |
AckFailReason enum
| Value | Meaning |
|---|---|
verification_failed | Payload check failed. |
registration_failed | DeviceCertificate registration failed. |
AckStatus enum
| Value | Meaning |
|---|---|
ok | Keys received and device registered. |
failed | Failure. |
ArchiveKeySource enum
| Value | Meaning |
|---|---|
mls | From writer's own MLS processing; only value v1 writes. |
recovered | Reserved; treated, like any unknown value, as not from MLS. |
DiagnosticKind enum
| Value | Meaning |
|---|---|
vault_integrity | A vault record or generation failed a check (data: check, rid?, vgen?). |
key_storage | How the local key store is protected (data: keyProtection). |
Also described in 14 §9.4.
Displayer enum
| Value | Meaning |
|---|---|
new_device | Direction A: new device displays. |
enrolled_device | Direction B: approver displays. |
GrantRejectReason enum
| Value | Meaning |
|---|---|
not_active | did not active. |
no_box_key | did has no box key. |
KeyBackupState enum
| Value | Meaning |
|---|---|
active | The current KeyBackup. |
staged | Awaiting activation with an identity registration or reset. |
KeyProtection enum
| Value | Meaning |
|---|---|
hardware | |
platform | |
file | Linux fallback key file (mode 0600). |
LocalEnrolmentState enum
| Value | Meaning |
|---|---|
pending_upgrade | Keys generated at U2, identity not yet registered. |
pending_reset | Reset material generated at S2. |
enrolled | Identity registered. |
backup_pending | Mark on K_vault(g+1) until the backup holds g+1 (V4–V6). |
PairingCancelReason enum
| Value | Meaning |
|---|---|
denied | "No, that's not me" from a prompted device, only in waiting. |
cancelled | Participant cancels in any non-terminal state. |
PairingCred enum
| Value | Meaning |
|---|---|
qr | prs_kind 1, PRS = 16-byte secret. |
code | prs_kind 2, PRS = 6 ASCII digits. |
PairingEndReason enum
| Value | Meaning |
|---|---|
completed | Success. |
wrong_code | CPace confirmation failed. |
denied | Prompted device answered No. |
cancelled | Participant cancelled or aborted with cancelled. |
superseded | Creator made a newer session. |
timeout | 60 s step or 5-min finish timer. |
expired | 10-min deadline. |
identity_changed | Identity reset or downgrade. |
device_revoked | A participant revoked or signed out. |
protocol_error | Out-of-order message, other abort, or ack failed (not registration). Unknown values map here. |
registration_failed | ack failed with reason registration_failed. |
PairingMessageType enum
| Value | Meaning |
|---|---|
cpace_a | Entering device (initiator), message 1. |
cpace_b | Displayer (responder), message 2. |
confirm_a | Initiator, message 3. |
payload | Approver, encrypted keys. |
ack | New device, result and proof. |
abort | Either participant. |
PairingState enum
| Value | Meaning |
|---|---|
waiting | Created, missing role not filled. |
joined | Both roles filled. |
exchanging | CPace messages in flight. |
confirmed | confirm_a relayed; 5-min finishing deadline. |
delivered | Payload relayed. |
completed | Terminal: ack ok. |
failed | Terminal failure. |
expired | Terminal: 10-min deadline passed. |
cancelled | Terminal: cancelled/denied/identity changed/device revoked. |
PairQrDisplayerByte enum
| Value | Meaning |
|---|---|
0x01 | New device displays (A). |
0x02 | Approver displays (B). |
Platform enum
| Value | Meaning |
|---|---|
desktop | |
web | |
ios | |
android |
Also described in 05 §12.2, 07 §6.1 (open set: 1–16 chars [a-z0-9_]; unknown values from user certificates accepted and shown as generic device).
RecoveryReason enum
| Value | Meaning |
|---|---|
new | Upgrade or reset. |
replaced | User made a new recovery key; unknown values map here. |
lost_or_stolen | After a lost/stolen revocation (§10.8). |
SaveMethod enum
| Value | Meaning |
|---|---|
password_manager | |
print | |
shown |
SettingName enum
| Value | Meaning |
|---|---|
w1_seen | Owner 20: array of community domains for which W1 was shown; set union. |
mention_hints | Owner 11: boolean, default true (D-063). |
typing_indicators | Owner 11: boolean, default true. |
client_prefs | Opaque per-client preferences, owner the client. |
VaultIntegrityCheck enum
| Value | Meaning |
|---|---|
decrypt | |
type | |
rid | |
bucket | |
generation | |
generation_conflict | |
orphaned |
VaultRecordType enum
| Value | Meaning |
|---|---|
archive | History keys per (group, epoch); lazily per bucket. |
shared_keys | Shared message keys per (context, HistoryShare, part); lazily per bucket. |
pin | Contact identity pin (07); eager. |
sec_pin | Secure channel/community/group DM seen (09); eager. |
settings | Synced setting; eager. |
recovery | Current phrase and W8 state; eager; never deleted. |
09 Communities, membership, channels and security transitions
Category object
Channel category.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
name | Text(100) | Yes | 1-100, single line |
position | integer | Yes | from 0 |
version | integer | Yes | |
createdAt | timestamp | Yes | |
updatedAt | timestamp | Yes |
Channel object
A text or voice channel context with a timeline.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | ch:<UUIDv7>; immutable |
address | string | Yes | local@canonicalDomain; shared namespace |
name | string | Yes | linked to local part (D-005) |
reservedAddresses | array<{address, until}> | Yes | Old addresses reserved for 90 days oldest first |
kind | ChannelKind | Yes | immutable; unknown -> text, no call |
security | ChannelSecurity | Yes | only insecure->secure; unknown -> unavailable |
securedAt | timestamp|null | Yes | immutable once set |
upgradeSeq | integer|null | Yes | Highest seq before upgrade null for insecure and created-secure channels; immutable |
preUpgradeHistory | string|null | Yes | kept|deleted when upgradeSeq set |
retentionDays | integer|null | Yes | 1-36500 or null; default null |
topic | Text(1024) | Yes | single line |
categoryId | uuidv7|null | Yes | |
position | integer | Yes | from 0 within category |
memberCount | integer | Yes | MAY be approximate; change alone doesn't change version or emit event |
membership | {state, visibleFromSeq}|null | Yes | caller's own; personalized or omitted in events (keep previous value if omitted) |
version | integer | Yes | excludes memberCount and membership changes |
createdAt | timestamp | Yes | |
updatedAt | timestamp | Yes | |
createdBy | string | Yes | canonical address |
ChannelAlreadySecureData other
data of 409 channel.already_secure.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
channel | Channel | Yes | |
by | string|null | Yes | Upgrading admin, null after server upgrade |
groupId | string|null | Yes | Epoch 0 group |
generation | integer|null | Yes | |
ekid | string|null | Yes |
ChannelList object
Response of GET /v1/channels: every channel the caller can view (for non-members/requesters, previewVisible channels only) plus categories; never paginated (bounded by maxChannels). Categories without any viewable channel are omitted for callers without manage_channels.
ChannelMember object
An account's membership of one channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | ch: reference |
addr | string | Yes | As CommunityMember |
name | string | Yes | |
kind | string | Yes | |
inc | string | Yes | same incarnation as community record |
accountSecurity | string | No | same visibility rule as CommunityMember |
state | ChannelMemberState | Yes | active|needs_encryption|left; unknown -> left |
reason | string|null | Yes | ChannelMemberReason |
joinedAt | timestamp|null | Yes | |
joinSeq | integer|null | Yes | seq of the member.joined starting current membership |
visibleFromSeq | integer|null | Yes | Secure visibility start (14) null in insecure channels and while needs_encryption |
visibleRanges | array<[integer, integer|null]> | No | Visibility ranges (§7.2) only in HTTP responses to the member itself and manage_channels holders; never in events |
version | integer | Yes | |
updatedAt | timestamp | Yes |
ChannelPin other
08 sec_pin AccountVault record, kind channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | sec_pin |
kind | string | Yes | channel |
host | string | Yes | Key with ctx |
ctx | string | Yes | |
address | string | Yes | |
previousAddresses | array<{address, replacedAt}> | Yes | entries >90 d MAY be dropped |
securedAt | timestamp | No | absent until seen; immutable |
upgradeSeq | integer|null | No | absent until seen in Channel or channel.security_changed |
version | integer | No | Channel version that set securedAt |
firstSeenAt | timestamp | Yes | |
lastSeenAt | timestamp | Yes | |
deletedSeenAt | timestamp|null | Yes |
ChannelTombstone other
data of 410 channel.deleted for at least 400 days.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | |
address | string | Yes | |
security | string | Yes | |
securedAt | timestamp|null | Yes | |
upgradeSeq | integer|null | Yes |
Community object
The community that every server is; named by its canonical domain; public via GET /v1/community.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Canonical domain lowercase A-label; immutable |
name | Text(64) | Yes | Name 1-64 after trimming, single line; equals ServerMetadata name |
description | Text(1000) | Yes | multi-line, may be empty |
icon | CommunityIcon|null | Yes | |
secure | boolean | Yes | never returns to false |
securedAt | timestamp|null | Yes | immutable once set |
joinPolicy | JoinPolicy | Yes | unknown -> treat as invite |
requireRulesAcceptance | boolean | Yes | default false |
rulesText | Text(8000) | Yes | multi-line plain text |
rulesVersion | integer | Yes | starts 0, +1 per rulesText change |
localAccountsAreMembers | boolean | Yes | D-068 toggle default true |
defaultChannel | string|null | Yes | ch: reference of a previewVisible channel |
memberCount | integer | Yes | active + needs_encryption MAY be approximate, updated at least every 5 min |
version | integer | Yes | +1 per change |
createdAt | timestamp | Yes | |
updatedAt | timestamp | Yes |
CommunityIcon object
Icon descriptor.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
url | string | Yes | absolute HTTPS under server base URL; changes when image changes |
sha256 | base64url | Yes | SHA-256 of image bytes; clients MUST verify after download |
mediaType | string | Yes | image/png|image/jpeg|image/webp |
width | integer | Yes | 16-1024, square |
height | integer | Yes | 16-1024, square |
CommunityListEntry object
Home server's record of one community in an account's sidebar list.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | canonical; entry key |
name | string | Yes | Cached ≤64 scalar values |
iconUrl | string|null | Yes | Cached |
secure | boolean | Yes | Cached informative only |
state | string | Yes | Cached active|pending|needs_encryption; unknown shown as active |
position | integer | Yes | from 0 |
local | boolean | Yes | true for home server's own community (server-maintained) |
addedAt | timestamp | Yes | |
updatedAt | timestamp | Yes |
CommunityMember object
An account's membership of the community.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | canonical |
name | string | Yes | Display name checked against addr |
kind | string | Yes | user|bot; unknown -> user layout, no badge |
inc | string | Yes | Account incarnation (D-086) never changes for a record |
local | boolean | Yes | |
accountSecurity | string | No | insecure|secure; only to the member itself and manage_channels/manage_community holders; never in events; unknown -> insecure |
state | CommunityMemberState | Yes | unknown -> left |
reason | string|null | Yes | null for active and pending; unknown -> no reason |
via | string | Yes | auto|open|invite|request; unknown shown as nothing |
requestedAt | timestamp|null | Yes | |
joinedAt | timestamp|null | Yes | |
rulesAcceptedVersion | integer|null | Yes | |
roles | array<uuidv7> | Yes | Role IDs (10) empty for non-members |
version | integer | Yes | |
updatedAt | timestamp | Yes |
CommunityPin other
sec_pin record, kind community; covers the whole server; never deleted.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | sec_pin |
kind | string | Yes | community |
host | string | Yes | Key |
ctx | null | Yes | |
securedAt | timestamp | No | |
version | integer | No | |
firstSeenAt | timestamp | Yes | |
lastSeenAt | timestamp | Yes | |
hidden | boolean | Yes | true after Leave on W9 |
GroupDmPin other
sec_pin record, kind group_dm.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | sec_pin |
kind | string | Yes | group_dm |
host | string | Yes | |
ctx | string | Yes | gdm: reference |
firstSeenAt | timestamp | Yes | |
lastSeenAt | timestamp | Yes | |
hidden | boolean | Yes |
Invite object
Community invite.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
code | string | Yes | 12-char canonical Crockford base32 |
channel | string|null | Yes | ch: reference or null (defaultChannel) |
createdBy | string | Yes | |
createdAt | timestamp | Yes | |
expiresAt | timestamp|null | Yes | |
maxUses | integer|null | Yes | 1-10000 or null |
uses | integer | Yes | |
state | InviteState | Yes | unknown -> not usable |
allowSignUp | boolean | Yes | default true |
uri | string | Yes | sloppyv URI per 01 §10.3 |
shareLink | string|null | Yes | from ServerMetadata links.join template |
InviteCode other
60 random bits encoded as 12 Crockford base32 chars; displayed XXXX-XXXX-XXXX; normalized per §8.2.
InvitePreview object
Unauthenticated invite preview.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
code | string | Yes | |
community | {domain, name, icon, secure, joinPolicy, requireRulesAcceptance, memberCount} | Yes | Public community data |
channel | {ctx, address, name, kind, security}|null | Yes | null when none or not previewVisible |
createdBy | {addr, name} | Yes | |
expiresAt | timestamp|null | Yes |
JoinCommunityResponse object
Response of POST /v1/community/join (200 or 202).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | CommunityMember | Yes | |
community | Community | Yes | |
openChannel | string|null | Yes | |
inviteIgnored | string|null | Yes |
JoinIntent other
Client device-local record to resume after G1/G2 (§9.6). Not a wire object: the spec lists what it holds but gives no member names, so the names below are descriptive only. Stored in device-local storage (not the AccountVault); at most one per target; expires after 24 h.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | string | Yes | What the interrupted action was aimed at community domain or ctx |
invite code | string | No | The invite code, if any |
accepted rules version | integer | No | The rules version the person accepted, if any |
action | JoinIntentAction | Yes | The interrupted action join_community|open_channel|join_call|upgrade_channel |
time | timestamp | Yes | When the intent was recorded expires after 24 h |
LayoutChange object
Body of PATCH /v1/community/layout. categories MUST list every category exactly once; channels MUST list every channel exactly once; order within each category (and among uncategorized channels) becomes position 0,1,2…; otherwise core.invalid_request and nothing changes. Needs manage_channels over every channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
categories | array<uuidv7> | Yes | New category order every category exactly once |
channels | array<{ctx, categoryId}> | Yes | New channel placement and order every channel exactly once; categoryId null for uncategorized |
MembershipCheckRequest object
S2S membership check request.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
onBehalfOf | string | Yes | canonical address |
onBehalfOfInc | string | Yes | |
addrs | array<string> | Yes | 1-20 |
MembershipCheckResponse object
200 response of POST /v1/community/membership-check: results in request order.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<MembershipCheckResult> | Yes | One result per requested address request order |
MembershipCheckResult object
One result element of the membership check response ({ results: [...] }).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | |
member | boolean | Yes | true exactly when active or needs_encryption |
state | string|null | Yes | active|needs_encryption or null; unknown -> null |
inc | string|null | Yes | Incarnation of the member's record |
PlanVersion other
base64url(SHA-256("sv1 upgrade plan" || 0x00 || scope || 0x00 || A_1 || 0x0A || … || A_n || 0x0A)[0..16]), 22 chars.
SecurityDowngradeSeenData other
data of the security_downgrade_seen diagnostic report (POST /v1/diagnostics, 15 §14.3).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
trigger | string | Yes | T1…T6; unknown stored as other |
host | string | Yes | |
pinned | object | Yes | securedAt, upgradeSeq, version as known |
observed | object | Yes | security/secure, securedAt, upgradeSeq, version, and for T2 the content seq |
ServerUpgradePlan object
Server upgrade dry-run result.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
scope | string | Yes | community |
domain | string | Yes | |
planVersion | string | Yes | |
insecureChannelCount | integer | Yes | |
localInsecureAccountCount | integer | Yes | |
localInsecureBotCount | integer | Yes | |
remoteInsecureMemberCount | integer | Yes | |
cannotFollow | array<{addr, name, kind, local, reason}> | Yes | ≤100 |
cannotFollowTruncated | boolean | Yes | |
secureBots | array<{addr, name}> | Yes | ≤100 |
secureBotsTruncated | boolean | Yes | |
insecureDmCount | integer | Yes | |
activeCallCount | integer | Yes | |
webhookCount | integer | Yes | |
historyMessageCount | integer | Yes | MAY be approximate |
UpgradePlan object
Channel upgrade dry-run result.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
scope | string | Yes | channel |
ctx | string | Yes | |
planVersion | string | Yes | 22-char base64url |
memberTotal | integer | Yes | active channel members |
cannotFollowCount | integer | Yes | |
cannotFollow | array<{addr, name, kind, reason}> | Yes | ≤100, by addr; reason insecure_account |
cannotFollowTruncated | boolean | Yes | |
secureBots | array<{addr, name}> | Yes | ≤100, by addr |
secureBotsTruncated | boolean | Yes | |
needsDeviceSetupCount | integer | Yes | informative |
historyMessageCount | integer | Yes | MAY be approximate |
activeCall | boolean | Yes | |
webhookCount | integer | Yes |
CannotFollowReason enum
| Value | Meaning |
|---|---|
insecure_account | default for unknown |
ChannelDeletedReason enum
| Value | Meaning |
|---|---|
deleted | |
lost_access | visibility change; doesn't set pin deletedSeenAt |
ChannelMemberReason enum
| Value | Meaning |
|---|---|
left | left |
community_left | left |
kicked | left |
banned | left |
lost_access | left |
account_deleted | left |
channel_upgraded | needs_encryption |
server_upgraded | needs_encryption |
account_downgraded | needs_encryption |
ChannelMemberState enum
| Value | Meaning |
|---|---|
active | |
needs_encryption | |
left | unknown values treated as left |
CommunityListEntryState enum
| Value | Meaning |
|---|---|
active | default for unknown |
pending | |
needs_encryption |
CommunityListOp enum
| Value | Meaning |
|---|---|
upsert | |
remove |
CommunityMemberReason enum
| Value | Meaning |
|---|---|
left | left by choice |
kicked | left |
account_deleted | left |
unbanned | left |
server_upgraded | needs_encryption |
account_downgraded | needs_encryption |
banned | banned |
CommunityMemberState enum
| Value | Meaning |
|---|---|
active | Full member |
pending | Requester awaiting approval |
needs_encryption | Insecure account in a secure community |
banned | Banned |
left | Left/kicked/deleted; unknown values treated as left |
IconMediaType enum
| Value | Meaning |
|---|---|
image/png | |
image/jpeg | |
image/webp |
InviteState enum
| Value | Meaning |
|---|---|
active | |
expired | |
used_up | |
revoked | unknown = not usable |
JoinIntentAction enum
| Value | Meaning |
|---|---|
join_community | |
open_channel | |
join_call | |
upgrade_channel |
JoinPolicy enum
| Value | Meaning |
|---|---|
open | Anyone passing security gates (default) |
invite | Valid invite required |
request | Requests wait pending for approval; 30-day expiry |
closed | Nobody new except D-068 local accounts; unknown values treated as invite |
MemberEventScope enum
| Value | Meaning |
|---|---|
channel | |
community |
MemberKind enum
| Value | Meaning |
|---|---|
user | default for unknown |
bot |
MemberRejectedReason enum
| Value | Meaning |
|---|---|
rejected | |
expired | 30 days passed |
closed | joinPolicy changed to closed, or server upgrade T4 |
MemberRemovedReason enum
| Value | Meaning |
|---|---|
kicked | |
banned | |
lost_access | |
account_deleted | |
community_left |
MemberVia enum
| Value | Meaning |
|---|---|
auto | D-068 |
open | |
invite | |
request |
PinKind enum
| Value | Meaning |
|---|---|
channel | |
community | |
group_dm | others ignored |
PreUpgradeHistory enum
| Value | Meaning |
|---|---|
kept | |
deleted |
SecurityChangedCause enum
| Value | Meaning |
|---|---|
channel_upgrade | |
server_upgrade |
Also described in 12 §16.1.
W9Trigger enum
| Value | Meaning |
|---|---|
T1 | current statement says insecure |
T2 | plaintext after upgradeSeq / insecure call |
T3 | securedAt/upgradeSeq differ from pin |
T4 | community secure:false or different securedAt |
T5 | channel insecure on secure server, or upgraded after server securedAt+300s |
T6 | pinned address resolves to different insecure ctx |
10 Roles, permissions, moderation and reports
AntiSpamPolicy object
The community's single anti-spam policy.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | integer | Yes | read-only |
newMember.enabled | boolean | No | default true |
newMember.durationMs | integer | No | default 600,000; 0–604,800,000; from join time |
newMember.restricted | array<Permission> | No | default [attach_files, mention_everyone, create_invites]; channel-scoped; not view_channel |
newAccount.enabled | boolean | No | default true; local accounts only |
newAccount.ageMs | integer | No | default 86,400,000 |
newAccount.maxNewDmsPerDay | integer | No | default 5; 0–100 |
slowMode | object | No | default {}; map ctx → interval ms 1,000–21,600,000 |
mentionLimit | integer | No | default 20; 1–50 |
floodTimeout.enabled | boolean | No | default true |
floodTimeout.durationMs | integer | No | default 600,000; 60,000–86,400,000 |
AuditLogEntry object
Immutable audit-log entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
seq | integer | Yes | strictly increasing per server from 1; order by seq, never id |
at | timestamp | Yes | |
actor | Actor | Yes | |
action | string | Yes | AuditAction; unknown → 'Other change' |
targetType | string | Yes | AuditTargetType; unknown → generic |
targetId | string|null | No | |
targetAddress | string|null | No | |
ctx | string|null | No | |
reason | string|null | No | |
changes | array<{field, before, after}> | No | |
count | integer | No | |
reportId | string|null | No | |
relatedId | string|null | No | |
restricted | boolean | Yes | admins-only entries |
Ban object
Ban of an address or domain, scope community or server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
targetType | string | Yes | address|domain; unknown shows as 'Other ban' |
address | string | No | when address; canonical when canonical=true |
domain | string | No | when domain; lowercase A-label |
canonical | boolean | Yes | false if target server couldn't be resolved |
scope | string | Yes | community|server; server only for address; unknown treated as server |
reason | string | No | 0–512 characters |
showReason | boolean | Yes | default false |
createdBy | Actor | Yes | |
createdAt | timestamp | Yes | |
expiresAt | timestamp|null | Yes | null = permanent; ≥ 1 h after createdAt |
reportId | uuidv7|null | No |
MemberRoles (unnamed in spec) object
Response of GET /v1/roles/members/{address}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
roleIds | array<uuidv7> | Yes | Ordinary and admin roles held position descending; everyone not listed |
top | integer | Yes | Top position |
permissions | array<Permission> | Yes | Effective community permissions |
channelPermissions | array<Permission> | No | Effective permissions in ctx only when ctx given |
timeoutUntil | timestamp|null | No | Timeout end only to the member themself or holders of timeout_members |
ModerationStatus (unnamed in spec) object
Response of GET /v1/moderation/members/{address}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
timeout | Timeout|null | No | Active timeout needs timeout_members |
serverMute | ServerMute|null | No | Active server mute needs mute_members |
ban | Ban|null | No | Active ban needs ban_members |
openReports | integer | No | Open reports needs manage_reports; only reports the caller can see, never about the caller |
joinedAt | timestamp | Yes | Join time |
PermissionOverwrite object
Per-channel allow/deny of channel-scoped permissions for one role or one member.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | ch:… only (no DMs) |
targetType | string | Yes | role|member; unknown → ignore overwrite |
roleId | uuidv7 | No | when targetType role; never the admin role |
address | string | No | when targetType member; canonical |
allow | array<Permission> | Yes | channel-scoped only; may be empty |
deny | array<Permission> | Yes | channel-scoped only; may be empty; disjoint from allow |
updatedAt | timestamp | Yes | responses |
updatedBy | string | Yes | responses; canonical address of last actor |
Report object
Moderator view of a report.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
origin | string | Yes | local|forwarded|reporter_home; unknown → local |
originServer | string|null | Yes | forwarded only |
originReportId | string|null | Yes | forwarded only |
host | string | Yes | hosting server canonical domain |
ctx | string|null | Yes | |
requestId | string|null | Yes | reporter_home message-request reports |
kind | string | Yes | messages|member; unknown → member |
category | string | Yes | ReportCategory; unknown → other |
target | string | Yes | canonical address |
did | string | No | kind member + impersonation only |
reporter | string | No | moderator view, local and reporter_home only; never in forwarded |
note | string | No | 0–1,000 Unicode scalar values; never forwarded |
routing | string | Yes | moderators|admins |
includeContext | boolean | Yes | |
allowForward | boolean | Yes | |
items | array<ReportItem> | Yes | empty for member |
verification | string | Yes | verified|partial|failed|not_applicable; unknown → failed |
status | string | Yes | ReportStatus |
resolution | string|null | Yes | null unless resolved |
resolutionNote | string|null | No | 0–2,000 characters; never shown to reporter/target or forwarded |
assignee | string|null | No | |
actions | array<uuidv7> | Yes | audit entry IDs |
preserveEvidence | boolean | Yes | default false |
forwardedTo | array<string> | Yes | |
version | integer | Yes | |
createdAt | timestamp | Yes | |
updatedAt | timestamp | Yes | |
resolvedAt | timestamp|null | Yes | |
resolvedBy | string|null | Yes |
ReporterView object
Subset of Report shown to its reporter.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | |
ctx | string|null | Yes | |
kind | string | Yes | |
category | string | Yes | |
status | string | Yes | |
outcome | string|null | Yes | null until resolved; action_taken|reviewed |
createdAt | timestamp | Yes | |
updatedAt | timestamp | Yes |
ReportForwardedPayload object
Payload d of the report.forwarded S2S event.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reportId | uuidv7 | Yes | ID at origin |
origin | string | Yes | MUST equal S2S token iss |
host | string | Yes | equals origin for local; differs for reporter_home |
ctx | string | Yes | |
security | string | Yes | insecure|secure |
kind | string | Yes | always messages |
category | string | Yes | |
target | string | Yes | domain MUST be receiver's canonical domain |
targetInc | string|null | Yes | target incarnation as recorded by origin |
items | array<ReportItem> | Yes | reported items only, seq order; attachments by reference (attachmentId, fileKey, size); truncated items lack sealed/kMsg/credential/content |
hostVerification | string | Yes | origin's verification summary |
forwardedAt | timestamp | Yes |
ReportItem object
One message in a report, with evidence and verification result.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | |
role | string | Yes | reported|context; unknown → context |
kind | string | Yes | message|edit|reaction; unknown → message |
ref | string|null | Yes | for edit/reaction: target mid |
seq | integer|null | Yes | |
author | string | Yes | |
did | string | No | sealed items |
sentAt | timestamp|null | Yes | |
content | object | No | only for verified/plaintext, subject to §10.5 |
sealed | SealedMessage | No | sealed items, subject to §10.5 |
kMsg | base64url | No | 32 bytes; sealed items, subject to §10.5 |
credential | object | No | {idc: IdentityCertificate JWS, devcert: DeviceCertificate JWS}; reporter_home and forwarded sealed items |
attachments | array<{attachmentId, fileKey?, size, available, result}> | No | fileKey sealed only, subject to §10.5 |
itemVerification | object | Yes | {result: ItemVerificationResult} |
evidenceSource | string | Yes | server|reporter|origin; unknown → reporter |
truncated | boolean | No | default false; forwarded item without evidence |
withheld | string|null | No | security.account_required|security.device_not_enrolled |
ReportRequest (inline) object
Body of POST /v1/reports.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string|null | Yes | Context, or null for a member report outside any context |
host | string | No | Canonical domain of the hosting server For §10.10 reports; hosting server ignores it |
requestId | string | No | Message request ID (12) For a message-request report |
kind | enum ReportKind | Yes | messages or member |
category | enum ReportCategory | Yes | Category unknown values rejected with core.invalid_request |
target | string | No | Canonical address For member reports and §10.10 reports; else taken from items |
did | string | No | Unknown device ID Only kind member + category impersonation |
note | string | No | Reporter's note 0–1,000 Unicode scalar values |
routing | enum ReportRouting | No | admins = server admins only default moderators |
includeContext | boolean | No | Surrounding messages included default true |
allowForward | boolean | No | Allow forwarding to target's home server default true |
items | array<ReportItemRequest> | No | Items: {mid, role, kMsg?, sealed?, credential? (§10.10 only), attachments?: [{attachmentId, fileKey?}]} Required for messages; 1 to maxReportItems reported, ≤10 context before and ≤10 after |
Role object
A community role.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | server-generated |
name | string | Yes | Clients display localized name for system roles 1–40 Unicode scalar values after NFC; no Cc/Cf (except ZWJ), no line breaks, no leading/trailing white space; unique after case folding+NFC; ordinary role's UTS #39 skeleton must not equal admin/administrator/everyone or localized system-role names |
system | string|null | Yes | everyone|admin|null; unknown → treat as null for display, never offer delete |
position | integer | Yes | 0 to maxRoles−1; unique; everyone 0, admin highest; ordinary 1..n−2 no gaps |
permissions | array<Permission> | Yes | for admin the server returns the full registry |
color | string|null | No | #rrggbb lowercase or null |
showSeparately | boolean | No | default false |
memberCount | integer | Yes | responses; for everyone: number of active members |
version | integer | Yes | responses; starts 1, increases on every change incl. renumbering |
createdAt | timestamp | Yes | responses |
updatedAt | timestamp | Yes | responses |
ServerMute object
Community-wide audio mute, keyed by (member, inc); no own ID.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | string | Yes | canonical address |
until | timestamp|null | Yes | null = until lifted |
reason | string | No | returned only to mute_members holders, and target if showReason |
showReason | boolean | No | |
reportId | uuidv7|null | No | |
createdBy | Actor | Yes | |
createdAt | timestamp | Yes |
Timeout object
A member's single timeout, keyed by (member, inc); no own ID.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | string | Yes | canonical address |
until | timestamp | Yes | |
reason | string | No | visible only to timeout_members holders, and target if showReason |
showReason | boolean | Yes | default false |
createdBy | Actor | Yes | member or system; never shown to target |
createdAt | timestamp | Yes | |
reportId | uuidv7|null | No |
ActorKind enum
| Value | Meaning |
|---|---|
member | a member |
system | automatic action (expiry, anti-spam) |
operator | outside the protocol (21) |
AuditAction enum
| Value | Meaning |
|---|---|
role_created | 10 |
role_updated | 10 |
role_deleted | 10 |
roles_reordered | 10 |
role_granted | 10; includes step-down and operator admin removal |
role_removed | 10 |
overwrite_set | 10 |
overwrite_removed | 10 |
messages_deleted | 10; with count and relatedId for kick/ban deletions |
member_kicked | 10 |
member_banned | 10 |
domain_banned | 10 |
ban_updated | 10 |
ban_lifted | 10 |
ban_expired | 10 |
member_timed_out | 10 |
timeout_lifted | 10 |
timeout_expired | 10 |
member_muted | 10/15; server mute ctx null, Mute for everyone ctx = voice channel |
mute_lifted | 10/15 |
mute_expired | 10/15 |
report_updated | 10 |
report_forwarded | 10; restricted |
report_evidence_preserved | 10; restricted |
policy_updated | 10 |
community_updated | 09 |
community_secured | 09 |
channel_created | 09 |
channel_updated | 09 |
channel_deleted | 09 |
channel_secured | 09 |
channel_history_deleted | 09 |
invite_revoked | 09 |
bot_admitted | 09 |
history_shared | 14; targetType history_share |
federation_blocked | 06 |
federation_unblocked | 06 |
address_assigned | 01; operator; restricted |
address_released | 01; operator; restricted |
server_key_incident | 21; operator; restricted |
AuditTargetType enum
| Value | Meaning |
|---|---|
member | |
domain | |
role | |
overwrite | |
message | |
ban | |
timeout | |
mute | |
report | |
channel | |
invite | |
community | |
policy | |
bot | |
history_share | |
server |
BanScope enum
| Value | Meaning |
|---|---|
community | ban_members; membership, channels, calls, invites, joins |
server | admins only; address only; plus DMs, remote sessions, dm.request, local account suspended |
BanTargetType enum
| Value | Meaning |
|---|---|
address | |
domain | community scope only |
EvidenceSource enum
| Value | Meaning |
|---|---|
server | stored copy of the server holding the report |
reporter | reporter-supplied SealedMessage copy accepted |
origin | from the forwarding server |
ForwardedSecurity enum
| Value | Meaning |
|---|---|
insecure | |
secure |
ItemVerificationResult (14 §13.5) enum
| Value | Meaning |
|---|---|
verified | |
plaintext | |
not_found | |
credential_invalid | |
bad_signature | |
bad_key | |
decrypt_failed | |
bad_content | |
not_referenced |
MlsRemovalReason (13's, triggered here) enum
| Value | Meaning |
|---|---|
kicked | kick |
banned | ban |
participant_removed | group DMs under server-scope ban |
lost_access | loss of view_channel |
ModerationAction enum
| Value | Meaning |
|---|---|
kick | |
ban | |
timeout | |
server_mute | |
restriction | not further defined |
NotForwardableReason enum
| Value | Meaning |
|---|---|
not_allowed | reporter didn't allow |
same_server | |
nothing_verified | |
already_forwarded | |
not_forwardable_kind |
OverwriteTargetType enum
| Value | Meaning |
|---|---|
role | |
member |
Permission enum
| Value | Meaning |
|---|---|
view_channel | channel; default in everyone. See channel, read timeline/history, receive events, join MLS group, listen to call. Without it all other channel permissions void. |
send_messages | channel; default. Post messages, replies, edit own. |
add_reactions | channel; default. Add reactions (removing own always allowed). |
attach_files | channel; default. Upload attachments. |
mention_everyone | channel; not default. Make mentionAll notify; without it mentionAll is recorded false, never refused. |
speak_and_share | channel; default. Mic audio, screen video/sound, webcam in voice calls. |
mute_members | channel; not default. Mute for everyone (15 §3.6); at community level server mutes; speak_and_share-only member overwrites. |
manage_messages | channel; not default. Delete others' messages and remove others' reactions. |
create_invites | channel; default. Create invites landing in this channel. |
manage_channels | channel; not default. Community level: create channels; channel: edit, delete, upgrade to secure. |
manage_roles | channel; not default. Community level: manage roles below top position; channel: edit overwrites. |
share_history | channel; not default. Manual history sharing in secure channels; bots never share. |
kick_members | community. Kick. |
ban_members | community. Community-scope bans. |
timeout_members | community. Timeouts. |
manage_invites | community. List/revoke all invites, allowSignUp:false invites, approve join requests, never-expiring invites. |
manage_community | community. Community settings and anti-spam policy; not the server upgrade. |
manage_bots | community. Manage bot accounts homed here; admit bots; change bots' roles. |
manage_reports | community. Work the report queue. |
view_audit_log | community. Read the audit log. |
PermissionScope enum
| Value | Meaning |
|---|---|
channel | rows 1–12; overwritable |
community | rows 13–20; never in overwrites |
ReportCategory enum
| Value | Meaning |
|---|---|
spam | Spam |
harassment | Harassment or bullying |
hate | Hate |
violence | Violence or threats |
sexual_content | Sexual content |
child_safety | A child is at risk; always visible to admins |
self_harm | Self-harm |
illegal | Something illegal; always visible to admins |
impersonation | Pretending to be someone |
other | Something else |
ReportItemKind enum
| Value | Meaning |
|---|---|
message | |
edit | |
reaction |
ReportItemRole enum
| Value | Meaning |
|---|---|
reported | |
context | never forwarded |
ReportKind enum
| Value | Meaning |
|---|---|
messages | one or more reported messages |
member | a person's behaviour, no message |
ReportOrigin enum
| Value | Meaning |
|---|---|
local | filed at hosting server |
forwarded | received via report.forwarded |
reporter_home | filed at reporter's home server (§10.10) |
ReportOutcome enum
| Value | Meaning |
|---|---|
action_taken | resolution action_taken |
reviewed | any other resolution |
ReportResolution enum
| Value | Meaning |
|---|---|
action_taken | |
no_action | |
invalid | content not as reported or verification failed |
duplicate | |
expired | 365 days old |
ReportRouting enum
| Value | Meaning |
|---|---|
moderators | default |
admins | server admins only |
ReportStatus enum
| Value | Meaning |
|---|---|
open | |
in_review | claimed; assignee set |
resolved | |
withdrawn | final |
ReportVerification enum
| Value | Meaning |
|---|---|
verified | every reported item verified or plaintext |
partial | some |
failed | none |
not_applicable | member report |
SystemRole enum
| Value | Meaning |
|---|---|
everyone | position 0, implicit |
admin | highest position; every permission |
null | ordinary role |
WithheldReason enum
| Value | Meaning |
|---|---|
security.account_required | insecure account |
security.device_not_enrolled | unenrolled device |
11 Messages, attachments, read state and presence
Attachment object
Server-side record of an uploaded blob.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Attachment ID. server-generated |
ctx | string | Yes | Context uploaded to. can be bound only to an entry in this context |
purpose | AttachmentPurpose | Yes | Purpose. file or thumbnail; always file in secure contexts; unknown treated as file |
state | AttachmentState | Yes | pending, uploaded, bound or deleted. unknown treated as deleted |
blobBytes | integer | Yes | Exact blob size. |
mime | string | Yes | Declared media type. secure: always application/octet-stream |
sha256 | base64url | Yes | SHA-256 of the blob bytes. |
uploader | string (canonical address) | Yes | Uploading account. |
createdAt | timestamp | Yes | When the upload was created. |
expiresAt | timestamp|null | Yes | Expiry if not bound. createdAt + 24 h while pending/uploaded; otherwise null |
mid | uuidv7|null | Yes | Root message it is bound to. set when bound |
AttachmentBlob binary-frame
The stored bytes: the file itself (insecure) or its SVF1 ciphertext (secure; 43-byte header then segments, padded by SVF1, 04 §10).
AttachmentCreateRequest object
POST …/attachments body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
purpose | AttachmentPurpose | No | file or thumbnail. default file; MUST be file in a secure context (thumbnail refused 400 core.invalid_request) |
blobBytes | integer | Yes | Size of the blob to upload. limits of §14.6 |
mime | string | Yes | Media type. secure: MUST be application/octet-stream |
sha256 | base64url | Yes | SHA-256 of the blob bytes. |
AttachmentCreateResponse object
201 response to upload creation.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
attachment | Attachment | Yes | The new object. state pending |
upload | UploadInstructions | Yes | Where and how to send the bytes. |
AttachmentRef object
Describes one uploaded file inside a content object; carries the file key in secure contexts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Uploaded file. Attachment ID returned by upload (§14.2); all ids in one content object distinct |
name | string | Yes | File name for display and saving. 1 to MAX_FILENAME_BYTES (255) bytes UTF-8; no '/', '', U+0000-U+001F or U+007F |
mime | string | Yes | Media type. RFC 6838 type/subtype, lowercase, no parameters; application/octet-stream if unknown |
size | integer | Yes | File size. 1 to maxAttachmentBytes; bytes before encryption; 0-byte files not supported |
sha256 | base64url | No | SHA-256 of the file before encryption. Insecure: optional. Secure: required |
key | base64url | No | File key. Secure: required (32-byte K_file, 04 §10.2). Insecure: MUST be absent |
width | integer | No | Pixel width (images, video). 1-65,535 |
height | integer | No | Pixel height (images, video). 1-65,535 |
durationMs | integer | No | Duration for audio and video. |
thumb | ThumbnailRef | No | Preview image (§14.3). |
spoiler | boolean | No | Show preview blurred until tapped. default false |
voice | boolean | No | Recorded voice message; clients show a player. default false |
ContentWithheldMessage object
Only inside a dm.request to a secure home server for an insecure DM: a plain Message object without content, with "contentWithheld": true. Never on the timeline API or client WebSocket.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
contentWithheld | boolean | Yes | Content omitted until Accept. true |
DeleteContent object
Deletes the author's own root message or reaction entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Entry to delete. mid of a root message or a reaction entry |
DeleteEvent object
Payload of message.deleted.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Deleted root message. |
by | DeletedBy | Yes | author or moderator. unknown treated as moderator |
mid | uuidv7 | No | Delete entry's mid. when by is author |
deletedAt | timestamp | Yes | When. |
Deletion object
How a root message was deleted.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
at | timestamp | Yes | When it was deleted. |
by | DeletedBy | Yes | Who deleted it. author or moderator; unknown treated as moderator |
EditContent object
Complete self-contained replacement of a root message's content.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Message being edited. mid of the root message (never an earlier edit) |
text | string | Yes | Complete new text. rules of §3.2 and §3.3; may be empty only if attachments non-empty |
mentions | array<string> | No | As in MessageContent, for the new text. default [] |
mentionAll | boolean | No | As in MessageContent, for the new text. default false |
replyTo | ReplyRef|null | No | Copy of the root's replyTo (an edit never changes it). default null; MUST equal the root's replyTo member by member |
attachments | array<AttachmentRef> | No | Attachments that remain. default []; each MUST be one of the target's current attachments with identical members; can remove, never add |
EditEntry object
Latest edit of a sealed root message (plain edits are applied to content).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | Edit entry mid. |
seq | integer | Yes | Its seq. |
sender | Sender | Yes | Editing account and device. same account as root; did may differ |
createdAt | timestamp | Yes | Server timestamp. |
sealed | SealedMessage | Yes | The edit ciphertext. kind edit, ref = root mid; plaintext is EditContent |
mentions | array<string> | Yes | Edit's server-validated hint. |
mentionAll | boolean | Yes | Edit's server-validated mentionAll. |
attachmentIds | array<uuidv7> | No | IDs still bound after this edit. when the root had bound attachments |
EditEvent object
Payload of message.edited.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Edited root message. |
mid | uuidv7 | Yes | Edit entry mid. |
carrier | CarrierType | Yes | plain or sealed. |
sender | Sender | Yes | Editing account and device. |
createdAt | timestamp | Yes | Edit's server timestamp (new editedAt). |
content | EditContent | No | The edit. plain |
sealed | SealedMessage | No | The edit. sealed |
mentions | array<string> | No | Edit's validated hint. sealed |
mentionAll | boolean | Yes | Edit's validated mentionAll. |
attachmentIds | array<uuidv7> | No | Remaining IDs. sealed, when target had bound attachments |
EntryAck object
201 response to a posted entry (also returned for idempotent resends).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | The entry's mid. |
kind | EntryKind | Yes | The entry's kind. |
seq | integer | Yes | seq assigned. |
createdAt | timestamp | Yes | Server timestamp. non-decreasing in seq within a context |
MentionToken other
In-text token grammar: <@addr> user mention, <#addr> channel reference, <@everyone>; addr must be canonical; inside code is literal.
Message object
Folded current view of one root message (or tombstone); members keyed on the entry's carrier type.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | No | Item type discriminator. "message"; present in timeline pages only |
mid | uuidv7 | Yes | Root message mid. |
ctx | string | No | Context reference. required in HTTP; omitted in events |
seq | integer | No | seq at which the root was accepted. required in HTTP; omitted in events |
carrier | CarrierType | Yes | Carrier type of the root message. plain or sealed; unknown treated as sealed (placeholder) |
sender | Sender | Yes | Who sent it. |
createdAt | timestamp | Yes | Server timestamp of acceptance. |
content | MessageContent | No | Current content (root or latest edit). plain and not deleted |
sealed | SealedMessage | No | Root SealedMessage as posted; absent once edited. sealed, not deleted, not edited |
edit | EditEntry|null | No | Latest edit (self-contained) or null. sealed only |
mentions | array<string> | No | Server-validated mention hint of the root. sealed only |
mentionAll | boolean | Yes | Server-validated mentionAll: true only if asked for and permitted. |
attachmentIds | array<uuidv7> | No | IDs currently bound (root's or latest edit's). sealed, when any are bound |
editedAt | timestamp|null | Yes | Time of latest edit or null. |
deleted | Deletion|null | Yes | null or how it was deleted. |
reactions | array<ReactionSummary> | No | Aggregated plain reactions. required unless deleted; may be empty |
reactionEntries | array<ReactionEntry> | No | Inlined sealed reaction entries. when there are sealed reaction entries; up to INLINE_REACTION_ENTRIES (100), oldest first |
reactionEntryCount | integer | No | Total sealed reaction entries; fetch rest via §7.3 if larger than inlined. with reactionEntries |
updatedSeq | integer | Yes | seq of latest entry that changed this message (creation, edit, reaction add/remove, deletion). |
MessageContent object
Content object of a root message; sent as content (insecure) or as SealedMessage plaintext (secure).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
text | string | Yes | Message text. SV-Markdown (§3.3); at most MAX_TEXT_CHARS (4,000) Unicode scalar values; may be empty (or whitespace-only) only if attachments non-empty; no U+0000-U+001F except TAB/LF, no U+007F/U+2028/U+2029; CR LF and lone CR converted to LF |
mentions | array<string> | No | Users mentioned by name. default []; canonical addresses; no duplicates; at most MAX_MENTIONS (50); must equal set of user-mention tokens outside code |
mentionAll | boolean | No | Asks to notify everyone; effect decided by server (§4.4). default false; true iff text contains <@everyone> token |
replyTo | ReplyRef|null | No | Root message replied to (§3.5). default null |
attachments | array<AttachmentRef> | No | Attached files (§3.6). default []; at most MAX_ATTACHMENTS (10) |
Also described in 00 §7.4.
MessagePage object
Timeline page response with coverage, visibility ranges, grants and purge watermark.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<Message|SystemItem> | Yes | Visible timeline items, including tombstones, excluding expired/purged. ascending seq (ascending updatedSeq for changedAfter); every item has type |
hasMore | boolean | Yes | before/newest: older exist; after/changedAfter: newer exist; around: hasMoreBefore or hasMoreAfter. |
hasMoreBefore | boolean | No | Older items exist. only for around |
hasMoreAfter | boolean | No | Newer items exist. only for around |
headSeq | integer | Yes | Context's latest seq (any durable event) when read. |
ranges | array<[integer, integer|null]> | Yes | seq ranges the caller may read. ascending, merged; null end = open; [] if none |
grants | array<[integer, integer]> | Yes | seq ranges of caller's VisibilityGrants (14); only sealed items served inside. ascending, merged; [] if none; always [] in insecure contexts |
withheldBeforeSeq | integer|null | Yes | visibleFromSeq when earlier content items exist that aren't served; client shows K6 there. secure only; null otherwise |
purgedThroughSeq | integer | Yes | Every root message with seq <= this has been purged. 0 if none |
Mid other
Client-generated lowercase hyphenated UUIDv7; 16-byte binary form = 32 hex digits decoded big-endian.
OutboxItem other
Client-local persistent queue record (not on the wire).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | Entry id. generated at creation; never changes |
ctx | string | Yes | Destination context. |
server | string | Yes | Destination hosting server. |
kind | EntryKind | Yes | As in PostEntry. |
target | uuidv7 | No | As in PostEntry. |
content | object | Yes | Content. plaintext content object |
composedMode | string | Yes | Context mode when the user created the entry. insecure or secure |
lastBody | PostEntry | No | Exact PostEntry last sent. |
attempted | boolean | Yes | Whether any request with unknown/failed-in-transit outcome was sent. |
queuedAt | timestamp | Yes | When the user created it. |
state | OutboxState | Yes | §13.3. |
lastError | object (problem) | No | Last problem object received. |
OwnPresence object
GET/PUT /v1/me/presence response: own chosen status and session idle flag.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
status | ChosenStatus | Yes | Chosen status. default online for a new account |
statusText | string|null | Yes | Custom status. at most MAX_STATUS_CHARS (128) Unicode scalar values, no line breaks |
statusEmoji | string|null | Yes | Status emoji. one emoji, as reaction keys |
clearAt | timestamp|null | Yes | When server clears statusText and statusEmoji. |
idle | boolean | Yes | Calling session's idle flag. |
effective | EffectiveStatus | Yes | Effective status others see on this server. |
updatedAt | timestamp | Yes | When account-level members last changed. |
OwnPresenceUpdate object
PUT /v1/me/presence body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
status | ChosenStatus | No | Chosen status. absent: unchanged; if any of status/statusText/statusEmoji/clearAt present, all four MUST be present |
statusText | string|null | No | Custom status. absent: unchanged; null clears |
statusEmoji | string|null | No | Status emoji. absent: unchanged; null clears |
clearAt | timestamp|null | No | Auto-clear time. absent: unchanged; null = no auto clear; otherwise future time at most 30 days ahead |
idle | boolean | No | Session idle flag. absent: unchanged; sets only the calling session's flag |
PostEntry object
Request body (carrier) for POST /v1/contexts/{ctx}/messages; exactly one of content or sealed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | Idempotency key; bound into K_msg in secure contexts. client-generated; grammar §2.4; never checked against server clock |
kind | EntryKind | No | Entry kind. default message; one of message, edit, reaction, delete |
target | uuidv7 | No | Target mid, in cleartext. required for edit, reaction, delete; absent for message; in a secure carrier MUST equal sealed.ref |
content | MessageContent|EditContent|ReactionContent|DeleteContent | No | Content object for kind. insecure carrier: required; secure: MUST be absent |
sealed | SealedMessage | No | SealedMessage (14) whose padded plaintext is the content object. secure carrier: required; insecure: MUST be absent |
mentions | array<string> | No | Mention hint (D-063): content mentions plus reply author when ping true (unless sender). secure message/edit only, otherwise absent; at most 50; [] when user turned mention_hints off |
mentionAll | boolean | No | Mention hint: equals content mentionAll. secure message/edit only, otherwise absent; always truthful |
attachmentIds | array<uuidv7> | No | IDs of every attachment and thumbnail the encrypted content references. secure message: required when content has attachments; secure edit: required when target has bound attachments ([] removes all), must be subset of target's bound IDs; otherwise absent |
Presence object
What others see (effective status); never reveals invisible, idle flags, device counts or last-seen.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string (canonical address) | Yes | Canonical address. |
name | string | Yes | Display name (01). |
status | EffectiveStatus | Yes | Effective status. online, idle, dnd or offline; unknown treated as online |
statusText | string|null | Yes | Custom status. null whenever status is offline |
statusEmoji | string|null | Yes | Status emoji. null whenever status is offline |
updatedAt | timestamp | Yes | When this presence last changed. |
PresenceSnapshot object
Payload of presence.snapshot sent after subscribing to a context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<Presence> | Yes | Snapshot. non-offline accounts with access to the context; at most PRESENCE_SNAPSHOT_MAX (1,000); no order |
truncated | boolean | Yes | true if more existed. |
PurgeEvent object
Payload of message.purged (prefix purge watermark).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
throughSeq | integer | Yes | Every root message with seq <= throughSeq and everything attached is gone. |
reason | PurgeReason | Yes | Why. retention, pre_upgrade_deleted or admin; unknown treated as admin |
ReactionContent object
Adds one emoji reaction to a root message.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Message reacted to. mid of a root message |
key | string | Yes | The reaction emoji. exactly one extended grapheme cluster matching UTS #51 possible_emoji; at most MAX_REACTION_KEY_BYTES (64) bytes UTF-8; compared after removing U+FE0F |
ReactionEntry object
One reaction entry (both modes); payload of reaction.added and items of the reactions collection.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | Reaction entry mid; removing the reaction = deleting this mid. |
target | uuidv7 | Yes | Root message mid. |
seq | integer | No | Its seq. required in HTTP; omitted in events |
carrier | CarrierType | Yes | plain or sealed. |
sender | Sender | Yes | Who reacted. |
createdAt | timestamp | Yes | Server timestamp. |
key | string | No | Reaction key. plain only |
sealed | SealedMessage | No | Encrypted reaction. sealed only; kind reaction, ref = root mid; plaintext ReactionContent |
ReactionRemovedEvent object
Payload of reaction.removed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | uuidv7 | Yes | Removed reaction entry's mid. |
message | uuidv7 | Yes | Root message it was on. |
by | DeletedBy | Yes | author or moderator. unknown treated as moderator |
mid | uuidv7 | No | Delete entry's mid. when by is author |
ReactionSummary object
Aggregate of plain reaction entries per distinct key, ordered by seq of first reaction.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
key | string | Yes | Reaction key as first sent. |
count | integer | Yes | Number of accounts with a live reaction entry with this key. keys compared after removing U+FE0F |
me | boolean | No | Whether the requesting account is among them. present only in HTTP responses |
ReadState object
Per-account, per-context read position plus unread/mention counts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The context. |
readSeq | integer | Yes | Everything with seq <= readSeq counts as read. >= 0; 0 = nothing read |
updatedAt | timestamp|null | Yes | When readSeq last changed. |
headSeq | integer | Yes | Context's latest seq. |
lastMessageSeq | integer | Yes | seq of newest visible non-deleted root message. 0 if none; grant-only items don't count |
unreadCount | integer | Yes | Visible non-deleted root messages with seq > readSeq. 0-1,000 (capped); excludes own messages and grant-only items |
unreadCapped | boolean | Yes | true if true count exceeds 1,000 (clients show '999+'). |
mentionCount | integer | Yes | Unread messages mentioning this account (mentions, validated mentionAll, reply ping). 0-1,000; from hints in secure contexts |
ReadStateUpdate object
PUT …/read body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
readSeq | integer | Yes | New read position. >= 0; values above headSeq lowered to headSeq |
markUnread | boolean | No | false: stored = max(old, readSeq); true: stored = readSeq even if lower. default false |
ReducedPayload object
{"withheld": true} (optionally with target on replay of edited/reaction events); envelope keeps t, ctx, seq, id, ts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
withheld | boolean | Yes | Payload withheld; advance position past the event and do nothing else. always true |
target | uuidv7 | No | The event's target. only on replayed message.edited / reaction.added whose content was since deleted |
ReplyRef object
Reference to the root message being replied to (one level, no threads).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | Yes | mid of the root message replied to. must be a root message in the same context |
author | string (canonical address) | Yes | Sender of the parent, so the client can show 'Replying to Bob' before loading the original. canonical address (D-032) |
ping | boolean | No | Whether the reply notifies author. default true |
Sender object
Server-filled sender of a stored entry, taken from the session; webhook senders have no addr/did.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string (canonical address) | No | Canonical address of the sending account. required except for webhooks |
name | string | Yes | Display name at time of production. display name (01) or webhook name; prepared local part if name failed 01 §6.4 |
did | string | No | Device ID of the sending device. required except for webhooks |
kind | SenderKind | No | user, bot or webhook. default user; unknown treated as bot |
webhook | uuidv7 | No | Webhook ID. only when kind is webhook |
SystemItem object
Timeline item owned by another document, carried in the form of its event.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | Yes | Item type discriminator. "event" |
seq | integer | Yes | Event's seq. |
t | string | Yes | e.g. channel.security_changed, member.joined. event type as owner registered it |
ts | timestamp | Yes | Event's ts. |
d | object | Yes | Event payload as its owner defines it for this viewer. |
ThumbnailRef object
Preview image of an attachment, itself a separate upload.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Thumbnail upload ID. Attachment ID of the thumbnail upload; purpose thumbnail (insecure) or file (secure) |
mime | string | Yes | Thumbnail media type. image/webp, image/jpeg or image/png |
size | integer | Yes | Thumbnail size. bytes before encryption; at most THUMB_MAX_BYTES (256 KiB) |
width | integer | Yes | Pixel width. at most THUMB_MAX_PX (512) on the longer side |
height | integer | Yes | Pixel height. at most THUMB_MAX_PX (512) on the longer side |
sha256 | base64url | No | Integrity hash of the thumbnail plaintext. Insecure: optional. Secure: required. SHA-256 of thumbnail file before encryption |
key | base64url | No | The thumbnail's own SVF1 file key. Secure: required (32 bytes). Insecure: MUST be absent |
Tombstone object
A Message object with deleted set, mentionAll false, editedAt null, and content, sealed, mentions, attachmentIds, edit, reactions, reactionEntries, reactionEntryCount absent. Kept at least TOMBSTONE_MIN (30 days).
TypingEvent object
Payload of typing.started / typing.stopped.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sender | Sender | Yes | Typing account. did is the typing device |
expiresInMs | integer | No | How long to show it. only on typing.started: 8,000 |
TypingRequest object
POST …/typing body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
typing | boolean | Yes | true: typing; false: stopped without sending. |
UploadInstructions object
The upload member: URL, method, headers and deadline for the blob PUT.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
url | string (https URL) | Yes | Where to PUT the bytes. {base}/v1/contexts/{ctx}/attachments/{id}/content or a pre-signed object-store URL (capability URL, >=128 bits randomness) |
method | string | Yes | HTTP method. always PUT |
headers | object<string,string> | Yes | Headers to send with the PUT. may be empty; client MUST send unchanged |
expiresAt | timestamp | Yes | Latest time the PUT may start. at most UPLOAD_URL_TTL (10 min) after creation |
Webhook object
Incoming webhook for one insecure channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Webhook ID. server-generated |
ctx | string | Yes | The channel. |
name | string | Yes | Shown as sender name. 1-80 Unicode scalar values; no '@', '<', '>', control characters or line breaks |
state | WebhookState | Yes | active or disabled. unknown treated as disabled |
disabledReason | string|null | Yes | Why disabled. admin, secure_context, or null when active |
allowMentionAll | boolean | Yes | Whether messages may use <@everyone>. default false |
createdBy | string (canonical address) | Yes | Creator. |
createdAt | timestamp | Yes | Creation time. |
lastUsedAt | timestamp|null | Yes | Last accepted execution. |
token | string | No | Bearer secret for execution. only in create and rotate responses; 'whk_' + base64url of 32 random bytes; server stores only a hash |
WebhookCreateRequest object
POST …/webhooks body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Name. as Webhook.name |
allowMentionAll | boolean | No | Allow <@everyone>. default false |
WebhookExecuteRequest object
POST …/webhooks/{id}/messages body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | uuidv7 | No | Idempotency key. if absent the server generates one and the request isn't idempotent |
content | MessageContent | Yes | Message content. only text, mentions, mentionAll; replyTo and attachments MUST be absent or empty |
WebhookPatchRequest object
PATCH …/webhooks/{id} body.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | New name. |
state | WebhookState | No | Enable or disable. state disabled sets disabledReason admin; can't enable when disabledReason is secure_context |
allowMentionAll | boolean | No | Allow <@everyone>. |
AttachmentPurpose enum
| Value | Meaning |
|---|---|
file | A file (always in secure contexts; unknown treated as file) |
thumbnail | Insecure thumbnail upload |
AttachmentState enum
| Value | Meaning |
|---|---|
pending | Created, bytes not verified |
uploaded | Verified, not yet referenced |
bound | Referenced by a root message |
deleted | Gone; unknown values treated as deleted |
CarrierType enum
| Value | Meaning |
|---|---|
plain | Posted with an insecure carrier (content) |
sealed | Posted with a secure carrier (SealedMessage); unknown values treated as sealed |
ChosenStatus enum
| Value | Meaning |
|---|---|
online | Normal; becomes idle when every connected session is idle |
idle | Shown as away |
dnd | Do not disturb; 19 holds back pushes |
invisible | Appear offline to everyone |
ComposedMode enum
| Value | Meaning |
|---|---|
insecure | Composed in an insecure context |
secure | Composed under a closed lock; never leaves as plaintext without user action |
DeletedBy enum
| Value | Meaning |
|---|---|
author | Deleted by its sender |
moderator | Deleted by a moderator; unknown values treated as moderator |
EffectiveStatus enum
| Value | Meaning |
|---|---|
online | Default; unknown values treated as online |
idle | Chosen idle or all sessions idle |
dnd | Chosen dnd |
offline | No open socket for OFFLINE_GRACE, or chosen invisible |
EntryKind enum
| Value | Meaning |
|---|---|
message | New root message (MessageContent) |
edit | Replace root content (EditContent) |
reaction | Add one reaction (ReactionContent) |
delete | Delete own root message or own reaction entry (DeleteContent) |
InlineBlobContentType enum
| Value | Meaning |
|---|---|
image/png | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
image/jpeg | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
image/gif | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
image/webp | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
video/mp4 | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
video/webm | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
audio/ogg | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
audio/mpeg | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
audio/mp4 | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
audio/webm | served with this Content-Type in insecure contexts; all others and all secure blobs as application/octet-stream |
NotEditableReason enum
| Value | Meaning |
|---|---|
security_changed | Target was sent in the other carrier mode |
NotificationTrigger enum
| Value | Meaning |
|---|---|
mention | content.mentions / hint mentions; an edit triggers only for addresses not mentioned by the root or an earlier edit (identified by the edit mid) |
reply | replyTo.author with ping (secure: arrives as mention) |
mention_all | validated mentionAll |
dm_message | every root message in a DM or group DM |
OutboxState enum
| Value | Meaning |
|---|---|
uploading | Attachments uploading |
queued | Ready, waiting its turn |
sending | Request in flight |
waiting_for_server | Server unreachable or asked to wait |
waiting_for_keys | Secure encryption state not ready; client fixes itself |
waiting_for_action | Only a person can unblock it |
sent | Acknowledged 201 |
failed | Won't succeed without the user |
PurgeReason enum
SenderKind enum
| Value | Meaning |
|---|---|
user | Default |
bot | Bot account; unknown values treated as bot |
webhook | Webhook; badge, no addr, not linkable to an account |
Also described in 19 §4.4, §5.2.
SVMarkdownConstruct enum
| Value | Meaning |
|---|---|
emphasis | x or x |
strong | x or x |
strikethrough | |
spoiler | ||x|| |
code span | x |
fenced code block | ``` with optional info string |
block quote | > (1 level) |
list | - * 1. (3 levels) |
hard line break | every LF |
autolink | bare https://, http://, sloppyv:// |
tokens | <@…>, <#…>, <@everyone> |
backslash escape | \ before ASCII punctuation |
ThumbnailMime enum
| Value | Meaning |
|---|---|
image/webp | |
image/jpeg | |
image/png |
WebhookDisabledReason enum
| Value | Meaning |
|---|---|
admin | Disabled via PATCH |
secure_context | Disabled by channel upgrade; can never be re-enabled |
WebhookState enum
| Value | Meaning |
|---|---|
active | Can execute |
disabled | Cannot execute; unknown values treated as disabled |
12 Direct messages and group DMs
CreateDmRequest object
Request body of POST /v1/dms (unnamed in spec).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | enum DmKind | Yes | DM kind.direct or group |
peer | string | No | Other participant. required for direct; canonical address |
participants | array<string> | No | Other initial participants. required for group; at least 2, at most maxGroupDmParticipants − 1, distinct, not the caller; canonical |
expectSecurity | enum DmSecurity | Yes | Security the client computed (§7.1 step 2). |
name | string | No | Group name. group only; constraints as §6.1 |
communityHints | array<string> | No | Communities on caller's list where it saw recipients; only order auto-accept checks. up to 10 canonical domains |
replaces | object | No | Closed predecessor when creating a successor (§13.3). { host, ctx } |
bootstrap | GroupBootstrap (13 §7.4) | No | Generation 1 group bootstrap. required for direct with expectSecurity secure; MUST be absent for group and for insecure DMs (400 core.invalid_request) |
commit | CommitSubmission (13 §7.5) | No | First commit epoch 0→1 adding claimed devices, with its Welcome. only with bootstrap; required whenever any KeyPackage was claimed |
Dm object
The DM as held by the hosting server; returned by POST/GET/PATCH /v1/dms…
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference.dm:… or gdm:… (§5) |
kind | enum DmKind | Yes | 1:1 or group DM.direct or group; unknown treated as group |
host | string | Yes | Canonical domain of the hosting server. canonical domain |
security | enum DmSecurity | Yes | Current security mode (§11).insecure or secure; unknown treated as secure (refuse to send plaintext) |
state | enum DmState | Yes | DM state (§6.2).active, upgrading, encryption_pending, closed; unknown treated as closed |
closedReason | enum DmClosedReason|null | Yes | Why the DM is closed.host_secure, peer_deleted, banned when closed; else null |
participants | array<DmParticipant> | Yes | Every participant the caller may see. filtered per §6.3/§6.5 |
owner | string|null | Yes | Group owner (createdBy until the creator first stops being a current participant, then null for good, D-087). canonical address; null for 1:1 and for groups whose creator has left |
name | string|null | Yes | Group name. groups: 1-100 Unicode scalar values, <=400 bytes, NFC, no Cc, no leading/trailing white space, or null; 1:1: always null |
createdBy | string | Yes | Creator's address. canonical address |
createdAt | timestamp | Yes | Creation time. RFC 3339 |
groupGeneration | integer | Yes | Generation of the current MLS group (last component of group_id). 0 while no MLS group exists; +1 per new group |
securitySinceSeq | integer | Yes | Seq at which current security took effect.1 if created in current mode, else seq of latest dm.security_changed |
lastSeq | integer | Yes | Highest seq in the DM's timeline. |
replaces | object|null | Yes | Predecessor when this DM is a successor (§13), else null. { host: domain, ctx: ref } |
dm-ref other
1:1 context reference: "dm:" + unpadded base64url of first 16 bytes of SHA-256(UTF8("sv1 dm") || 0x00 || UTF8(P1) || 0x0A || UTF8(P2)), P1 < P2 byte-wise; 22 chars, last char one of AQgw.
dm.entry_updated payload object
Payload d of S2S dm.entry_updated.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference. |
recipient | string | Yes | Participant concerned. homed at the receiver |
recipientInc | string | Yes | Participant's incarnation as recorded by hosting server. |
kind | enum DmKind | Yes | Current value. as §6.1 |
security | enum DmSecurity | Yes | Current value. as §6.1 |
state | enum DmState | Yes | Current value. as §6.1 |
closedReason | enum DmClosedReason|null | Yes | Current value. as §6.1 |
name | string|null | Yes | Current value. as §6.1 |
owner | string|null | Yes | Current value. as §6.1 |
replaces | object|null | Yes | Current value. as §6.1 |
participants | array<{addr, name, kind, inc, state, security}> | Yes | Participants. as §8.2 |
yourState | enum ParticipationState | Yes | Recipient's own participation state. |
yourReason | string|null | Yes | Recipient's own reason, if any. |
lastSeq | integer | Yes | DM's lastSeq. |
lastActivityAt | timestamp|null | Yes | Timestamp of latest content event, or null. |
dm.request payload object
Payload d of S2S dm.request.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
invitationId | uuidv7 | Yes | Assigned by the hosting server to this invitation. |
batch | integer | Yes | Batch number. 1, 2, 3, … |
truncated | boolean | Yes | True when the size limit stopped further events. |
ctx | string | Yes | Context reference. |
kind | enum DmKind | Yes | direct or group. |
host | string | Yes | Canonical domain of hosting server. MUST equal the S2S token's iss |
recipient | string | Yes | Invited participant. homed at the receiver |
recipientInc | string | Yes | Recipient's incarnation as recorded by the hosting server. |
inviter | {addr, name, kind, inc} | Yes | The inviter (sender of the request). |
createdBy | string | Yes | Creator's canonical address (for host legitimacy check). |
participants | array<{addr, name, kind, inc, state, security}> | Yes | Current participants. filtered as §6.5; recipient's own entry shows pending |
security | enum DmSecurity | Yes | DM security at time of this batch. |
state | enum DmState | Yes | DM state. |
name | string|null | Yes | Group name or null. |
replaces | object|null | Yes | Predecessor when a successor. {host, ctx} |
communityHints | array<string> | No | Copied from creator's/adder's request. <=10; batch 1 only |
identityStates | array<string> | No | IdentityStates of secure participants. IdentityState JWSs, each at most 24 h old; batch 1 and any batch after an identity change |
welcome | base64url|null | Yes | MLSMessage carrying the Welcome that added the recipient's devices. secure DMs only, in the batch that first follows it |
events | array<event envelope> | Yes | Durable DM events (dm.*, message.created, and for secure DMs 13's handshake events). seq order; from the invitation's start event or after previous batch |
dm.response payload object
Payload d of S2S dm.response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference. |
recipient | string | Yes | Responding participant. MUST be homed at the sender (iss) |
recipientInc | string | Yes | Responding account's incarnation. |
invitationId | uuidv7|null | Yes | Invitation answered. null for unblock and responses not tied to one invitation; informative |
action | enum DmResponseAction | Yes | accept, decline, block or unblock. unknown values ignored |
at | timestamp | Yes | When the user (or auto-accept rule) acted; used for last-writer-wins. |
DmBlock object
A personal DM block; at most 10,000 per account.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Blocked address. canonical address |
createdAt | timestamp | Yes | When blocked. |
DmIndexEntry object
Home server's record of one DM the account takes part in, keyed by (host, ctx).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Assigned by the home server. |
host | string | Yes | Hosting server canonical domain. |
ctx | string | Yes | Context reference. |
kind | enum DmKind | Yes | direct or group. |
state | enum DmIndexEntryState | Yes | Entry state (§9.2). unknown treated as left |
origin | enum DmIndexOrigin | Yes | outgoing (registered) or incoming (from dm.request). |
participants | array<{addr, name, kind, inc, state, security}> | Yes | As §8.2. empty until first dm.request/dm.entry_updated |
security | enum DmSecurity|null | Yes | Last known security; null until known. |
dmState | enum DmState|null | Yes | Last known Dm state. |
closedReason | enum DmClosedReason|null | Yes | As §6.1. |
name | string|null | Yes | Group name. |
inviter | string|null | Yes | Inviter's address for incoming entries. |
requestId | uuidv7|null | Yes | The DmRequest for this entry, if filed. |
autoAccept | enum AutoAcceptReason|null | Yes | Why auto-accepted; null if not. |
hidden | boolean | Yes | User hid the entry. default false |
declinedAt | timestamp|null | Yes | Start of the 30-day quiet period. reset to null by unblock |
successor | object|null | Yes | Successor once known. {host, ctx} |
replaces | object|null | Yes | Predecessor. as §6.1 |
lastSeq | integer | Yes | From latest dm.entry_updated. 0 if unknown |
lastActivityAt | timestamp|null | Yes | From latest dm.entry_updated or dm.request. |
createdAt | timestamp | Yes | Created. |
updatedAt | timestamp | Yes | Updated. |
pendingEvents | array<event envelope> | No | Events from an auto-accepted dm.request not yet fetched by devices. returned by GET /v1/me/dms/{id} only |
Also described in 00 §6 HP-9.
DmInviter object
Unnamed inviter object { addr, name, kind, inc } in dm.request and DmRequest (name chosen by extractor).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | |
name | string | Yes | |
kind | enum ParticipantKind | Yes | |
inc | string | Yes |
DmParticipant object
One DM participant at the hosting server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Participant address. canonical address |
name | string | Yes | Display name as last known to the hosting server; clients MUST check it against addr (01). display name; falls back to prepared local part (01 §6.5) |
kind | enum ParticipantKind | Yes | Account kind.user or bot; unknown treated as bot |
inc | string | Yes | Incarnation as last verified by the hosting server; a different inc for the same addr is a different account. account incarnation (05 §11.1); never changes for a participant |
state | enum ParticipationState | Yes | Participation state (§6.3), filtered per §6.5. unknown treated as removed |
role | enum ParticipantRole | Yes | Role.owner or member; unknown treated as member; always member in 1:1 |
security | enum DmSecurity | Yes | sec of this participant as last verified by the hosting server. |
ikf | string|null | Yes | Identity key thumbprint; informative only, clients MUST use their own pins (07). RFC 7638 thumbprint when security is secure, else null |
addedBy | string | Yes | Inviter. canonical address; equals addr for the creator |
addedAt | timestamp | Yes | Timestamp of the latest invitation. |
joinedSeq | integer | Yes | First seq this participant may read (§12.5). |
reason | enum ParticipantReason|null | Yes | Why the participant left or was removed. for left/removed only; unknown treated as removed |
DmParticipantSummary object
Unnamed participant item { addr, name, kind, inc, state, security } in dm.request, dm.entry_updated, DmIndexEntry and DmRequest (name chosen by extractor).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | |
name | string | Yes | |
kind | enum ParticipantKind | Yes | |
inc | string | Yes | |
state | enum ParticipationState | Yes | filtered per §6.5 |
security | enum DmSecurity | Yes |
DmRef object
Unnamed { host, ctx } object used by replaces and successor (name chosen by extractor; spec doesn't name it).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Hosting server. canonical domain |
ctx | string | Yes | Context reference. |
DmRequest object
A message request waiting at the recipient's home; list form omits events and welcome and carries preview.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Assigned by the home server. |
entryId | uuidv7 | Yes | The DmIndexEntry. |
host | string | Yes | as §8.2, from latest batch |
ctx | string | Yes | as §8.2, from latest batch |
kind | enum DmKind | Yes | as §8.2, from latest batch |
security | enum DmSecurity | Yes | as §8.2, from latest batch |
name | string|null | Yes | as §8.2, from latest batch |
replaces | object|null | Yes | as §8.2, from latest batch |
inviter | {addr, name, kind, inc} | Yes | Inviter. |
participants | array<{addr, name, kind, inc, state, security}> | Yes | Participants. as §8.2 |
state | enum DmRequestState | Yes | Request state. unknown treated as withdrawn |
createdBy | string | Yes | Creator. as §8.2 |
events | array<event envelope> | Yes | All received events. Omitted in list form. every batch, seq order; no plaintext content when home is a secure server |
welcome | base64url|null | Yes | Welcome. Omitted in list form. as §8.2 |
identityStates | array<string> | Yes | Verified IdentityStates (§8.4 step 7). |
serverKeys | object | Yes | sign keys for each IdentityState issuer and, for secure DMs with a welcome, the host's mls-external-sender keys.keyed by canonical domain; values array<ServerKey> (02 §11.1) with purpose and status; {} when none |
truncated | boolean | Yes | More events exist than the request carries. |
receivedAt | timestamp | Yes | Received. |
updatedAt | timestamp | Yes | Updated. |
expiresAt | timestamp | Yes | Expiry. receivedAt + 90 days |
preview | event envelope|null | No | First event's envelope, or null; replaces events and welcome in list items. list form only (GET /v1/me/dm-requests) |
DmSettings object
Account's DM settings.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
autoAccept | enum AutoAcceptSetting | Yes | Who can message without a request. default contacts_and_communities; unknown treated as default |
requestNotifications | boolean | Yes | Whether a new message request creates a notification record (19). default true |
gdm-ref other
Group context reference: "gdm:" + lowercase hyphenated UUIDv7 generated by the hosting server; never reused.
MLS group_id for DMs other
sv1:<host>:<ctx>:<generation> (generation 1 at creation; groupGeneration + 1 at an upgrade).
AutoAcceptReason enum
| Value | Meaning |
|---|---|
outgoing | rule (b): R also started this DM |
everyone | rule (a): setting is everyone |
accepted_dm | rule (d): S in an active DM of R |
shared_community | rule (e): shared community ≤200 members |
successor | rule (c): successor of an accepted closed DM |
AutoAcceptSetting enum
| Value | Meaning |
|---|---|
contacts_and_communities | default; rules (b)-(e) |
contacts_only | rules (b)-(d) |
everyone | rule (a): accept every non-blocked request |
CallLoggedPhase enum
| Value | Meaning |
|---|---|
started | call created; a content event |
ended | call ended |
DmClosedMarker enum
| Value | Meaning |
|---|---|
K5 | host_secure close |
null | no marker (e.g. banned) |
DmClosedReason enum
DmIndexEntryState enum
| Value | Meaning |
|---|---|
requested | message request waiting |
active | user takes part |
declined | user declined; kept 30 days |
blocked | user blocked the inviter of this 1:1 DM |
left | left/removed/withdrawn; unknown treated as left |
closed | host closed a DM the user had accepted |
DmIndexOrigin enum
| Value | Meaning |
|---|---|
outgoing | registered by the user (§9.3) |
incoming | from a dm.request |
DmInvalidParticipantsReason enum
| Value | Meaning |
|---|---|
self | 1:1 names the caller (or group names caller) |
duplicate | duplicate / already current participant |
too_few | group with fewer than 2 others |
ctx_mismatch | ctx doesn't match participants |
DmKind enum
| Value | Meaning |
|---|---|
direct | 1:1 DM |
group | group DM (unknown kind treated as group) |
DmRequestState enum
| Value | Meaning |
|---|---|
pending | awaiting user |
accepted | accepted |
declined | declined |
blocked | blocked |
expired | 90 days passed |
withdrawn | recipient no longer current participant or DM closed; unknown treated as withdrawn |
DmResponseAction enum
| Value | Meaning |
|---|---|
accept | accept |
decline | decline |
block | decline + block |
unblock | clear block flags (unknown actions ignored) |
DmSecurity enum
| Value | Meaning |
|---|---|
insecure | plaintext |
secure | MLS + SealedMessage; unknown treated as secure |
DmState enum
| Value | Meaning |
|---|---|
active | normal operation |
upgrading | computed security secure, MLS group being created; no content accepted |
encryption_pending | secure host, computed security insecure; no content, no calls |
closed | read-only; unknown states treated as closed |
DmStatusLines enum
| Value | Meaning |
|---|---|
Setting up encryption… | upgrading, messages wait |
Waiting for another member's app to come online | own identity changed, awaiting_readd |
You can write again once Bob turns on encryption. | encryption_pending |
Waiting to send — the server for this chat isn't reachable right now. | host unreachable |
Waiting for your server… | own home unreachable |
DmWarningsAndMarkers enum
| Value | Meaning |
|---|---|
W2 | pinned contact key changed / downgraded; new-account wording at reopen |
W3 | insecure group, viewer secure, some insecure participant |
W6 | secure bot added / 1:1 with secure bot |
W7 | insecure 1:1, viewer secure, peer insecure; also encryption_pending |
W9 | pinned secure group presented insecure: hard error |
G1 | insecure account hits security.account_required/upgrade_required |
G2 | unenrolled device in secure DM |
K1 | switch to secure |
K2 | switch to insecure / insecure successor of secure 1:1 |
K4 | restoring keys from archive / shared messages loading |
K5 | closed host_secure, between old and successor |
K6 | own join/re-add point with withheld earlier items |
K7 | above messages shared with the user |
K8 | where a participant shared messages with another |
NotificationRecordKinds (owned by 19) enum
| Value | Meaning |
|---|---|
dm_request | new message request; never a content preview |
dm_message | auto-accepted DM message |
call_ring | call ring |
ParticipantKind enum
| Value | Meaning |
|---|---|
user | user account |
bot | bot account; unknown treated as bot |
Also described in 15 §2.5.2.
ParticipantReason enum
| Value | Meaning |
|---|---|
left | left |
removed | removed |
declined | declined |
encryption_turned_off | downgraded in a secure group |
account_deleted | account deleted |
invitation_expired | invitation expired after 90 days |
ParticipantRole enum
| Value | Meaning |
|---|---|
owner | creator while the group has an owner |
member | everyone else; always member in 1:1; unknown treated as member |
ParticipationState enum
| Value | Meaning |
|---|---|
reserved | secure-group add awaiting MLS commit; expires after 60 s |
pending | invited, not yet accepted |
active | accepted, or the creator |
declined | declined or blocked (1:1 only) |
left | left a group DM |
removed | removed from group by another participant or host, or (1:1) deleted; unknown treated as removed |
RemoveReasonMapping (12 reason → 13 Remove reason) enum
| Value | Meaning |
|---|---|
left → participant_left | dropped from sv_participants in same commit |
removed/declined/invitation_expired → participant_removed | dropped in same commit |
encryption_turned_off → account_downgraded | dropped in same commit |
account_deleted → account_deleted | dropped in same commit |
(identity reset) → identity_changed | sv_participants unchanged until a member accepts the new key |
SecurityChangedMarker enum
| Value | Meaning |
|---|---|
K1 | switched to secure |
K2 | switched to insecure (1:1 only) |
StateChangedReason enum
| Value | Meaning |
|---|---|
encryption_pending | entered encryption_pending |
security_recomputed | security recomputed |
reopened | DM reopened |
13 MLS profile
BootstrapResponse (unnamed in spec) object
201 response of POST …/mls/bootstrap.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | |
generation | integer | Yes | |
epoch | integer | Yes | 0 |
ekid | base64url | Yes | ekid(0) |
seq | integer | Yes | Context seq |
commit | CommitResult | No | only when a first commit was sent |
Commit / GroupInfo / Welcome / KeyPackage MLSMessages other
Carried in JSON as unpadded base64url of the MLSMessage encoding; member name says which object (commit, groupInfo, welcome, keyPackage, proposal). GroupInfo carries exactly ratchet_tree then external_pub extensions.
CommitResult object
200 response for an accepted commit; replayed for resubmissions.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Group ID |
epoch | integer | Yes | The new epoch (epoch + 1) |
ekid | base64url | Yes | Reference ekid recorded for the new epoch |
seq | integer | Yes | Context seq of the mls.handshake event |
commitHash | base64url | Yes | Commit hash SHA-256 of the commit MLSMessage bytes |
CommitSubmission object
Body of POST …/mls/commits; also the commit member next to a bootstrap and in 12's POST /v1/dms.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
epoch | integer | Yes | Epoch the commit was built in MUST equal the FramedContent epoch |
commit | base64url | Yes | The commit MLSMessage, mls_public_message |
groupInfo | base64url | Yes | New GroupInfo GroupInfo for epoch+1, signed by committer, with ratchet_tree and external_pub |
ekid | base64url | Yes | ekid(epoch + 1) as the committer computed it; becomes provisional reference 8 bytes, 11 chars |
welcome | base64url | No | Welcome for every added leaf (always with ratchet_tree) required for DM commits with Add; MUST be absent otherwise |
EpochAck object
Body of POST …/mls/epoch-ack (called mls.epoch_ack in 00, 03, 15, 18).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
epoch | integer | Yes | Newest epoch the device has fully processed |
ekid | base64url | Yes | ekid(epoch) as the device computed it (14) 8 bytes, 11 chars |
extPub | base64url | Yes | Hash of the external_pub public key the device derived for that epoch (RFC 9420 §8.3) SHA-256 |
ExternalSender tls-record
The single external_senders entry naming the hosting server's mls-external-sender key.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
signature_key | opaque<V> | Yes | Server key raw 32-byte Ed25519 public key with ServerMetadata purpose mls-external-sender (02) |
credential | Credential | Yes | Server key ID credential_type basic (0x0001); identity = UTF-8 "<canonical-domain>#<keyId>" |
FederationKeyPackageClaim (unnamed in spec) object
Body of POST /v1/federation/keypackages/claim.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
claimant | string | Yes | User on whose behalf the caller claims canonical address; domain MUST equal the token's iss (else 403 federation.not_authorized) |
purpose | KeyPackageClaimPurpose | Yes | Claim purpose as §9.4 |
ctx | string | No | DM context as §9.4 |
claimId | uuidv7 | No | Idempotency key forwarded unchanged |
targets | array<object> | Yes | Targets 1 to 64 {addr, devices?}, each homed on the receiver; other-domain target gets not_found |
group_id other
UTF-8 string "sv1:" host-domain ":" ctx-ref ":" generation (ABNF §4.1); at most 320 bytes; split generation at the last colon.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host-domain | string | Yes | Hosting server canonical domain 1*253 lowercase A-label chars; canonical domain, never an alias |
ctx-ref | string | Yes | Context reference ch:<uuidv7 lowercase> | gdm:<uuidv7 lowercase> | dm:<22 base64url> |
generation | integer | Yes | Group generation 1..2147483647, no leading zeros |
GroupBootstrap object
Normative object for creating a group; embedded unchanged as bootstrap in 09's channel-upgrade PATCH /v1/channels/{id} and 12's POST /v1/dms.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
generation | integer | Yes | Generation being bootstrapped MUST equal the context's current generation, which MUST be in state none |
groupInfo | base64url | Yes | Epoch-0 GroupInfo epoch-0 GroupInfo; ratchet_tree with exactly one leaf (index 0, the caller) and external_pub |
ekid | base64url | Yes | ekid(0) computed by the creator (14) 8 bytes, 11 chars |
GroupInfoResponse object
Current GroupInfo with pending proposals; also carried in mls.epoch_conflict and mls.group_exists data.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | As in §7.2 |
generation | integer | Yes | Generation |
epoch | integer | Yes | The GroupInfo's epoch |
ekid | base64url|null | Yes | Reference ekid for this epoch |
groupInfo | base64url | Yes | GroupInfo uploaded by the epoch's committer or bootstrapper MLSMessage mls_group_info with ratchet_tree and external_pub |
pendingProposals | array<ServerProposal> | Yes | Full ServerProposal objects for this epoch |
identityStates | object | No | Cached IdentityStates of every roster address map canonical address -> IdentityState JWS; only with include=identityStates (channels only) |
HandshakeRecord object
An accepted commit as stored in the handshake log and sent in mls.handshake.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Group ID |
epoch | integer | Yes | The epoch the commit was made in |
newEpoch | integer | Yes | Epoch after the commit epoch + 1 |
kind | HandshakeKind | Yes | Commit sender kind external | member; unknown: process by MLS content |
commit | base64url | Yes | The commit MLSMessage exactly as submitted |
committer | object | Yes | Committer's canonical address, device ID, leaf index {addr, did, leaf}; leaf is the index in the new epoch |
proposals | array<ServerProposal> | Yes | Full ServerProposal objects the commit references empty if none |
identityStates | array<string> | Yes | Evidence attached by the server (§8.3) IdentityState JWSs; never empty (at least the committer's) |
ekid | base64url | Yes | Reference ekid of newEpoch: settled value once settled, else committer's provisional value 8 bytes, 11 chars |
ekidSettled | boolean | Yes | Whether ekid is settled always false in the mls.handshake event |
commitHash | base64url | Yes | Commit hash SHA-256 of the commit MLSMessage bytes |
welcomeFor | array<object> | No | Devices added by Welcome DMs only; {addr, did} each |
at | timestamp | Yes | Acceptance time |
KeyPackage (profile) tls-record
mls10, suite 0x0001, fresh X25519 init_key, LeafNode source key_package with sv_device credential, DSK signature_key, fresh encryption_key != init_key, §3.4 capabilities, empty extensions, lifetime span <= 90 days with not_before <= 1 h in future and not_after after upload; signed.
KeyPackageClaim object
Body of POST /v1/keypackages/claim.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
purpose | KeyPackageClaimPurpose | Yes | Why KeyPackages are claimed dm_create|dm_add_person|dm_readd|dm_secure; unknown refused with core.invalid_request |
ctx | string | No | DM context dm: or gdm: reference, when it already exists |
claimId | uuidv7 | No | Claim idempotency key client-chosen; MUST be reused on retry; idempotent for 10 min |
targets | array<object> | Yes | Targets 1 to 64 entries {addr: canonical address, devices?: [did,...]}; devices absent = every active device |
KeyPackageClaimResult object
Per-target claim results (also the S2S response shape, without unreachable).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<object> | Yes | Per-target results one per target, in request order |
results[].addr | string | Yes | The target |
results[].status | KeyPackageClaimStatus | Yes | Per-target status ok|not_found|not_secure|no_devices|unavailable|rate_limited|unreachable; unknown: treat as unavailable |
results[].identityState | string | No | Target's current IdentityState JWS; present for ok and no_devices |
results[].keyPackages | array<object> | No | Claimed KeyPackages for ok: {did, keyPackage, lastResort: bool} per device that had one |
KeyPackageStatus object
Calling device's KeyPackage inventory.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Calling device ID |
available | integer | Yes | Regular KeyPackages available |
lastResort | boolean | Yes | Whether a last-resort KeyPackage is stored |
lastResortUsed | boolean | Yes | Whether the last-resort KeyPackage has been handed out |
lowWatermark | integer | Yes | Low watermark 10 |
target | integer | Yes | Refill target 50 |
KeyPackageUpload object
Body of POST /v1/me/keypackages.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
keyPackages | array<base64url> | Yes | Regular KeyPackages 0 to 100 KeyPackages (mls_key_package) |
lastResort | base64url | No | One KeyPackage to store as last-resort, replacing any previous one |
LeafNode Capabilities tls-record
Required leaf capabilities: versions [mls10], cipher_suites [0x0001], extensions [0xF5A1], proposals [], credentials [0x0001, 0xF5A0]; GREASE allowed and ignored.
MlsGroupStatus object
Group status returned by GET …/mls.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The context reference |
groupId | string | Yes | group_id of the current generation (even in state none) |
generation | integer | Yes | Current generation 1..2147483647 |
state | ServerGroupState | Yes | Server group state (§4.3) none|active|frozen|retired; unknown: treat as retired and re-fetch after 60 s |
epoch | integer|null | Yes | Current epoch null in none and retired |
ekid | base64url|null | Yes | Reference ekid of the current epoch (provisional until settled) null when unknown |
ekidSettled | boolean | Yes | Whether the reference is settled |
leafCount | integer | Yes | Non-blank leaves, including leaves with pending removal |
maxSecureLeaves | integer | Yes | Effective limit for this group |
pendingProposals | array<object> | Yes | Pending server proposals for the current epoch summaries {ref, type, reason, target} |
lastCommitAt | timestamp|null | Yes | Time of last accepted commit or bootstrap |
self | object|null | Yes | Calling device's leaf info {leaf: int, lastAckedEpoch: int|null, removalPending: bool}; null if no leaf |
removedFor | RemovalReason|null | Yes | §13.1 reason of the calling device's most recent removal in this generation set when self is null or removalPending is true and server knows it |
bootstrapAllowed | boolean | Yes | Whether this device may bootstrap (§10.1) false unless state none |
MlsReport object
Client MLS diagnostic report.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | MlsReportKind | Yes | Report kind verification_failed|commit_unprocessable|fork_suspected|group_info_invalid; unknown stored as other |
generation | integer | Yes | Generation |
epoch | integer | Yes | The epoch concerned |
commitHash | base64url | No | The commit concerned |
mid | string | No | Message ID of the SealedMessage whose ekid differs (§15.3) required for fork_suspected |
subject | object | No | Leaf or member concerned {addr, did, leaf} |
reason | string | No | Short machine reason, e.g. a 07 §10.6 identity check result, unlisted_identity, ekid_mismatch, epoch_rollback, external_sender at most 64 characters |
detail | string | No | Free-text detail at most 1,024 characters; MUST NOT contain message content or key material |
PendingWelcome (unnamed in spec) object
Response of GET …/mls/welcome.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | |
generation | integer | Yes | |
epoch | integer | Yes | Join epoch |
welcome | base64url | Yes | mls_welcome |
addedBy | object | Yes | {addr, did} |
required_capabilities extension tls-record
extension_types [0xF5A1], proposal_types [], credential_types [0x0001, 0xF5A0].
ServerProposal object
A pending server (external-sender) proposal with unsigned server annotations; payload of mls.proposal.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Group the proposal belongs to group_id format §4.1 |
epoch | integer | Yes | The epoch the proposal is bound to |
ref | base64url | Yes | Proposal identifier SHA-256 ProposalRef (RFC 9420 §5.2), 43 chars |
type | ServerProposalType | Yes | Proposal type remove | group_context_extensions |
proposal | base64url | Yes | The signed proposal MLSMessage, wire format mls_public_message |
reason | RemovalReason | Yes | Server annotation (not signed) §13.1; unknown values: treat as lost_access |
target | object | No | The leaf to remove (server annotation, not signed) {addr, did, leaf}; required for type remove |
evidence | object | No | Evidence supporting device_revoked, identity_changed, account_downgraded (not signed) {identityState: JWS} and/or {deviceRevocation: JWS} |
reissueOf | base64url | No | ref of the proposal this one replaces after an external commit (§13.5) |
issuedAt | timestamp | Yes | Issue time |
ServerProposal MLSMessage (server proposal profile) tls-record
PublicMessage with sender {external, 0}, empty authenticated_data, content_type proposal (Remove or GroupContextExtensions), signature by external-sender key over FramedContentTBS without GroupContext, no membership_tag; identified by ProposalRef.
SvParticipant tls-record
One sv_participants entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | opaque<V> | Yes | Person canonical address UTF-8, 3..320 bytes |
ikf | opaque<V> | Yes | Identity key fingerprint exactly 32 bytes: raw SHA-256 RFC 7638 thumbprint of identity key JWK |
SvParticipants tls-record
extension_data of GroupContext extension 0xF5A1 (sv_participants): people and identity-key thumbprints allowed in a secure DM or group DM.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
participants | array<SvParticipant> | Yes | Participants 1..1,024 entries, sorted by address ascending byte order, unique address; <V> vector |
Also described in 00 §2.7, §6 HP-3.
ClientGroupState enum
| Value | Meaning |
|---|---|
absent | No MLS state |
bootstrapping | GroupBootstrap in flight |
joining | External commit in flight |
welcomed | Joined from Welcome, not caught up; may read, MUST NOT send or show lock |
awaiting_readd | DMs only after own identity change; not listed with own ikf; sends nothing |
member | Holds current epoch; only state that may show closed lock and send |
committing | Pending commit in flight |
catching_up | Processing missed commits |
deferred | Holding a commit for evidence |
blocked | After a positive rejection |
removed | Removed for membership reason; won't rejoin |
retired | Generation retired |
CommitNeededReason enum
| Value | Meaning |
|---|---|
removal | Pending removals |
key_rotation | External-sender key rotation |
reissue | Proposals reissued after external commit |
group_info_refresh | Stored GroupInfo stale; any member commit (self-update) replaces it |
CredentialRejectedReason (subset named here; owned by 07 §10.6) enum
| Value | Meaning |
|---|---|
subject_mismatch | A2 |
device_mismatch | A2 |
state_unavailable | A3; only retryable reason, retryAfterMs 30,000 |
account_insecure | A3 |
generation_mismatch | A3 |
key_mismatch | A3 |
device_not_listed | A4 |
device_revoked | A4 |
not_permitted | A5, with data.membershipCode |
duplicate_device_leaf | A6 |
mixed_identity | A6, only if Remove proposals can't be issued |
DesignatedCommitterState enum
| Value | Meaning |
|---|---|
idle | No designation running |
designating | A candidate has been sent mls.commit_needed with a 3 s timer |
waiting | No candidate / 30 s pause |
EpochAckStatus enum
| Value | Meaning |
|---|---|
match | 200: settled reference equals device's pair |
pending | 202: reference provisional; vote recorded |
ignored | 200: ack for epoch lower than last acked |
GenerationCase enum
| Value | Meaning |
|---|---|
G-a | 1:1 DM secure again after insecure (SM-8) |
G-b | Server lost/rolled back DS state |
G-c | Operator retires unrepairable group |
GroupRetiredReason enum
| Value | Meaning |
|---|---|
context_insecure | Context became insecure |
context_deleted | Context deleted |
state_lost | Server lost/rolled back DS state |
operator | Operator retired group |
HandshakeKind enum
| Value | Meaning |
|---|---|
external | External commit |
member | Member commit |
KeyPackageClaimPurpose enum
| Value | Meaning |
|---|---|
dm_create | Creating a DM |
dm_add_person | Adding a person |
dm_readd | Re-adding a person after a reset |
dm_secure | A DM or group DM becoming secure |
KeyPackageClaimStatus enum
| Value | Meaning |
|---|---|
ok | KeyPackages returned |
not_found | No such account (or target on another domain in S2S) |
not_secure | Account insecure |
no_devices | Secure but no device had a KeyPackage |
unavailable | Refused by target's home server, reason undisclosed |
rate_limited | Rate limit exceeded |
unreachable | Home server didn't answer (not in S2S responses) |
MlsReportKind enum
| Value | Meaning |
|---|---|
verification_failed | Positive rejection |
commit_unprocessable | Couldn't process sequenced commit |
fork_suspected | SealedMessage ekid mismatch |
group_info_invalid | Fetched GroupInfo failed checks |
other | Server storage value for unknown kinds |
NotMemberReason enum
| Value | Meaning |
|---|---|
no_leaf | No usable leaf; unknown reasons treated as this |
removal_pending | Non-entitled removal pending |
PolicyViolationRule enum
| Value | Meaning |
|---|---|
ciphersuite | |
wire_format | |
authenticated_data | |
credential_type | |
credential_changed | |
capabilities | |
extensions | |
external_sender | |
duplicate_leaf | |
welcome | |
bootstrap | |
sv_participants | |
E1 | External-commit rule (§12.1; E6 DMs only, §12.2) |
E2 | External-commit rule (§12.1; E6 DMs only, §12.2) |
E3 | External-commit rule (§12.1; E6 DMs only, §12.2) |
E4 | External-commit rule (§12.1; E6 DMs only, §12.2) |
E5 | External-commit rule (§12.1; E6 DMs only, §12.2) |
E6 | External-commit rule (§12.1; E6 DMs only, §12.2) |
M1 | Member-commit rule (§12.1; M1, M3, M4 also apply in DMs) |
M2 | Member-commit rule (§12.1; M1, M3, M4 also apply in DMs) |
M3 | Member-commit rule (§12.1; M1, M3, M4 also apply in DMs) |
M4 | Member-commit rule (§12.1; M1, M3, M4 also apply in DMs) |
M5 | Member-commit rule (§12.1; M1, M3, M4 also apply in DMs) |
D1 | DM member-commit rule (§12.2) |
D2 | DM member-commit rule (§12.2) |
D3 | DM member-commit rule (§12.2) |
D4 | DM member-commit rule (§12.2) |
D5 | DM member-commit rule (§12.2) |
D6 | DM member-commit rule (§12.2) |
RemovalReason enum
| Value | Meaning |
|---|---|
kicked | Member kicked (10) |
banned | Member banned (10) |
left | Member left channel/community (09) |
lost_access | Lost view_channel, needs_encryption or membership ended |
device_revoked | Device revoked |
identity_changed | Identity reset (higher igen, secure) |
account_downgraded | identity.changed with sec insecure |
account_deleted | Account deleted or new incarnation |
participant_left | Left a group DM |
participant_removed | Removed from group DM |
evicted | Inactivity or room needed |
stale_leaf | Leaf invalid on re-check or duplicate leaf |
federation_blocked | Hosting server blocked the account's domain |
key_rotation | Reason of a group_context_extensions server proposal |
ResyncRequiredReason enum
| Value | Meaning |
|---|---|
fork | Device's vote lost at settlement |
commit_unprocessable | §15.4 |
duplicate_leaf | Server found two leaves for this device |
state_lost | Server state lost |
ServerGroupState enum
| Value | Meaning |
|---|---|
none | Secure, no group for current generation yet |
active | Group exists, no pending removal |
frozen | At least one pending Remove proposal; content refused |
retired | Generation closed |
ServerProposalType enum
| Value | Meaning |
|---|---|
remove | Remove proposal |
group_context_extensions | GroupContextExtensions (external_senders rotation only) |
VerificationFailedReason enum
| Value | Meaning |
|---|---|
malformed | Parse failure |
signature | Signature failure |
group_info | GroupInfo check V14 |
tree | Roster/tree hash checks V15/V16 |
14 Sealed messages, history visibility and sharing
ArchiveHistoryKeyRecordFill other
How this document fills 08's archive record (08 §9.1), encrypted under the current vault key generation: host, ctx, groupId, gen, epoch, and keys entries {ekid, key = K_hist(e), source = mls, confirmed = true, learnedAt}. v1 writers write no other source value.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Hosting server canonical domain. |
ctx | string | Yes | Context reference. |
groupId | string | Yes | MLS group_id (names the generation). |
gen | integer | Yes | Generation. last field of groupId |
epoch | integer | Yes | Epoch. |
keys | array<{ekid, key, source, confirmed, learnedAt}> | Yes | Key entries. one entry per distinct key known for the epoch; source mls; confirmed true |
Bundle binary-frame
Plaintext of a HistoryShare's ct: u8(1) || u32(count) || count × (mid16(mid) || K_msg); 48 bytes per item, mid16 strictly ascending, no duplicates.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | u8 | Yes | Bundle version. 1 |
count | u32 | Yes | Number of items. equals header count |
items | count × (16-byte mid16 || 32-byte K_msg) | Yes | The shared message keys. sorted by mid16 ascending, no duplicates; each mid a valid UUIDv7 |
CredentialLookupRequest object
Body of POST …/history/credentials/lookup.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
devices | array<{addr, did}> | Yes | Pairs to look up. 1 to 100 entries |
CredentialLookupResponse object
Response of POST …/history/credentials/lookup.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<CredentialRecord> | Yes | Records found. |
missing | array<{addr, did}> | Yes | Pairs with no record. |
CredentialRecord object
Hosting server's stored copy of the device credential of a device that sent sealed content or created a HistoryShare in a context; one per distinct (addr, did, dkf), never overwritten.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | The sender's canonical address. canonical address |
did | base64url | Yes | The device ID. 22 characters |
dkf | base64url | Yes | Thumbprint of the DSK. RFC 7638 thumbprint |
idc | jws | Yes | The IdentityCertificate JWS from the device's sv_device credential (07). |
devcert | jws | Yes | The DeviceCertificate JWS from the same credential. |
firstSeenAt | timestamp | Yes | Time of the first accepted SealedMessage or HistoryShare from this device. |
lastSeenAt | timestamp | Yes | Time of the latest accepted SealedMessage or HistoryShare from this device. |
status | CredentialRecordStatus | Yes | active while the device has a leaf in the current group; otherwise removed. active or removed; unknown treated as removed |
HistoryState object
Response of GET /v1/contexts/{ctx}/history: the caller's visibility in a secure context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference. |
visibleFromSeq | integer | Yes | seq at which current membership began. |
earlierWithheld | boolean | Yes | Whether earlier content items are withheld (grants aside). |
grants | array<VisibilityGrantSummary> | Yes | The caller's VisibilityGrants. oldest first |
KeyStoreEntry other
A client's local, protected history-key table entry, keyed by epoch reference (host, ctx, gen, epoch).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Canonical domain of the hosting server. |
ctx | string | Yes | Context reference. |
gen | integer | Yes | Generation. |
epoch | integer | Yes | Epoch number. |
key | bytes | Yes | K_hist. 32 bytes |
ekid | bytes | Yes | ekid of key. 8 bytes |
source | KeyStoreSource | Yes | mls (computed in the group) or archive (from the user's key archive). mls or archive |
confirmed | boolean | Yes | True when the key came from MLS or has decrypted at least one verified SealedMessage of its epoch; an archive key starts with its entry's confirmed. |
SealedHeader binary-frame
Binary encoding of a SealedMessage's header fields; the AEAD associated data exactly, and the start of the signed content. Binds the MLS group_id and sender canonical address, which are not JSON members.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | u8 | Yes | Header version. 1; equals v |
group_id | V16(UTF-8) | Yes | MLS group_id computed from the hosting server's canonical domain, ctx and gen. "sv1:" host ":" ctx ":" gen (00 §7.6) |
sender | V16(UTF-8) | Yes | Canonical address of the sending account. canonical address; never an alias (D-032) |
did16 | 16 bytes | Yes | base64url-decoded device ID. |
mid16 | 16 bytes | Yes | Binary message ID. |
epoch | u64 | Yes | Epoch. |
ekid | 8 bytes | Yes | Epoch key identifier. |
kind | V8(ASCII) | Yes | Kind. |
ref16 | V8 | Yes | Target reference. empty, or mid16(ref) (16 bytes) |
nonce | 12 bytes | Yes | AES-GCM nonce. |
kc | 16 bytes | Yes | Key commitment. |
SealedMessage object
The one wire form of every piece of secure application content (messages, edits, author deletes, reactions). Carried in the sealed member of 11's posting body and message object, and in secure dm.request events (12). Stored verbatim by the server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Format version. 1; any other value rejected with sealed.invalid |
ctx | string | Yes | Context reference. 00 §7.6 form, colon unencoded; MUST equal the context the carrier names |
gen | integer | Yes | MLS group generation. 1 to 2,147,483,647 (13 §4.1) |
mid | uuidv7 | Yes | Message ID, generated by the sending client. lowercase hyphenated UUIDv7 (ABNF mid, §4.2); MUST equal the carrier's mid |
epoch | integer | Yes | Epoch whose K_hist seals this message. 0 to 2^53 − 1 |
ekid | base64url | Yes | B64U(ekid(epoch)). exactly 11 characters (8 bytes); canonical (zero trailing bits) |
kind | SealedKind | Yes | What the content is (§4.3). 1–32 characters from [a-z_] |
ref | uuidv7 | No | The mid of the entry this one acts on. required for edit, delete and reaction; MUST be absent for message; in a posting body MUST equal the cleartext target (11 §4.2) |
did | base64url | Yes | Device ID of the sending device. 22 characters (16 bytes) |
nonce | base64url | Yes | AES-GCM nonce. B64U of 12 random bytes: 16 characters |
kc | base64url | Yes | Key commitment (§3.4). B64U of 16 bytes: 22 characters |
ct | base64url | Yes | AES-256-GCM ciphertext followed by its 16-byte tag. decoded length at least 16 bytes and at most roundUp256(maxMessageBytes) + 16 |
sig | base64url | Yes | Labelled signature 'sealed' by the sender's DSK (§4.6). B64U of 64 bytes: 86 characters |
Also described in 00 §6 HP-4, §7.4.
SealedPlaintext other
The content JSON of 11 (UTF-8, I-JSON), at most maxMessageBytes, followed by 0x20 spaces padding to the smallest multiple of 256 bytes at least the content length. Receivers parse it as one JSON object followed only by white space.
SealedSigContent binary-frame
Signed content of a SealedMessage: SealedHeader || u32(len(ct)) || ct (decoded ct including tag). sig = Ed25519-Sign(DSK, "sv1 sig" || 0x00 || "sealed" || 0x00 || SealedSigContent).
SealedTombstoneFields other
What the server keeps for a sealed target whose ct it deleted (author delete, or root/earlier edit superseded by an edit): mid, sender, did, gen, epoch and sigHash = SHA-256(decoded sig).
SealedVerifyDiagnosticData object
data of the sealed_verify diagnostic report (sent via POST /v1/diagnostics to the hosting server) when an outcome is invalid or fork_evidence, or an ekid mismatch was handled.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
gen | integer | Yes | Generation. |
epoch | integer | Yes | Epoch. |
mid | uuidv7 | Yes | Message ID. |
sender | string | Yes | Sender address. |
did | base64url | Yes | Sender device. |
step | SealedVerifyStep | Yes | Step that failed. unknown values stored as other |
outcome | string | Yes | Outcome. invalid or fork_evidence |
ekid | base64url | No | The message's ekid. only for step ekid |
ownEkid | base64url | No | The client's own ekid. only for step ekid |
VisibilityGrant other
Server-side record that lets one recipient account be served the sealed items of one HistoryShare's range below its visibleFromSeq. Exactly one per accepted share; ends with the recipient's current membership; can't be withdrawn by the sharer.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
account | string | Yes | Recipient account. canonical address |
ctx | string | Yes | The context. |
shareId | uuidv7 | Yes | The HistoryShare that created it. |
fromSeq | integer | Yes | Range start, inclusive. |
toSeq | integer | Yes | Range end, inclusive. |
sharer | string | Yes | Sharing account. canonical address |
createdAt | timestamp | Yes | When the share was accepted. |
Also described in 00 §2.7, §6 HP-4.
VisibilityGrantSummary object
Element of HistoryState.grants.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
shareId | uuidv7 | Yes | The share that created the grant. |
sharer | string | Yes | Sharing account. canonical address |
fromSeq | integer | Yes | Range start. |
toSeq | integer | Yes | Range end, inclusive. |
createdAt | timestamp | Yes | When the share was accepted. |
CredentialRecordStatus enum
| Value | Meaning |
|---|---|
active | Device has a leaf in the current group. |
removed | Otherwise; unknown values are treated as removed. |
HistoryDisabledReason enum
| Value | Meaning |
|---|---|
insecure | Context is insecure (default for unknown values). |
HistoryMarker enum
| Value | Meaning |
|---|---|
K6 | Earlier messages are end-to-end encrypted and aren't available to people who join later; at the join point. |
K4 | Loading earlier messages…; while archive download or share processing is in progress. |
K7 | <Name> shared earlier messages with you; recipient, above first item of the range. |
K8 | <Name> shared earlier messages with <Name2>; every member other than the recipient, at the history.shared seq. |
KeyStoreSource enum
| Value | Meaning |
|---|---|
mls | Computed in the MLS group; always wins over other sources. |
archive | Read from the user's key archive. |
OpenOutcome enum
| Value | Meaning |
|---|---|
ok | Verified and decrypted; show normally. |
pending_key | No key yet for that epoch or message. |
pending_sender | Key present, sender credential not yet obtainable. |
unavailable | No key can be obtained. |
invalid | A format, credential, signature, kc, decryption or content check failed, or the sender is forked. |
fork_evidence | This device's own MLS-derived key differs from the reference ekid. |
ReportVerificationResult enum
| Value | Meaning |
|---|---|
verified | The sender's device produced exactly this content in this context, epoch and group. |
plaintext | Never sealed (insecure context or pre-upgrade); stored copy shown, labelled. |
not_found | No stored item, or no acceptable copy. |
credential_invalid | Sender's credential record failed the local checks. |
bad_signature | Signature doesn't verify. |
bad_key | Revealed key doesn't match kc. |
decrypt_failed | AEAD failed. |
bad_content | Content invalid or inconsistent with kind/ref, or attachment size/sha256 mismatch. |
not_referenced | Attachment isn't referenced with that key by a verified message of the report. |
SealedKind enum
| Value | Meaning |
|---|---|
message | A new root message (replies and attachment references included); ref absent. |
edit | Replacement content for the root message named by ref; ref must name the posting account's own undeleted root message. |
reaction | Adds one reaction to the root message named by ref (sealed or pre-upgrade plaintext); never removes one. |
delete | Deletes the author's own root message or removes the author's own reaction; server tombstones the target. |
Also described in 00 §5.4, §6 HP-4.
SealedRefInvalidReason enum
| Value | Meaning |
|---|---|
missing | ref missing where required. |
forbidden | ref present where forbidden. |
not_found | ref unknown. |
deleted | Target deleted. |
not_author | Target is another account's entry for edit or delete. |
SealedVerifyDiagnosticOutcome enum
| Value | Meaning |
|---|---|
invalid | Outcome invalid. |
fork_evidence | Outcome fork_evidence. |
SealedVerifyStep enum
| Value | Meaning |
|---|---|
format | Format/grammar check failed. |
context | S.ctx mismatch. |
credential | No acceptable sender credential. |
signature | Signature failed. |
ekid | ekid mismatch handled. |
kc | Key commitment mismatch. |
decrypt | AEAD decryption failed. |
content | Content check failed. |
timeout | A pending_sender that reached 24 h. |
15 Calls: control, leases, routing and continuity
Call object
A call in a call-capable context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | Assigned when the call starts. never reused |
ctx | string | Yes | Context reference. ch:…, dm:… or gdm:… |
security | CallSecurity | Yes | Context's mode when the call started; fixed for the call. insecure | secure; unknown → treat as secure and refuse to send media; never trusted for mode (§2.1 item 4) |
startedAt | timestamp | Yes | Start time. |
participants | array<Participant> | Yes | Every seat. ascending pid order |
videoRoute | VideoRoute | Yes | Video route for the call. dc | sfu; unknown → dc |
mediaEpoch | integer or null | Yes | MLS epoch the call most recently switched to. null in insecure calls; only increases |
profiles | array<string> | Yes | Media profiles offered. always voice-dc/1 and video-dc/1; plus sfu-rtp/1 if SFU-capable |
maxParticipants | integer | Yes | Effective maxCallParticipants. |
ringing | Ring or null | Yes | Pending ring in a DM call. always null in channels |
CallAlreadyInCallData object
data of call.already_in_call.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Where the existing participation is. |
callId | uuidv7 | Yes | The call. |
sameDevice | boolean | Yes | Existing participation is on this device. |
sameCall | boolean | Yes | Existing participation is in this same call. |
CallFailureData object
data of a call_failure report.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
phase | string | Yes | Where it failed. join | relay_connect | in_call | rejoin |
code | string or null | Yes | Last error code seen. last error code seen, or null |
security | string | Yes | Call's mode. the call's mode |
outageMs | integer | Yes | Outage duration. |
rejoinAttempts | integer | Yes | Attempts. |
iceState | string | Yes | ICE state. value set not stated in §14.3 |
dtlsState | string | Yes | DTLS state. value set not stated in §14.3 |
samples | array<Sample> | Yes | Samples. up to 30 |
CallSummaryData object
data of a call_summary report.
ControlMessage object
One sv-control message (UTF-8 JSON text).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
t | string | Yes | Message type. msg-type = area "." name; area 1*(a-z); name (a-z) *(a-z / DIGIT / "_"); unknown ignored |
from | integer | No | Sender pid. a client's from is ignored; the relay sets it to the session's pid on every message it forwards; absent on relay-originated messages |
to | integer | No | Unicast target pid. |
d | object | Yes | Payload defined by the owner of t. |
DataChannelLayout other
Three negotiated data channels on every relay connection.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sv-control | id 0 | Yes | Control messages. sv-control/1; ordered; reliable; text UTF-8 JSON |
sv-audio | id 1 | Yes | Audio frames of sources 0 and 2. voice-dc/1; unordered; maxRetransmits: 0; binary |
sv-video | id 2 | Yes | Video fragments of sources 1 and 3. video-dc/1; unordered; maxPacketLifeTime: 120 ms; binary |
DiagnosticReport object
Body of POST /v1/diagnostics; ≤ 64 KiB.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reportId | uuidv7 | Yes | Idempotency key for the report. chosen by the client |
kind | string | Yes | Report kind (§14.4). 1–64 chars of lowercase letters, digits, _ and .; unknown kinds accepted |
client | string | Yes | Product and version. as in session.hello (03) |
platform | DiagnosticPlatform | Yes | Platform. desktop | web | ios | android | bot |
createdAt | timestamp | Yes | When the report was made. |
ctx | string | No | The context. call kinds |
callId | uuidv7 | No | The call. call kinds |
data | object | Yes | Kind-specific data. CallFailureData or CallSummaryData for call kinds |
JoinRequest object
Body of POST …/call/join.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
features | array<string> | Yes | Media profiles this device supports in this call. subset of the session features; voice-dc/1 MUST be present; may include video-dc/1, sfu-rtp/1; unknown values ignored |
create | boolean | No | Start a call if none is active; when false and no call is active the server answers 404 call.not_active. default true |
takeOver | boolean | No | Resolve a one-call conflict (§2.3) by ending the user's existing participation on this server (§11). default false |
rejoinToken | string | No | Token of a participation of this device, to restore its seat (§10.2). rejoin-token = 1*128( ALPHA / DIGIT / "-" / "_" ); ≥128 bits entropy |
planned | boolean | No | This rejoin is a planned migration (§10.8). default false; only with rejoinToken |
selfMuted | boolean | No | Initial self-mute state. default false |
selfDeafened | boolean | No | Initial self-deafen state. default false |
ring | boolean | No | Whether starting a call rings the other participants (§13). default true; DM contexts only; ignored when the call already exists and in channels; every automatic join MUST send false |
video | boolean | No | The caller starts with webcam on; copied into the ring. default false |
JoinResponse object
200 body of POST …/call/join.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
call | Call | Yes | The call after admission. |
pid | integer | Yes | This participation's index. |
rejoinToken | string | Yes | Fresh rejoin token (§10.2). |
seatRestored | boolean | Yes | true when a rejoin kept the earlier seat and pid. |
lease | VoiceLease | Yes | This participant's rights (§4.1). |
tick | LeaseSnapshot | Yes | The snapshot that admitted this pid; the client's first lease tick. receipt time for coverage = when the client first sent a join with this Idempotency-Key |
relay | RelayInfo | Yes | Relay URL, RelayTicket and its expiry. {url, ticket, ticketExpiresAt} |
LeaseSnapshot object
Room-wide lease statement; delivered as call.tick. Complete, not a delta; no timestamp.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
seq | integer | Yes | Sequence. starts at 1; strictly increasing per call; MAY skip |
validMs | integer | Yes | Validity. always 3000 in v1; receivers MUST use 3,000 ms regardless |
audio | array<integer> | Yes | pids allowed to send sources 0 and 2. ascending, no duplicates, ⊆ listeners |
video | array<integer> | Yes | pids allowed to send sources 1 and 3. ascending, no duplicates, ⊆ listeners |
listeners | array<integer> | Yes | pids allowed to receive. ascending, no duplicates; every seat |
epoch | integer | No | Current mediaEpoch. secure calls only; absent in insecure calls |
Also described in 00 §6 HP-15.
Mute object
A Mute for everyone, stored per (channel, account); never names the moderator.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The voice channel. |
addr | string | Yes | Muted account. |
reason | string or null | No | Reason. only to holders of mute_members, and to the muted account when showReason is true |
showReason | boolean | Yes | Whether the muted account sees reason. |
reportId | string or null | No | Linked report. only to holders of mute_members |
createdAt | timestamp | Yes | When applied or last replaced. |
Participant object
One seat (participation of one device).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pid | integer | Yes | Participant index. 0–65535, unique within the call; lowest free index not released in the last 60 s |
addr | string | Yes | Canonical address. |
name | string | Yes | Display name. MUST be checked against addr per 01 (D-031) before display |
did | string | Yes | Device ID. |
kind | string | Yes | Participant kind. user | bot; unknown → user |
state | SeatState | Yes | Seat state. connecting | connected | reconnecting; unknown → connecting |
joinedAt | timestamp | Yes | Admission time. kept when a seat is restored |
selfMuted | boolean | Yes | Self-muted microphone. advisory |
selfDeafened | boolean | Yes | Self-deafened. advisory |
mutedForEveryone | boolean | Yes | Moderator mute. true while a Mute for everyone or ServerMute applies |
sources | object | Yes | What the participant says it sends. {screen: bool, screenAudio: bool, webcam: bool}; informative |
leafIndex | integer or null | Yes | MLS leaf index of the device. null in insecure calls; a hint only |
RelayConnectRequest object
Body of POST {relayUrl}/connect.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
offer | string | Yes | SDP offer. |
RelayConnectResponse object
201 body of POST {relayUrl}/connect.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
answer | string | Yes | SDP answer with all relay candidates. |
relaySessionId | string | Yes | Opaque ID. ≤ 64 chars |
RelayInfo object
The relay member of a join response.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
url | string | Yes | Relay URL; takes precedence over ServerMetadata endpoints.relayUrl. relay-url: absolute HTTPS base-url, no query/fragment/trailing slash |
ticket | RelayTicket | Yes | RelayTicket. compact JWS |
ticketExpiresAt | timestamp | Yes | Ticket expiry. |
RelayTicket jws
Authorises exactly one relay connection for one participation; compact JWS, typ sv-relay+jwt, ≤ 8,192 bytes; header exactly {alg: EdDSA, typ, kid}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Hosting server's canonical domain. |
aud | string | Yes | Relay URL. exactly relay.url from the join response |
sub | string | Yes | Participant canonical address. |
did | string | Yes | Device ID. |
ctx | string | Yes | Context reference. |
cid | string | Yes | callId. |
pid | integer | Yes | Participant index. |
sec | string | Yes | Call security. insecure | secure; never trusted for mode |
prof | array<string> | Yes | Profiles the session may use on the relay. subset of voice-dc/1, video-dc/1 |
iat | integer | Yes | Issue time. NumericDate |
exp | integer | Yes | Expiry. ≤ iat + 60 |
jti | base64url | Yes | Ticket ID. ≥ 128 random bits; single use |
Also described in 00 §7.13, §8 F2.
Ring object
Pending ring in a DM call.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
by | string | Yes | Canonical address of the account that started the call's first ring. |
targets | array<RingTarget> | Yes | Accounts still being rung. |
video | boolean | Yes | Caller started with webcam on. |
expiresAt | timestamp | Yes | Latest expiresAt among targets. |
RingTarget object
One account being rung.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Canonical address being rung. |
by | string | Yes | Who started this target's current ring (caller or re-ringer). |
expiresAt | timestamp | Yes | When this target's ring times out. 45 s after the ring started |
Sample object
Diagnostic counter sample every 10 s and at call close; last 30 kept.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
at | timestamp | Yes | Sample time. |
rttMs | integer | Yes | Round-trip time on the relay connection. |
jitterMs | integer | Yes | Interarrival jitter. |
lossPermille | integer | Yes | Received audio frames lost per thousand. |
audioFramesSent | integer | Yes | In interval. |
audioFramesReceived | integer | Yes | In interval. |
concealedMs | integer | Yes | Audio filled by FEC or concealment. |
jitterBufferMs | integer | Yes | Jitter-buffer depth. |
maxTickAgeMs | integer | Yes | Oldest the newest tick got. |
videoKbpsSent | integer | Yes | Video bitrate. |
videoKbpsReceived | integer | Yes | Video bitrate. |
framesHeld | integer | Yes | Sum of heldEntries in 17's VideoStats. |
keyframeRequests | integer | Yes | Keyframe requests sent. |
undecryptableFrames | integer | Yes | Undecryptable frames. secure calls |
attestationFailures | integer | Yes | MediaAttestation failures. secure calls |
candidateTypes | array<string> | Yes | ICE candidate types of the relay connection's selected candidate pair. host | prflx; never addresses |
audio | object | No | Optional audio stats. AudioStats (16 §13) |
video | object | No | Optional video stats. VideoStats (17 §14) |
SfuPublish object
Entry of a publish list.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | string | Yes | Transceiver mid in the offer. |
sourceId | integer | Yes | Source. 1, 2 or 3 |
rids | array<string> | No | RID list. simulcast (17) |
SfuWant object
Entry of a subscriptions want list.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pid | integer | Yes | Publisher. |
sourceId | integer | Yes | Source. |
maxSpatialLayer | integer | No | Layer cap. |
maxTemporalLayer | integer | No | Layer cap. |
Track object
One transceiver of an SFU session.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mid | string | Yes | Transceiver mid. |
direction | string | Yes | Published or subscribed. send | recv |
pid | integer | Yes | Publishing participant. |
sourceId | integer | Yes | Source. 1, 2 or 3 |
state | string | Yes | Paused by lease enforcement or layer choice. active | paused; unknown → paused |
VoiceLease object
A participant's own view of its lease rights.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
pid | integer | Yes | The participant. |
listen | boolean | Yes | In listeners. always true while the seat exists |
audio | boolean | Yes | In audio. |
video | boolean | Yes | In video. |
audioBlockedBy | AudioBlockedBy or null | Yes | Why audio is false. no_permission | muted_for_everyone | server_muted | timed_out | other; null when audio true; unknown → other |
videoBlockedBy | VideoBlockedBy or null | Yes | Why video is false. no_permission | timed_out | other; null when video true |
AudioBlockedBy enum
| Value | Meaning |
|---|---|
no_permission | Lacks speak_and_share |
muted_for_everyone | Mute for everyone |
server_muted | ServerMute (10 §8.6) |
timed_out | Timeout |
other | Other / unknown |
BlockedByPrecedence enum
| Value | Meaning |
|---|---|
timed_out | 1st |
no_permission | 2nd |
muted_for_everyone | 3rd |
server_muted | 4th |
CallEndReason enum
| Value | Meaning |
|---|---|
empty | No seat left |
completed | DM call fell to seats of one account after ≥2 accounts, no pending ring |
unanswered | DM ring(s) timed out/cancelled, or ringless DM call alone for 60 s |
declined | Every ring target declined |
security_upgraded | Context became secure (planned migration) |
security_downgraded | 1:1 DM became insecure (terminal) |
group_restarted | MLS group generation changed (planned migration) |
channel_deleted | Channel deleted |
context_closed | DM closed or context stopped accepting calls; unknown reasons treated like this |
server_restart | Call control lost the call's state (unexpected drop; fresh join) |
CallFailurePhase enum
| Value | Meaning |
|---|---|
join | |
relay_connect | |
in_call | |
rejoin |
CallSecurity enum
| Value | Meaning |
|---|---|
insecure | Insecure call |
secure | Secure call; unknown values treated as secure |
Also described in 21 §6.4.3.
ClientRejoinState enum
| Value | Meaning |
|---|---|
in_call | Normal |
rejoining | Attempt in flight |
restoring | Join answered; connecting relay |
waiting | Waiting for next scheduled attempt |
ended | Call screen closed |
DiagnosticPlatform enum
| Value | Meaning |
|---|---|
desktop | |
web | |
ios | |
android | |
bot |
DiagnosticReportKind enum
| Value | Meaning |
|---|---|
call_failure | 15, to hosting server |
call_summary | 15, to hosting server |
identity_check | 07 |
media_attestation | 18 |
sealed_verify | 14 |
pin_conflict | 02 §10.6 |
transport | 03 |
vault_integrity | 08, home server |
key_storage | 08, home server |
security_downgrade_seen | 09 |
DiagnosticsSetting enum
| Value | Meaning |
|---|---|
off | Nothing uploaded |
failures | Default (D-089): call_failure reports only |
full | Also call_summary at each call close |
MediaFeedbackKind enum
| Value | Meaning |
|---|---|
audio_loss | 16 §4.7 |
keyframe_request | 17, client |
video_pref | 17, client |
video_report | 17, client |
video_viewer_state | 17, relay-originated |
video_audience | 17, relay-originated |
video_upload_pressure | 17, relay-originated |
MediaProfile enum
| Value | Meaning |
|---|---|
voice-dc/1 | Audio frames on sv-audio (16); MUST be in join features |
video-dc/1 | Video fragments on sv-video (17) |
sfu-rtp/1 | RTP through the SFU (17) |
Also described in 00 §2.8.
MigrateReason enum
| Value | Meaning |
|---|---|
drain | Relay drained (default for unknown) |
rebalance | Load rebalance |
RelayClosingReason enum
| Value | Meaning |
|---|---|
left | Terminal |
removed | Terminal |
revoked | Terminal |
moved | Terminal; call moved to other device |
switched | Terminal |
call_ended | Terminal; call ended for a reason other than security_upgraded/group_restarted |
replaced | Newer session for same pid; none if client opened it, else unexpected drop |
drain | Relay leaving service: planned migration |
call_restarted | security_upgraded or group_restarted: planned migration, run §12.1 steps 1-6 at once |
timeout | Unexpected drop |
overloaded | Unexpected drop |
session_expired | Unexpected drop: renew session then rejoin with token |
RingEndReason enum
| Value | Meaning |
|---|---|
answered | Target joined from any device |
declined | Target declined |
timeout | 45 s elapsed |
cancelled | Caller left or call ended; default for unknown |
Also described in 19 §5.2, §8.1.
Route enum
| Value | Meaning |
|---|---|
relay | Through the hosting server's relay (voice-dc/1, video-dc/1); every source's default |
sfu | Through the hosting server's SFU (sfu-rtp/1); video and the source 2 that accompanies screen video, while videoRoute is sfu |
SeatRemovalReason enum
| Value | Meaning |
|---|---|
left | Leave (default for unknown) |
timeout | connecting 20 s or reconnecting 30 s |
removed | Kick, ban, DM removal, view_channel loss, needs_encryption, account deletion |
revoked | Device revocation, identity change, leaf loss |
session_expired | Session at hosting server ended without revocation |
moved | Move voice here to another device |
switched | Same device switched to another call |
call_ended | Call ended |
SeatState enum
| Value | Meaning |
|---|---|
connecting | Admitted, relay session not yet up (default for unknown) |
connected | Relay session up |
reconnecting | Relay session down; seat held 30 s |
SfuClosedReason enum
| Value | Meaning |
|---|---|
route_changed | videoRoute back to dc |
negotiation_timeout | Server offer unanswered 10 s |
removed | Removed |
sfu_failed | SFU failure; default for unknown |
SourceId enum
| Value | Meaning |
|---|---|
0 | Microphone → audio list |
1 | Screen video → video list |
2 | Screen or application sound → audio list |
3 | Webcam → video list |
4–15 | Reserved: nobody forwards or plays them |
TrackDirection enum
| Value | Meaning |
|---|---|
send | Published by this device |
recv | Subscribed |
TrackState enum
| Value | Meaning |
|---|---|
active | Forwarding |
paused | Paused by lease enforcement or layer choice; default for unknown |
TransmitGateReason enum
| Value | Meaning |
|---|---|
reconnecting | No route up after the first relay session was up |
connecting | no route is up before the first relay session is up (16) |
not_allowed | Not covered for audio; blockedBy = audioBlockedBy |
waiting_for_keys | Secure: no send keys for selected epoch |
muted | PTT held while self-muted |
VideoBlockedBy enum
| Value | Meaning |
|---|---|
no_permission | Lacks speak_and_share |
timed_out | Timeout |
other | Other |
VideoRoute enum
| Value | Meaning |
|---|---|
dc | video-dc/1 over the relay (default for unknown) |
sfu | sfu-rtp/1 through the SFU |
16 Audio
ApplicationSoundOpusProfile other
Opus encoder settings for source 2 (screen, application and game sound; also bot music). Its own encoder; applies also to Opus content carried in sfu-rtp/1.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
application | string | Yes | Opus application OPUS_APPLICATION_AUDIO |
channels | integer | Yes | Channel count 2 (stereo) by default; 1 if captured source is mono |
inputSampleRate | string | Yes | Encoder input rate 48 kHz |
bandwidth | string | Yes | Encoded bandwidth Fullband |
frameDuration | string | Yes | Packet duration 20 ms, one frame per packet |
bitrate | string | Yes | Target bitrate 96 kbit/s stereo or 64 kbit/s mono default; allowed 48–128 kbit/s |
bitrateMode | string | Yes | Bitrate mode Secure: CBR MUST. Insecure: VBR MAY |
inbandFec | boolean | No | In-band FEC SHOULD be on; loss % per §5.3 |
dtx | boolean | Yes | DTX Off; silence gating (§5.4) replaces it; never carries D |
signal | string | Yes | Signal hint OPUS_SIGNAL_MUSIC |
AudioLossFeedback object
The d payload of a call.media_feedback control message with d.kind = audio_loss. Receivers ignore unknown members. expected counts sequence numbers from the first to the last received in the interval (silence isn't loss); lost = expected − received.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindaudio_loss |
sourceId | integer | Yes | Reported stream of sender to0 or 2 |
lossPermille | integer | Yes | floor(1,000 × lost / expected), before FEC 0–1,000 |
latePermille | integer | Yes | floor(1,000 × late / expected) 0–1,000 |
bufferTargetMs | integer | Yes | Listener's current jitter target T 0–1,000 |
received | integer | Yes | Distinct sequence numbers received in the interval 0–65,535, capped |
AudioRecvStats object
Per-(pid, sourceId) receive counters inside AudioStats.recv.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pid | integer | Yes | The sender 0–65535 (00 §7.6) |
sourceId | integer | Yes | Audio source 0 or 2 |
framesReceived | integer | Yes | Valid frames received, including duplicates |
framesLost | integer | Yes | Sequence numbers never received (network loss) |
framesLate | integer | Yes | §9.3; also frames of a retired gen (§9.1) |
framesDuplicate | integer | Yes | §8.2 |
framesFecRecovered | integer | Yes | §9.4 |
framesConcealed | integer | Yes | §9.4 |
fadeOuts | integer | Yes | §9.4 |
decryptFailures | integer | Yes | §9.5 0 in insecure calls |
leaseDrops | integer | Yes | §12.2 |
attestationStops | integer | Yes | §9.5 (only 18 §9.8 stops) |
reanchors | integer | Yes | Re-anchorings after a delay jump (§9.3) |
targetMs | integer | Yes | Current jitter target T |
targetMaxMs | integer | Yes | Largest T in the interval |
holdP95Ms | integer | Yes | 95th percentile of p_i − a_i for played frames |
AudioSendStats object
Per-source send counters inside AudioStats.send.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sourceId | integer | Yes | Audio source 0 or 2 |
framesSent | integer | Yes | Frames created and handed to at least one transport |
framesDroppedSend | integer | Yes | Frames discarded by L2 or L3 (§7.5) |
talkspurts | integer | Yes | Talkspurts started |
bitrateKbps | integer | Yes | Current target bitrate |
fecLossPerc | integer | Yes | Current OPUS_SET_PACKET_LOSS_PERC |
cbr | boolean | Yes | Whether the encoder is in constant-bitrate mode |
AudioStats object
Audio diagnostics carried as the audio member of 15's diagnostics Sample (every 10 s and at call close). Counters count events since the previous Sample. Contains no audio, content or key material. Uploaded only as 15 §14.2's diagnostics setting allows.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mode | string | Yes | Transmit modeptt, vad or open_mic; unknown values kept as text by collectors |
send | array<AudioSendStats> | Yes | One entry per audio source sent in the interval may be empty |
recv | array<AudioRecvStats> | Yes | One entry per (pid, sourceId) received in the intervalmay be empty; at most 64 entries (streams with most frames received); in uploads at most 4 per Sample |
recvOverflow | AudioRecvStats without pid and sourceId | No | Summed overflow of recv entries present only when entries were summed into it; counters are sums; targetMs, targetMaxMs, holdP95Ms are maxima |
invalidDrops | integer | Yes | Frames dropped by §4.9.1 before a stream was identified, or as invalid |
captureGlitches | integer | Yes | Capture callbacks that delivered no or partial data |
renderUnderruns | integer | Yes | Render callbacks that output silence because the engine was late |
stalls | integer | Yes | Audio-clock jumps of more than 500 ms between render callbacks |
transmittingMs | integer | Yes | Time TalkState was transmitting |
notHeardMs | integer | Yes | Time TalkState was not_heard |
interruptions | integer | Yes | Operating-system audio interruptions (§7.9) |
MicrophoneOpusProfile other
Opus encoder settings for source 0 (named after libopus controls; other encoders such as WebCodecs AudioEncoder MUST configure equivalent behaviour).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
application | string | Yes | Opus application OPUS_APPLICATION_VOIP |
channels | integer | Yes | Channel count 1 (mono) |
inputSampleRate | string | Yes | Encoder input rate 48 kHz (resample other capture rates) |
bandwidth | string | Yes | Encoded bandwidth Wideband by default (OPUS_SET_MAX_BANDWIDTH = OPUS_BANDWIDTH_WIDEBAND); up to fullband with "High-quality voice" (default off) |
frameDuration | string | Yes | Packet duration 20 ms; exactly one frame per packet, TOC code 0 |
bitrate | string | Yes | Target bitrate 32 kbit/s default; 16–48 kbit/s wideband; 32–64 kbit/s with High-quality voice; never below 16 kbit/s |
bitrateMode | string | Yes | Bitrate mode Secure: CBR (OPUS_SET_VBR = 0) MUST. Insecure: constrained VBR (OPUS_SET_VBR = 1, OPUS_SET_VBR_CONSTRAINT = 1) SHOULD |
inbandFec | boolean | Yes | In-band FEC MUST be on (OPUS_SET_INBAND_FEC = 1); loss % per §5.3 |
dtx | boolean | Yes | Discontinuous transmission off in ptt and vad; on in open_mic (§5.4) |
signal | string | Yes | Signal hint OPUS_SIGNAL_VOICE |
complexity | integer | No | Encoder complexity 10 on desktop, at least 5 on mobile and web (SHOULD) |
encoderReset | string | Yes | When encoder state is reset OPUS_RESET_STATE at every gate opening, not at the S frame ending DTX in open mic |
RouteHeader binary-frame
The first 12 octets of a VoiceDcFrame (vt, flags, pid, sourceId|gen, sequence, timestamp). Never encrypted. In secure calls it is exactly the SFrame metadata, so it is authenticated by the SFrame AEAD.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
vt | uint8 | Yes | Version and type 0x10 |
flags | uint8 | Yes | C, S, E, D flags see FrameFlags |
pid | uint16 | Yes | Sender participant index big-endian |
sourceId | 4 bits | Yes | Audio source 0 or 2 |
gen | 12 bits | Yes | Stream generation low 12 bits of joinNonce |
sequence | uint16 | Yes | Per-stream counter big-endian |
timestamp | uint32 | Yes | Capture instant of first sample big-endian, 48 kHz |
StreamState other
Receiver-side state kept per (pid, sourceId, gen) — in a secure call per (pid, sourceId, joinNonce). In a secure call it changes only after SFrame decryption succeeds. At most one current gen per (pid, sourceId) plus retired gens remembered 60 s; at most 4 streams per (pid, sourceId) in secure calls; discarded after 60 s without frames or when the participant leaves the roster.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
decoder | Opus decoder | Yes | One decoder per stream (§5.6) 48 kHz output, stream's channel count |
jitterBuffer | buffer | Yes | Per-stream jitter buffer §9.3 bounds |
duplicateRecord | set of extended sequence numbers | Yes | Deduplication (§8.2) at least the last 128 |
highestSeq | integer (64-bit extended) | Yes | Highest extended sequence number seen serial-number arithmetic |
B | number (ms) | Yes | Base delay min D over last 10 s; restarts after >10 s without frames |
T | number (ms) | Yes | Target delay 60–180, initially 60 |
O | number (ms) | Yes | Playout offset; deadline p_i = s_i + O ideal O* = B + T; hold p_i − a_i ≤ 200 ms |
activity | string | Yes | Activity state (§9.4) active / inactive / in DTX |
counters | AudioRecvStats counters | Yes | Per-stream counters |
TalkState other
Triple (state, reason, blockedBy) exported by the audio engine to the UI, computed in the same evaluation as the transmit gate; with userMuted, muteReason, mode, vadActive and the newest VoiceLease's audioBlockedBy it is the only input 20 uses for the talk and mute indicators. Delivered to the UI within 100 ms of every change.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | TalkStateState | Yes | Talk state off | transmitting | not_heard | muted | idle |
reason | TalkStateReason or null | No | Why the user isn't heard / is muted / call condition not_heard: muted, not_allowed, connecting, reconnecting, waiting_for_keys, no_microphone; muted: user, rejoin, interruption; idle: null, not_allowed, connecting, reconnecting; off/transmitting: none |
blockedBy | BlockedBy or null | No | The newest VoiceLease's audioBlockedBy: why the user isn't allowed to talkset only when reason is not_allowed, null otherwise; other if the newest VoiceLease has audio true, none has arrived, or the value is unknown |
TransmitGateInputs other
Inputs of the transmit gate, a pure function evaluated inside the audio engine on the audio clock, on every input change and at least every 10 ms of captured audio.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mode | TransmitMode | Yes | Transmit mode (§7.1) ptt | vad | open_mic; per-device user setting; SHOULD default to vad |
pttDown | boolean | Yes | The PTT control is held now, as observed by the client (§7.7) treated as false (released) whenever the control is unobservable |
userMuted | boolean | Yes | The user's own mute (including lease-block and rejoin/interruption mutes) |
muteReason | MuteReason | No | Why userMuted was last set to trueuser | rejoin | interruption; cleared on deliberate unmute |
vadActive | boolean | Yes | Speech detected now (§7.6) computed in every mode; used for intent only in vad |
callState | CallState | Yes | Call state for this device joining | connected | reconnecting | migrating | ended; derived from 15's states, first match wins (ended, migrating, reconnecting, joining, connected) |
routeUp | boolean | Yes | A route can deliver a frame to every other listener now true iff the relay connection is usable: sv-audio open, ICE neither disconnected nor failed, some relay message (any type, any channel) within the last 1,500 ms on the audio clock, and bufferedAmount not above 6,000 octets for the last 200 ms |
leaseState | LeaseState | Yes | Whether own pid is in audio of a fresh lease tickcovered | excluded | stale (§12.3) |
keysOk | boolean | Yes | Secure call: may send source 0 now (18 §6.3 item 5) always true in an insecure call |
keysOkShare | boolean | Yes | Secure call: may send source 2 now (18 §6.3 item 5) always true in an insecure call |
captureOk | boolean | Yes | Microphone open and delivering samples |
shareActive | boolean | Yes | User is sharing screen or application sound (17 §4) |
shareCaptureOk | boolean | Yes | Shared-sound capture open and delivering samples |
VoiceDcFrame binary-frame
The only voice-dc/1 message type in version 1 (type 0, vt = 0x10): a 12-octet cleartext route header followed by exactly one Opus packet (insecure) or the SFrame ciphertext of one Opus packet (secure). One data-channel message on sv-audio carries exactly one frame. All multi-octet integers are unsigned big-endian.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
vt | uint8 | Yes | Version and type octet 0; MUST be 0x10 (high 4 bits version = 1, low 4 bits type = 0) |
flags | uint8 (FrameFlags) | Yes | Frame flags C, S, E, D (§4.4) octet 1; reserved bits (0x0F) MUST be sent as 0 |
pid | uint16 | Yes | The sender's participant index in this call (00 §7.6, assigned by 15) octets 2–3; MUST equal the sender's own pid |
sourceId | 4 bits | Yes | The audio source: 0 microphone, 2 screen or application sound octets 4–5, high 4 bits; only 0 and 2 are valid in voice-dc/1 |
gen | 12 bits | Yes | Stream generation (§4.5.1) octets 4–5, low 12 bits; = joinNonce mod 4096; constant for the life of the media process |
sequence | uint16 | Yes | Per-stream message counter (§4.5.2) octets 6–7; starts at 0 per stream, +1 per frame message created; wraps modulo 2^16; receivers extend to 64 bits (RFC 1982) |
timestamp | uint32 | Yes | Sampling instant of the first sample in the packet (§4.5.3) octets 8–11; 48 kHz units counted from the media process's T0; wraps modulo 2^32; 960 per 20 ms packet |
payload | octets | Yes | One Opus packet (C = 0) or the SFrame ciphertext of one Opus packet (C = 1) (§4.6) octet 12 onward; at least 1 octet; ABNF 1*1088OCTET; Opus packet at most 1,000 octets; whole message at most 1,100 octets |
BlockedBy enum
| Value | Meaning |
|---|---|
no_permission | Value of the newest VoiceLease's audioBlockedBy (15 §4.1, §4.10); per §7.10 tells the user they have no permission to speak |
muted_for_everyone | Value of audioBlockedBy (15 §4.1, §4.10); per §7.10 tells the user a moderator muted them (Mute for everyone, 15) |
server_muted | Value of audioBlockedBy (15 §4.1, §4.10); meaning defined by 15, not by 16 |
timed_out | Value of audioBlockedBy (15 §4.1, §4.10); per §7.10 tells the user they are timed out |
other | audioBlockedBy is other, or the newest VoiceLease has audio true, or no VoiceLease has arrived yet, or its value is unknown |
call.media_feedback kinds defined here enum
| Value | Meaning |
|---|---|
audio_loss | Listener loss report for one audio stream (§4.7) |
CallState enum
| Value | Meaning |
|---|---|
joining | From sending a non-rejoin join until the first lease tick on the new relay connection |
connected | 15 in_call, or restoring once the first tick arrived; includes planned migrations other than security_upgraded/group_restarted |
reconnecting | 15 rejoining/waiting, or restoring before first tick, after an unexpected drop (incl. call.ended server_restart, auto-rejoin after process restart) |
migrating | From call.ended security_upgraded/group_restarted or relay.closing call_restarted until the first tick of the new call |
ended | No participation (before join, after Leave, terminal event, migration closed with G1/G2) |
FrameFlags enum
| Value | Meaning |
|---|---|
0x80 (C) | Ciphertext: payload is SFrame ciphertext. MUST be 1 in a secure call and 0 in an insecure call (SM-11) |
0x40 (S) | Start: first frame of a talkspurt; receiver re-anchors playout |
0x20 (E) | End: last frame of a talkspurt; receiver then plays silence without concealment |
0x10 (D) | DTX: frame produced in Opus DTX (DTX packet or comfort-noise update); missing frames after it are comfort noise, not loss. Only microphone frames in open-mic mode; MUST NOT be combined with S or E |
0x0F (reserved) | Senders send 0; receivers ignore; relays forward unchanged |
LeaseState enum
| Value | Meaning |
|---|---|
covered | Own pid in K.audio of a fresh tick |
excluded | Fresh tick, own pid not in K.audio |
stale | No accepted tick, or t − K.rxAt ≥ V (3,000 ms) |
MuteReason enum
| Value | Meaning |
|---|---|
user | User's own mute; also covers the lease-block mute of §7.8 and Deafen |
rejoin | Auto-mute of vad/open_mic users on an unexpected drop or process-restart rejoin |
interruption | Auto-mute after an OS audio interruption longer than 2 s |
ReceiverStreamActivity enum
| Value | Meaning |
|---|---|
active | From an S frame (or first frame, or first frame while inactive) until an E frame is played or it fades out |
inactive | After E played or after a concealment fade-out |
in DTX | After a D frame has been played: missing frames render decoder comfort noise, not counted as loss |
sourceId enum
| Value | Meaning |
|---|---|
0 | Microphone (audio, voice-dc/1) |
1 | Screen video (17; invalid in voice-dc/1) |
2 | Screen or application sound (audio, voice-dc/1 or sfu-rtp/1) |
3 | Webcam (17; invalid in voice-dc/1) |
4–15 | Reserved |
Also described in 18 §4.2.
TalkStateReason enum
| Value | Meaning |
|---|---|
muted | not_heard: userMuted (deliberate mute wins over held PTT) |
not_allowed | not_heard/idle: leaseState = excluded; blockedBy set |
connecting | not_heard/idle: callState = joining |
reconnecting | not_heard: callState != connected or NOT routeUp or leaseState = stale; idle: callState reconnecting or migrating |
waiting_for_keys | not_heard: NOT keysOk |
no_microphone | not_heard: NOT captureOk |
user | muted: muteReason user |
rejoin | muted: muteReason rejoin |
interruption | muted: muteReason interruption |
null | idle with no condition to show |
TalkStateState enum
| Value | Meaning |
|---|---|
off | Not in a call on this device |
transmitting | Gate open and frames being sent |
not_heard | User is trying to talk but isn't being heard |
muted | User is muted and not holding PTT |
idle | Not trying to talk |
TransmitMode enum
| Value | Meaning |
|---|---|
ptt | Push-to-talk: user holds a physical control |
vad | Voice activation: client detects speech (recommended default) |
open_mic | Open mic: always, while not muted |
VoiceDcMessageType (vt) enum
| Value | Meaning |
|---|---|
0x10 | Type 0, Frame (§4.3); sender to relay, relay to listener |
0x11–0x1F | Types 1–15 reserved: senders MUST NOT send; receivers and relays drop silently |
any other | Other versions: receivers and relays drop silently. A future incompatible format is a new profile (voice-dc/2) |
17 Screen share and webcam
Clear prefix (sfu-rtp/1, secure calls) other
First octets of an encoded frame left unencrypted on the SFU route in secure calls, authenticated through 18's SfuFrameMetadata: VP8 key frame 10 octets (3-octet frame tag, 3-octet start code, 4 octets width/height), VP8 interframe 3 octets (bit 0 of first octet: 0 = key, 1 = inter), VP9 0, Opus 0. Frame data = clear prefix ‖ SFrame ciphertext. A frame shorter than its clear prefix + 1 octet is invalid.
keyframe_request object
d payload of 15's call.media_feedback, viewer to sender: asks for a keyframe. At most 1 per second per (viewer, source). Replaced by RTCP PLI/FIR on the SFU route.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindkeyframe_request |
sourceId | integer | Yes | Source 1 or 3 |
reason | enum keyframe_request reason | Yes | Why the keyframe is neededsubscribe, loss, decoder_error, route_change; unknown values treated as loss |
Protected frame other
The bytes that are fragmented: in an insecure call (C=0) the encoded frame itself; in a secure call (C=1) the SFrame ciphertext (RFC 9605 §4.2: SFrame header, encrypted data, tag) of the whole encoded frame, with the 16-octet frame header as SFrame metadata, produced by the media process's main encryptor instance, one SFrame counter per frame. At most 2,097,152 octets.
video_audience object
Relay-originated call.media_feedback payload (no from): number of relay viewers of a source. Sent on change (coalesced to at most 1 per second per source, newest value) and once per active source when the sender's session starts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindvideo_audience |
sourceId | integer | Yes | Source 1 or 3 |
viewers | integer | Yes | Sessions currently subscribed to this source via relay.subscribe |
video_report object
d payload of call.media_feedback, viewer to sender, every 1,000 ms (audio clock) while receiving a source. At most 1 per second per (viewer, source). Replaced by RTCP on the SFU route.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindvideo_report |
sourceId | integer | Yes | Source 1 or 3 |
gen | integer | Yes | Stream generation reported on 0-4,095; reports for an old gen are ignored |
intervalMs | integer | Yes | Length of the interval covered about 1,000 |
framesComplete | integer | Yes | Frames that completed reassembly in the interval |
framesIncomplete | integer | Yes | Frames abandoned in the interval (§6.9) |
framesLate | integer | Yes | Frames dropped as behind (§6.10 item 2) plus frames whose fragments all arrived late (§6.9 slot rule 5) each late frame number counted once; frames shown late (§11.2) excluded |
framesUndecodable | integer | Yes | Frames discarded because the chain was broken |
waitingKeyframe | boolean | Yes | The viewer's chain is broken now |
rxKbps | integer | Yes | Fragment octets received for this source in the interval kbit/s |
congested | boolean | Yes | Viewer is congested: over the last 2 s, framesIncomplete+framesLate > 5 % of frames sent, or p95 non-keyframe assembly time > 50 ms + one frame interval; also true while waiting for a keyframe after a chain break §7.4.1 |
video_upload_pressure object
Relay-originated call.media_feedback payload (no from): the relay dropped some of the sender's video because it exceeded the inbound caps (§8.3) or maxInboundKbps. At most 1 per second per source. Counts as pressure signal P2.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindvideo_upload_pressure |
sourceId | integer | Yes | Source 1 or 3 |
droppedOctets | integer | Yes | Octets of this source dropped in the interval |
intervalMs | integer | Yes | Length of the interval |
video_viewer_state object
Relay-originated call.media_feedback payload (no from, to = sender pid): a viewer's forwarding state for one of the sender's sources changed. Coalesced to at most 1 per second per (viewer, source), newest state always sent; normal sent once when a viewer unsubscribes or leaves.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindvideo_viewer_state |
sourceId | integer | Yes | Source 1 or 3 |
viewer | integer | Yes | The viewer's pid |
state | enum viewer state | Yes | Forwarding state (§8.2)normal, thinned, keyframes_only, paused; unknown values treated as paused |
video-dc/1 Fragment binary-frame
The only video-dc/1 message type (vt 0x10): a 16-octet frame header, 4 octets of fragment fields, then 1 to 1,180 octets of the protected frame. Sent on the sv-video data channel (id 2) of a relay connection, one fragment per data-channel message; total 21 to 1,200 octets. Sender to relay, relay to viewer.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
vt | uint8 | Yes | Version and type octet 0; MUST be 0x10 (high 4 bits version = 1, low 4 bits type = 0); 0x11-0x1F reserved and other versions dropped silently |
flags | uint8 (bit flags) | Yes | Frame flags (§6.3) octet 1; C=0x80, K=0x40, D=0x20, E=0x10, 0x0F reserved (send 0, receivers ignore, relays forward unchanged); K and D not both set |
pid | uint16 | Yes | The sender's participant index (15) octets 2-3; MUST equal the sender's own pid |
sourceId | 4 bits | Yes | Video source high 4 bits of octets 4-5; only 1 (screen video) or 3 (webcam) are valid |
gen | 12 bits | Yes | Stream generation (§4.4, 16 §4.5.1) low 12 bits of octets 4-5; = joinNonce mod 4096; constant for the media process |
frameNumber | uint16 | Yes | Per-stream frame counter (§6.4) octets 6-7; starts at 0 per stream (pid, sourceId, gen), +1 per frame, wraps modulo 2^16; extend to 64 bits with RFC 1982 |
refSeq | uint16 | Yes | Reference-chain counter (§6.4, §6.10) octets 8-9; wraps modulo 2^16; first keyframe 0; each non-discardable frame = previous non-discardable + 1; discardable frames carry the newest non-discardable frame's refSeq |
timestamp | uint32 | Yes | Capture instant of the picture octets 10-13; 90 kHz periods since the media process's T0, wraps modulo 2^32; non-decreasing within a stream; compare with RFC 1982 serial arithmetic |
codec | uint8 (enum video-dc/1 codec octet) | Yes | Codec of the encoded frame (§5.1) octet 14; 0x01-0x04 in v1 |
frameInfo | uint8 | Yes | Rotation (clockwise, 90° steps) to apply before display octet 15; bits 7-6 rotation; bits 5-0 reserved (send 0, ignore); rotation is 0 for source 1 |
fragIndex | uint16 | Yes | Index of this fragment octets 16-17; from 0; fragIndex < fragCount; NOT part of the frame header / SFrame metadata |
fragCount | uint16 | Yes | Number of fragments of this frame octets 18-19; 1 to 2,048; NOT part of the frame header / SFrame metadata |
chunk | octets | Yes | Part of the protected frame (§6.5) octets 20-; 1 to 1,180 octets; senders SHOULD use 1,130 |
video-dc/1 frame header binary-frame
Octets 0-15 of every fragment (vt, flags, pid, sourceId|gen, frameNumber, refSeq, timestamp, codec, frameInfo). Identical in every fragment of one frame. In secure calls it is exactly the SFrame metadata that 18 authenticates; cleartext so relays can read K and D.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
vt | uint8 | Yes | Version and type 0x10 |
flags | uint8 | Yes | C, K, D, E see enum video-dc/1 flags |
pid | uint16 | Yes | Sender pid |
sourceId | 4 bits | Yes | Video source 1 or 3 |
gen | 12 bits | Yes | Stream generation 0-4095 |
frameNumber | uint16 | Yes | Frame counter |
refSeq | uint16 | Yes | Reference-chain counter |
timestamp | uint32 | Yes | Capture instant 90 kHz |
codec | uint8 | Yes | Codec octet 0x01-0x04 |
frameInfo | uint8 | Yes | Rotation rotation in bits 7-6 |
VideoPreference object
video_pref payload of call.media_feedback, viewer to sender: whether the viewer watches a source, the display area and frame rate it needs, and the codecs it can decode. At most 2 per second per (viewer, sender). Travels through the relay on sv-control whether videoRoute is dc or sfu; on the SFU route the viewer also maps it onto its subscription's layer limits (§12.3).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | string | Yes | Feedback kindvideo_pref |
sourceId | integer | Yes | Source 1 or 3 |
subscribed | boolean | Yes | Whether the viewer watches the source now. Informative: forwarding follows relay.subscribe (15 §6.6) on the relay and the viewer's subscription (§12.3) on the SFU route; the sender uses it to know its viewers (codec selection, viewer cap, viewer count). |
maxWidth | integer | No | The LARGER edge, in device pixels, of the viewer's display area (not necessarily the horizontal one) 16-3,840; default no cap |
maxHeight | integer | No | The SMALLER edge of that area 16-3,840; default no cap |
maxFps | integer | No | Maximum useful frame rate 1-60; default no cap |
decode | array<string> | Yes | Codecs the viewer can decode in real time codec names from §5.1; MUST include vp8; unknown names ignored; at most 8 entries; no order |
VideoRecvStats object
Per received (pid, sourceId) entry of VideoStats.recv; pid -1 is the summed overflow entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pid | integer | Yes | Sender -1 for the summed overflow entry |
sourceId | integer | Yes | Source 1 or 3 |
route | string | Yes | Route of most frames in the intervalrelay or sfu; unknown values stored as given |
codec | string | Yes | Codec codec name; unknown values stored as given |
width | integer | Yes | Width of the last decoded picture |
height | integer | Yes | Height of the last decoded picture |
fragmentsReceived | integer | Yes | §6.9 0 on sfu |
fragmentsDuplicate | integer | Yes | §6.9 0 on sfu |
fragmentsLate | integer | Yes | §6.9 0 on sfu |
framesComplete | integer | Yes | §6.9 |
framesIncomplete | integer | Yes | §6.9 |
framesDecoded | integer | Yes | §6.10 |
framesDisplayed | integer | Yes | §11.2 |
framesShownLate | integer | Yes | Frames decoded more than 80 ms after due (§11.2) |
framesLate | integer | Yes | §6.10 |
framesUndecodable | integer | Yes | §6.10 |
keyframeRequestsSent | integer | Yes | §7.2 |
decryptFailures | integer | Yes | §10.4 |
leaseDrops | integer | Yes | §10.3 |
attestationStops | integer | Yes | §10.4 |
heldMs | integer | Yes | Time spent in held |
heldEntries | integer | Yes | Transitions into held (§10.1) |
avSkewP95Ms | integer|null | Yes | p95 of absolute presentation skew between screen video and sound null unless source 1 with source 2 |
lipSyncP95Ms | integer|null | Yes | p95 of webcam lateness relative to the voice null unless source 3 |
VideoSendStats object
Per sent video source entry of VideoStats.send.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sourceId | integer | Yes | Source 1 or 3 |
route | string | Yes | Route that carried most of the source's frames in the intervalrelay or sfu; unknown values stored as given |
videoRoute | string | Yes | The call's videoRoute (15 §7.2; cited in 17 as 15 §7.6)dc or sfu; unknown values stored as given |
codec | string | Yes | Codec in use codec name (§5.1); unknown values stored as given |
contentHint | string|null | Yes | Content hintdetail or motion for source 1; null for source 3 |
rung | integer | Yes | Current effective rung (dc only) -1 on sfu |
controllerRung | integer | Yes | Current controller rung r (§9.2) -1 on sfu |
width | integer | Yes | Current encoded width |
height | integer | Yes | Current encoded height |
fps | integer | Yes | Current frame rate |
targetKbps | integer | Yes | Current encoder target |
framesEncoded | integer | Yes | Frames encoded |
keyframes | integer | Yes | Keyframes sent |
keyframeRequests | integer | Yes | Requests received |
picturesSkipped | integer | Yes | Pictures not encoded because of backlog (§8.1) |
framesDiscarded | integer | Yes | Frames discarded after encoding (§5.9, §6.6, §8.1) |
pressureSignals | integer | Yes | Pressure signals (§9.1) |
stepDowns | integer | Yes | §9.2 |
stepUps | integer | Yes | §9.2 |
failedStepUps | integer | Yes | §9.2 |
viewers | integer | Yes | Known viewers (§9.1) |
slowViewers | integer | Yes | Viewers whose state isn't normal |
VideoStats object
Diagnostic counters recorded in each diagnostics Sample (15 §14.1) as the optional Sample member video, every 10 s and when a call closes. Counters count events since the previous Sample. No pictures, content or key material.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
send | array<VideoSendStats> | Yes | One entry per video source sent in the interval may be empty |
recv | array<VideoRecvStats> | Yes | One entry per (pid, sourceId) received in the interval may be empty; at most 32 entries when recorded, 4 when uploaded (those with most framesDisplayed); the rest summed into an entry with pid = -1 |
invalidDrops | integer | Yes | Fragments or frames dropped as invalid (§6.8.1) |
codecUnsupported | integer | Yes | Fragments dropped for an unknown or undecodable codec (§6.8.1) |
call.media_feedback kind (video) enum
| Value | Meaning |
|---|---|
keyframe_request | Viewer → sender; ≤1/s per (viewer, source) |
video_pref | Viewer → sender; ≤2/s per (viewer, sender) |
video_report | Viewer → sender; ≤1/s per (viewer, source) |
video_viewer_state | Relay → sender (no from); ≤1/s per (viewer, source) |
video_audience | Relay → sender (no from); ≤1/s per source |
video_upload_pressure | Relay → sender (no from); ≤1/s per source |
Content hint enum
| Value | Meaning |
|---|---|
detail | Text, slides, code: keep sharpness, shed frame rate first (default) |
motion | Games, video: keep smoothness, shed resolution first |
Controller phase enum
| Value | Meaning |
|---|---|
steady | Normal operation |
trial | 10 s after a step-up; 3 pressure signals revert it and double H |
keyframe_request reason enum
Pressure signal enum
| Value | Meaning |
|---|---|
P1 | Own uplink: relay connection backlog > 250 ms while carrying s, or pictures skipped because of relay connection backlog |
P2 | Relay drops: a video_upload_pressure for s arrived |
P3 | Strictly more than half of the current viewers are pressured (congested report < 3 s old, or viewer state not normal) |
P4 | Device: encoder can't keep up, or thermal/battery pressure |
Receiver viewing state enum
| Value | Meaning |
|---|---|
off | Not viewing |
loading | Subscribed, waiting for a decodable keyframe; neutral placeholder with spinner |
playing | Displaying pictures |
held | No new picture for 750 ms; last picture kept with a calm 'Picture delayed' label (never the word 'Paused') |
blocked | Sender not covered for video, or MediaAttestation stopped the stream; participant avatar placeholder |
rotation enum
| Value | Meaning |
|---|---|
0 | none |
1 | 90° clockwise |
2 | 180° |
3 | 270° |
Screen detail ladder enum
| Value | Meaning |
|---|---|
5 | 2560 × 1600, 15 fps, budget 5,000 kbit/s, target 4,000 |
4 | 2560 × 1600, 8 fps, budget 3,500, target 2,800 |
3 | 1920 × 1200, 8 fps, budget 2,200, target 1,760 (starting rung) |
2 | 1920 × 1200, 5 fps, budget 1,500, target 1,200 |
1 | 1600 × 1000, 5 fps, budget 900, target 720 |
0 | 1280 × 800, 3 fps, budget 500, target 400 |
Screen motion ladder enum
| Value | Meaning |
|---|---|
5 | 1920 × 1080, 60 fps, budget 8,000, target 6,400 (only with 'Smoother video (uses more data)', default off) |
4 | 1920 × 1080, 30 fps, budget 5,000, target 4,000 |
3 | 1600 × 900, 30 fps, budget 3,500, target 2,800 |
2 | 1280 × 720, 30 fps, budget 2,200, target 1,760 (starting rung) |
1 | 1280 × 720, 15 fps, budget 1,200, target 960 |
0 | 960 × 540, 15 fps, budget 700, target 560 |
sfu-rtp/1 codec support enum
| Value | Meaning |
|---|---|
VP8 (RFC 7741) | MUST send and receive, insecure and secure |
VP9 profile 0 (RFC 9628) | MAY, insecure and secure |
H.264 CB packetization-mode=1 (RFC 6184) | SHOULD in insecure; MUST NOT in secure in v1 |
AV1 Main (AV1 RTP spec) | MAY in insecure; MUST NOT in secure in v1 |
Opus source 2 (RFC 7587) | MUST; stereo=1, sprop-stereo=1, useinbandfec=1; cbr=1 in secure calls |
sfu-rtp/1 publishing structure enum
| Value | Meaning |
|---|---|
Webcam | VP8/H.264: 3 simulcast encodings rid q (scaleResolutionDownBy 4), h (2), f (1), each L1T3; VP9: L3T3_KEY |
Screen motion | VP8/H.264: 2 encodings h (2), f (1), each L1T3; VP9: L2T3_KEY |
Screen detail | VP8/H.264: 1 encoding f, L1T3 (or L1T2); VP9: L1T3 |
sfu-rtp/1 RTCP feedback enum
| Value | Meaning |
|---|---|
nack | RFC 4585; MUST for video |
nack pli | MUST for video |
ccm fir | RFC 5104; MUST for video |
transport-cc | MUST for video |
goog-remb | MAY |
RTX (RFC 4588) | Retransmission; MUST be supported for video |
RED, ULPFEC, FlexFEC | MAY |
sfu-rtp/1 RTP header extensions enum
| Value | Meaning |
|---|---|
urn:ietf:params:rtp-hdrext:sdes:mid | BUNDLE demultiplexing (RFC 9143); MUST |
urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id and …:repaired-rtp-stream-id | Simulcast (RFC 8852); MUST with simulcast |
http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 | Congestion control; MUST |
https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension | Layer forwarding; MUST with VP9 in every §12.5 mode; MAY with VP8; MAY with H.264 and AV1 (insecure only) |
urn:3gpp:video-orientation | Webcam rotation; SHOULD for source 3 |
http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time | Capture time; MAY |
http://www.webrtc.org/experiments/rtp-hdrext/playout-delay | Low-delay hint for screen share; MAY |
urn:ietf:params:rtp-hdrext:ssrc-audio-level | Audio level (RFC 6464); MUST NOT on source 2 in secure calls; MAY in insecure calls |
SRTP protection profile (sfu-rtp/1) enum
| Value | Meaning |
|---|---|
SRTP_AEAD_AES_128_GCM | SHOULD be offered first |
SRTP_AES128_CM_HMAC_SHA1_80 | MUST be supported |
Temporal structure (video-dc/1) enum
| Value | Meaning |
|---|---|
L1T1 | Every frame non-discardable; RECOMMENDED for screen detail at 8 fps or less |
L1T2 | Even positions after a keyframe non-discardable (TL0), odd positions discardable (TL1); RECOMMENDED for webcam and screen motion at 15 fps or more |
Video codec name (VideoPreference.decode, VideoStats) enum
| Value | Meaning |
|---|---|
vp8 | VP8 (mandatory) |
vp9 | VP9 profile 0 |
h264 | H.264 Constrained Baseline |
av1 | AV1 Main 8-bit |
video-dc/1 codec octet enum
| Value | Meaning |
|---|---|
0x00 | Reserved |
0x01 vp8 | One VP8 frame (RFC 6386); decode MUST, encode MUST; WebCodecs vp8 |
0x02 vp9 | One VP9 frame or superframe, profile 0 (8-bit 4:2:0); decode SHOULD, encode MAY; vp09.00.51.08 |
0x03 h264 | One access unit, Annex B, Constrained Baseline; decode SHOULD, encode MAY; avc1.42e033 |
0x04 av1 | One temporal unit, low-overhead bitstream format, Main profile 8-bit; decode SHOULD, encode MAY; av01.0.13M.08 |
0x05-0xFF | Reserved: receivers drop and count in codecUnsupported; senders MUST NOT use |
video-dc/1 flags enum
| Value | Meaning |
|---|---|
C (0x80) | Ciphertext: protected frame is SFrame ciphertext. MUST be 1 in secure calls, 0 in insecure calls (SM-11) |
K (0x40) | Keyframe; starts a new reference chain |
D (0x20) | Discardable: no later frame references it; MUST be 0 when K is 1 |
E (0x10) | End of source: last frame before the sender stopped the source |
0x0F | Reserved: send 0, receivers ignore, relays forward unchanged |
video-dc/1 message type (vt) enum
| Value | Meaning |
|---|---|
0x10 | Type 0, Fragment |
0x11-0x1F | Types 1-15 reserved; drop silently |
any other | Other versions; drop silently |
videoRoute (values owned by 15 §7.2) enum
| Value | Meaning |
|---|---|
dc | Video on video-dc/1 through the relay |
sfu | Video on sfu-rtp/1 through the SFU |
VideoStats route enum
| Value | Meaning |
|---|---|
relay | Via the relay |
sfu | Via the SFU |
Viewer state enum
| Value | Meaning |
|---|---|
normal | All frames forwarded |
thinned | Discardable frames dropped (half frame rate with L1T2) |
keyframes_only | Only keyframes forwarded (needKey) |
paused | Keyframe dropped for congestion; nothing forwarded until a keyframe fits; viewer sees a held picture. Unknown values are treated as paused. |
Webcam ladder enum
| Value | Meaning |
|---|---|
3 | 1280 × 720, 30 fps, budget 1,800, target 1,440 |
2 | 960 × 540, 30 fps, budget 1,000, target 800 (starting rung on desktop) |
1 | 640 × 360, 30 fps, budget 500, target 400 (starting rung on mobile; max while a screen share is active) |
0 | 320 × 180, 15 fps, budget 150, target 120 |
18 Media end-to-end encryption
EpochMediaState other
Local per-epoch key state of a device in a secure call. Never persisted to key archive, HistoryShare or backup.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Context group's group_id. includes generation (13 §4.1) |
epoch | integer | Yes | The epoch e. |
media epoch secret | bytes | Yes | sframe_epoch_secret(e). 16 octets; MLS-Exporter("SFrame 1.0 Base Key", "", 16) |
roster snapshot | array<object> | Yes | Leaf index, DSK (signature_key), DeviceCertificate did, IdentityCertificate canonical address; used for KID checks and attestation verification after MLS moves on. every non-blank leaf of epoch e, from that epoch's ratchet tree |
key cache | object | No | Derived sender_base_key, sframe_key, sframe_salt. optional, evictable |
replay state | ReplayState | Yes | §7 replay/attestation records. per KID |
installedAt | monotonic time | Yes | When installed. |
retention deadline | time | No | When it is erased (§6.6). T(x) + 10,000 ms |
FrameHashInput tls-record
Input to the frame hash: frame_hash = first 8 octets of SHA-256(FrameHashInput). Computed over bytes as sent/received; because a frame is encrypted once and forwarded unchanged, every receiver computes the sender's hash whatever route delivered it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
metadata | opaque<V> | Yes | The frame's SFrame metadata. voice-dc/1: 12-octet route header; video-dc/1: video frame header; sfu-rtp/1: SfuFrameMetadata encoding |
sframe_ciphertext | opaque<V> | Yes | SFrame header || encrypted data || tag. voice-dc/1: octets 12 to end; video-dc/1: reassembled ciphertext; sfu-rtp/1: X |
KID other
56-bit SFrame key ID: (joinNonce << 24) | (sourceId << 20) | (leaf_index << 4) | (epoch mod 16). context_id = (joinNonce << 4) | sourceId (36 bits). Bits 63-56 always 0. In JSON a decimal string (kid-string).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
joinNonce | uint32 | Yes | The encryptor instance's joinNonce. bits 55-24; (K >> 24) & 0xFFFFFFFF |
sourceId | sourceId | Yes | The media source. bits 23-20; (K >> 20) & 0xF; 4-15 reserved |
leaf_index | uint16 | Yes | Sender device's leaf index in the context group in the frame's epoch. bits 19-4; (K >> 4) & 0xFFFF; < 65,536 |
epoch residue | uint4 | Yes | Low 4 bits of the MLS epoch whose keys protect the frame. bits 3-0; K & 0xF |
MediaAttestation object
The d of a media.attestation control-channel message. Senders MUST NOT add other members; receivers ignore unknown members (unsigned). Serialized message at most 3,600 octets.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Format version. 1 |
callId | uuidv7 | Yes | The call's callId. lowercase hyphenated |
epoch | integer | Yes | MLS epoch of the KID's keys. low 4 bits = KID residue |
src | integer | Yes | KID's sourceId. 0-3 |
kid | string | Yes | The KID as a decimal string. kid-string |
first | integer | Yes | First counter. 0 to 2^32 - 1 |
last | integer | Yes | Last counter. first <= last <= first + 255; <= 2^32 - 1 |
hashes | base64url | Yes | Frame hashes. 8 x (last - first + 1) octets |
sig | base64url | Yes | Labelled signature. 64 octets |
Also described in 00 §6 HP-5.
MediaAttestationContent tls-record
Signed content of a MediaAttestation. sig = SignLabelled(DSK, "media-attest", content) = Ed25519-Sign(DSK, "sv1 sig" || 0x00 || "media-attest" || 0x00 || content). Signer identified by the KID's leaf, not a field.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | uint8 | Yes | Version. 1 |
group_id | opaque<V> | Yes | The context group's group_id (binds server, context, generation). UTF-8 (13 §4.1) |
epoch | uint64 | Yes | Full MLS epoch of the KID's keys. |
call_id | opaque[16] | Yes | The call's callId. 16-octet binary UUID (RFC 9562) |
kid | uint64 | Yes | The KID. |
first_counter | uint64 | Yes | First counter of the batch. |
last_counter | uint64 | Yes | Last counter of the batch. |
frame_hashes | opaque<V> | Yes | Frame hashes of the batch. 8 x (last_counter - first_counter + 1) octets, counter order |
MediaAttestationReportData object
data of a diagnostics report of kind media_attestation, sent with POST /v1/diagnostics (15 §14.3) to the call's hosting server. Carries no KID, counter, hash, nonce or key.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | media_attestation reason | Yes | Failure kind. invalid | mismatch | equivocation | unattested; server ignores unknown values |
senderPid | integer | Yes | pid whose stream was stopped, or to whose stream the invalid attestation was attributed. |
sourceId | integer | Yes | Source. 0-3 |
route | string | Yes | Route on which the stream's frames arrived at the time of failure. relay | sfu; server stores unknown as other |
playedUnverifiedMs | integer | Yes | Milliseconds of media of the stop list that were played. 0 for invalid |
stopsInCall | integer | Yes | Counted stops in this call so far, all streams. |
ReplayState other
Per (epoch, KID) receiver state inside an EpochMediaState.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
H | integer | No | Highest counter recorded under the KID. undefined before first |
Ha | integer | No | Highest attested counter. undefined before first attested frame |
record | array<object> | Yes | Per accepted counter: acceptance time (audio clock), frame hash, played flag, attested flag. counters c > H - 4096 |
Hstop | integer | No | Per KID of a stopped stream: H after the rollback at the latest stop (§9.8). Held with the stream's playback state; §7 does not list it. set on stop |
play floor | integer | No | Per KID of a stream: set to the current H on resume; frames at or below it are recorded and verified but never played (§9.8). Not listed in §7. set on resume |
SFrameCiphertext binary-frame
Output of SFrame encryption (RFC 9605 §4.2): SFrame header || AES-128-GCM encrypted data || 16-byte tag. AAD = header || metadata; nonce = sframe_salt XOR uint96(CTR). Overhead at most 29 bytes per frame per §3.2.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
header | SFrameHeader | Yes | Encodes KID and CTR. |
encrypted data | bytes | Yes | AES-128-GCM ciphertext of the frame. plaintext never empty |
tag | bytes | Yes | GCM authentication tag. 16 octets |
SFrameHeader binary-frame
RFC 9605 §4.3 SFrame header: config byte (X, K, Y, C) then KID bytes (if X = 1) then counter bytes (if Y = 1). Senders use minimal encoding; receivers accept any RFC 9605 encoding. Usually 8 to 12 bytes with the §4 KID layout.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
X | bit | Yes | 0: K holds the KID (KID < 8); 1: KID follows in K + 1 bytes, big-endian. bit 7 of config byte |
K | 3 bits | Yes | KID value (X = 0) or KID length minus 1 (X = 1). bits 6-4 |
Y | bit | Yes | 0: C holds the counter (< 8); 1: counter follows in C + 1 bytes. bit 3 |
C | 3 bits | Yes | Counter value (Y = 0) or counter length minus 1 (Y = 1). bits 2-0 |
kid-bytes | bytes | No | KID, big-endian. 0-8 octets; present only when X = 1; KID < 2^56 |
ctr-bytes | bytes | No | Counter (CTR), big-endian. 0-8 octets; present only when Y = 1; counter < 2^32 |
SfuFrameMetadata tls-record
SFrame metadata on the sfu-rtp/1 path (TLS presentation encoding, 04 §3.2). Authenticates the codec and the clear prefix. Never the bare clear prefix.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
version | uint8 | Yes | Structure version. 1; receiver treats any other value as invalid |
codec | SfuFrameMetadata codec | Yes | Binds the frame to its codec. uint8; 1 Opus, 2 VP8, 3 VP9; from the negotiated payload type |
clear_prefix | opaque<V> | Yes | The clear prefix octets. possibly empty; length per §8.4.2 |
SfuTransformedFrame binary-frame
Encoded frame data after the sender's encoded transform on sfu-rtp/1: P || X, where P is the codec's clear prefix (first p octets of the encoded frame) and X is the SFrame ciphertext of the rest.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
P | bytes | Yes | Clear prefix, readable by SFU/packetizer, authenticated via SfuFrameMetadata. p octets: Opus 0; VP8 10 (keyframe) or 3; VP9 0 |
X | SFrameCiphertext | Yes | SFrame ciphertext of the rest of the frame. plaintext B at least 1 octet |
StreamPlaybackState other
Receiver-local state per stream (pid, sourceId, joinNonce) of a secure call, plus a stop history per (pid, sourceId). Drives when a source is rendered (§9.8).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | Stream playback state | Yes | Whether the stream's frames reach the speakers or screen. playing | stopped; a new stream starts stopped if its (pid, sourceId) has a stop in the last 60 s that hasn't been withdrawn |
stop list | array<object> | No | Counter and frame hash of every frame of the stream that was played and isn't attested at the stop; used for withdrawal and late comparison. kept 5,000 ms after the stop |
Hstop | integer per KID | No | H after the rollback at the latest stop; a clean attestation must cover a frame accepted after the failure with a counter above it. absent for a new stream that starts stopped |
play floor | integer per KID | No | Frames at or below it are never played. set to H on resume |
stop history | array<object> | Yes | Drives the 3-counted-stops-per-60-s budget and whether new streams start stopped. per (pid, sourceId); stops in the last 60 s, each flagged counted or not; discarded only when the participant leaves the call |
VideoFrameHeader (requirements on 17) other
Requirements this document places on 17's video-dc/1 video frame header: fixed-length, identical in every fragment of a frame, used verbatim as SFrame metadata. The whole encoded frame is encrypted, then the SFrame ciphertext is fragmented. Per-fragment fields are outside the header and unauthenticated.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pid | integer | Yes | Sender's pid. |
sourceId | sourceId | Yes | Source. |
gen | integer | Yes | Stream generation. low 12 bits of the main encryptor instance's joinNonce |
frame number | integer | Yes | Per-stream frame number. per stream |
timestamp | integer | Yes | Capture timestamp (used by the freshness check). 90 kHz |
keyframe indication | flag | Yes | Whether the frame is a keyframe. |
C flag | flag | Yes | 1 = payload is an SFrame ciphertext. meaning of 16 §4.4 |
VoiceDcFrameMessage (secure) binary-frame
A voice-dc/1 frame message (16 §4.3) in a secure call: octets 0-11 are the route header with the C flag set (used verbatim as SFrame metadata), octets 12- are the SFrame ciphertext of exactly one Opus packet.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
route header | bytes | Yes | Cleartext routing header; the SFrame metadata (authenticated). octets 0-11; C flag = 1; defined by 16 |
SFrame ciphertext | SFrameCiphertext | Yes | Encrypted Opus packet. octets 12 to end |
Frame failure class enum
| Value | Meaning |
|---|---|
invalid | Dropped silently before/without decryption for structural or KID reasons; not treated as loss by the jitter buffer (§4.5). |
undecryptable | Tag failure, unknown epoch after hold, counter/freshness failure, or erased keys; treated as if never arrived, concealment covers it (§6.7). |
media_attestation reason enum
| Value | Meaning |
|---|---|
invalid | Attestation attributed to a stream whose signature doesn't verify; stops nothing. |
mismatch | playing -> stopped caused by a frame hash differing from a valid attestation. |
equivocation | playing -> stopped caused by two valid attestations with different hashes for one counter. |
unattested | playing -> stopped caused by the unattested limit, once counted, and only when at least the third counted stop in the call. |
media_attestation route enum
| Value | Meaning |
|---|---|
relay | Frames arrived via the relay. |
sfu | Frames arrived via the SFU. |
other | Server-side storage value for an unknown route. |
SFrame cipher suite enum
| Value | Meaning |
|---|---|
0x0004 | AES_128_GCM_SHA256_128; the only suite in sv1; no negotiation |
SfuFrameMetadata codec enum
| Value | Meaning |
|---|---|
1 | Opus (source 2 only); clear prefix 0 |
2 | VP8; clear prefix 10 octets for a keyframe (bit 0 of first octet = 0), 3 otherwise |
3 | VP9; clear prefix 0 |
0, 4-255 | Reserved |
Stream playback state enum
| Value | Meaning |
|---|---|
playing | Frames are rendered (subject to play floor). |
stopped | Frames still decrypted, recorded and verified but never rendered. |
19 Notifications and push
CollapseKey other
collapseKey = b64u(HMAC-SHA256(K_coll, "sv1 push collapse" || 0x00 || opaque(topic))[0..16]); topic = call:<callId> or rec:<record id>; K_coll is a 32-byte per-registration secret never disclosed; result 22 chars.
CommunityNotificationSettings object
Per-community (hosting server) settings.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Community server. read-only; from path |
level | enum Level | Yes | Level. default | mentions | nothing |
muteUntil | timestamp | null | Yes | Mute. <= 366 days ahead |
everyone | boolean | null | Yes | Override. null inherits |
updatedAt | timestamp | Yes | Last change. read-only |
ContextNotificationSettings object
Per-context settings keyed by (host, ctx).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Hosting server. read-only; from query |
ctx | string | Yes | Context ref. read-only; from path |
level | enum Level | Yes | Level. default | all | mentions | nothing; all only dm:/gdm: |
muteUntil | timestamp | null | Yes | Mute. <= 366 days ahead |
everyone | boolean | null | Yes | Override. null inherits |
calls | boolean | null | Yes | Override. DMs only; MUST be null for channels |
updatedAt | timestamp | Yes | Last change. read-only |
EventTicket other
Opaque bearer credential issued by a hosting server in notify.event; only GET {host}/v1/me/notifications/events for the listed items; 72 h; reusable; <= 30 req/min; server stores SHA-256(ticket) with (recipient, ctx, seqs, expiry).
EventTicketRef object
The ticket member of notify.event and NotificationRecord.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
token | string | Yes | Bearer event ticket. >= 128 random bits, base64url, <= 64 chars, MAY start with et_ |
expiresAt | timestamp | Yes | Expiry. 72 h after issue |
FetchToken other
Opaque bearer credential issued with a push registration; only GET /v1/me/notifications/{id} and POST /v1/me/notifications/read (ids) for that device. >= 128 random bits, base64url, <= 64 chars, optional pf_ prefix; expires 60 days after issue; server stores SHA-256.
GatewayPushRequest object
Body of POST {gatewayUrl}/v1/push.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pushes | array<PushRequest> | Yes | Pushes. 1-100; body <= 256 KiB |
GatewayRegisterRequest object
Body of POST {gatewayUrl}/v1/register.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
platform | enum GatewayPlatform | Yes | Platform. apns | apns_voip | fcm |
appId | string | Yes | App id. 1-255 chars |
environment | enum ApnsEnvironment | No | APNs env. apns/apns_voip only; production | development |
token | string | Yes | Platform token. <= 4,096 chars |
home | string | Yes | Home server. canonical domain |
NotificationEventPayload object
d of notification.created / notification.updated; reduced form {record: null, id, badge} for devices not in targets.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
record | NotificationRecord | null | Yes | Record. |
id | string | No | Record id. reduced payload only |
badge | integer | Yes | Badge. |
NotificationFetchResponse object
Response of GET /v1/me/notifications/{id}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
record | NotificationRecord | Yes | Record. |
badge | integer | Yes | Badge. |
display | object | Yes | Current previews setting. {previews} |
NotificationRecord object
Home server's stored record of one notification; its id is the push payload h.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Record id (= h). assigned by home server |
kind | enum NotificationKind | Yes | Kind. unknown -> generic 'New notification' |
state | enum RecordState | Yes | State. unknown -> read |
silent | boolean | Yes | Created without push/alerting. |
host | string | null | Yes | Hosting server. null for pairing_request, account_alert, test |
hostApi | string | null | Yes | Hosting server base URL as resolved by home server. null when host null |
ctx | string | null | Yes | Context. null when host null |
ctxKind | enum CtxKind | null | Yes | Context kind. as §5.2 |
ctxName | string | null | Yes | Context name. as §5.2 |
ctxAddr | string | null | Yes | Channel address. as §5.2 |
community | object | null | Yes | Community. as §5.2 |
security | enum Security | null | Yes | Mode. as §5.2 |
sender | AddressRef | webhook Sender | null | Yes | Sender. |
items | array<NotifyItem> | Yes | Items after processing. empty for kinds without items |
count | integer | Yes | Count. 0 for kinds without items |
otherSenders | integer | Yes | Other senders. 0 for kinds without items |
preview | Preview | null | Yes | Preview. after H6/H7; always null in secure contexts |
ticket | EventTicketRef | null | Yes | Event ticket. secure-context ticket only to enrolled devices; null after expiry |
call | RecordCall | null | Yes | Call state. call_ring and call_missed |
dmRequest | object | null | Yes | Request. {requestId}, dm_request |
pairing | object | null | Yes | Pairing. {pairingId}, pairing_request |
alert | object | null | Yes | Alert code. {code}, account_alert; W4a in v1 |
targets | array<string> | null | Yes | Targeted devices. device IDs; null = all devices |
eventAt | timestamp | Yes | at of latest underlying event. |
pushedAt | timestamp | null | Yes | First push handed off. |
createdAt | timestamp | Yes | Created. |
updatedAt | timestamp | Yes | Updated. |
NotificationSettings object
Global notification settings stored only at the home server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
enabled | boolean | Yes | Master switch. default true |
previews | enum Previews | Yes | Display level. default full; unknown -> sender_only |
channels | enum Level | Yes | Channel default. default mentions; mentions | nothing |
dms | enum Level | Yes | 1:1 DM default. default all; all | mentions | nothing |
groupDms | enum Level | Yes | Group DM default. default all; all | mentions | nothing |
everyone | boolean | Yes | Everyone mentions notify. default true |
calls | boolean | Yes | DM calls ring. default true |
version | integer | Yes | Version. read-only; +1 per change |
updatedAt | timestamp | null | Yes | Last change. read-only |
NotifiedEventsResponse object
Response of GET {host}/v1/me/notifications/events; items are event envelopes (00 §7.4) whose d is a Message (11 §5.2); in secure contexts carries sealed / edit.sealed and mention hint.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context. |
items | array<event envelope> | Yes | Events. seq order; current form |
readSeq | integer | Yes | Recipient readSeq. |
NotifyCall object
call member of notify.event: call_ring {callId, video, expiresAt}; call_ring_ended {callId, expiresAt, reason}.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | Call id. |
video | boolean | No | Video call. call_ring only |
expiresAt | timestamp | Yes | Ring expiry. the ring's RingTarget expiresAt (identifies the ring) |
reason | enum RingEndReason | No | End reason. call_ring_ended only; answered | declined | timeout | cancelled; unknown -> cancelled |
NotifyEventPayload object
The d of a notify.event (see events). Serialized notify.event (whole S2S event) MUST NOT exceed 8 KiB; sender drops oldest items then shortens ctxName and community.name to 64 scalar values.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
recipient | string | Yes | Recipient. canonical address |
kind | enum NotificationKind | Yes | Kind. |
host | string | Yes | Hosting server. = iss |
ctx | string | Yes | Context ref. |
ctxKind | enum CtxKind | Yes | Context kind. ch: channel, dm: direct, gdm: group |
ctxName | string | null | Yes | Display name. <= 100 scalar values; null for 1:1 or unnamed group |
ctxAddr | string | null | Yes | Channel address. channel only |
community | object | null | Yes | Community. {name: string}, channel only |
security | enum Security | Yes | Mode. unknown -> secure |
sender | AddressRef | webhook Sender | Yes | Sender. except withdrawn; names checked per 01 §6.4 |
at | timestamp | Yes | Latest trigger or ring start/end. |
items | array<NotifyItem> | No | Items. message kinds; 1-20; unique mid |
count | integer | No | Count. message kinds |
otherSenders | integer | No | Other senders. message kinds |
preview | Preview | null | No | Preview. absent == null; MUST be absent/null when secure |
ticket | EventTicketRef | No | Ticket. message kinds |
call | NotifyCall | No | Call. call kinds |
withdrawn | array<string> | No | Mids. 1-50 |
previewOnly | boolean | No | Preview-only withdrawal. default false |
NotifyItem object
One trigger inside notify.event / NotificationRecord items.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
seq | integer | Yes | Triggering event's seq. |
mid | string | Yes | Triggering entry. unique within items; edit entry mid for edit mentions |
kind | enum NotifyItemKind | Yes | Item's own kind. unknown -> dm_message |
sender | AddressRef | webhook Sender | Yes | Item sender. |
at | timestamp | Yes | Event timestamp. |
PlatformMessage other
Gateway-built APNs body / FCM HTTP v1 message per push type (§10.2): alert -> aps alert loc-key (RECOMMENDED SV_NOTIFICATION), mutable-content 1, sound default, sv payload; call -> APNs voip {sv}; background -> content-available 1; FCM data-only {sv: payload string}, priority HIGH/NORMAL, ttl.
Preview object
Insecure-context preview of the latest triggering message.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
text | string | Yes | Preview text. <= 140 Unicode scalar values; mention/channel tokens replaced by names; line breaks -> single spaces; truncated text ends with U+2026; empty text -> empty string |
attachments | integer | Yes | Attachment count. >= 0 |
PushKey other
Gateway-private sealed form of a platform token bound to (platform, appId, environment, token, home), fresh nonce, key-id for rotation. RECOMMENDED: "pk1." || b64u(keyId(1) || nonce(12) || AES-256-GCM(K_gw[keyId], nonce, plaintext, aad="pk1")), plaintext = struct { uint8 platform; opaque appId<V>; uint8 environment; opaque token<V>; opaque home<V>; uint64 issuedAt; }.
PushPayload other
The opaque push payload {"v":1,"h":<record id>,"r":<registration id>}, serialized in exactly one form: no whitespace, members in order, always 93 octets.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Payload version. 1 |
h | uuidv7 | Yes | NotificationRecord id. lowercase hyphenated |
r | uuidv7 | Yes | PushRegistration id. lowercase hyphenated |
Also described in 00 §6 HP-9, §4.9.
PushRegistration object
A device's registration of one push channel at its home server.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Registration id (= r). assigned by home server |
did | string | Yes | Device. read-only; calling device |
transport | enum Transport | Yes | Transport. gateway | webpush |
types | array<PushType> | Yes | Accepted push types. non-empty; webpush no background; apns_voip keys [call]; apns keys alert, background; fcm any |
gatewayUrl | string | No | Gateway. gateway only; normalized base URL no trailing slash |
pushKey | string | No | Push key. gateway only; 1-1,024 unreserved chars |
webPush | WebPushSubscription | No | Subscription. webpush only |
vapidKey | string | No | applicationServerKey. webpush only |
state | enum RegistrationState | Yes | Health. read-only; active | failing; unknown -> failing |
lastDeliveredAt | timestamp | null | Yes | Last accepted push. read-only |
lastError | string | null | Yes | Last error code. read-only |
createdAt | timestamp | Yes | Created. read-only |
updatedAt | timestamp | Yes | Updated. read-only |
fetchToken | string | No | Fetch token. only in responses that issue one; never from GET |
fetchTokenExpiresAt | timestamp | Yes | Current fetch token expiry. read-only |
PushRequest object
One push in a gateway batch.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pushKey | string | Yes | From registration. |
type | enum PushType | Yes | Push type. unknown -> rejected push.type_unsupported |
payload | PushPayload | Yes | Payload. gateway checks serialized <= 256 octets, passes unchanged |
ttlMs | integer | Yes | Lifetime. 0-86,400,000; 0 = now or never |
urgency | enum Urgency | Yes | Urgency. high | normal; unknown -> normal |
collapseKey | string | No | Collapse key. 1-64 base64url chars |
PushResult object
Per-push result from the gateway.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
status | enum PushResultStatus | Yes | Outcome. accepted | gone | rejected | deferred; unknown -> deferred |
error | problem object (03 §10.1) | No | Error. with gone, rejected; MAY with deferred |
retryAfterMs | integer | No | Retry hint. with deferred |
RecordCall object
call member of a NotificationRecord.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | Call. |
video | boolean | Yes | Video. false when built from call_ring_ended |
expiresAt | timestamp | Yes | Ring expiry. |
state | enum RingState | Yes | Ring state. ringing | ended; unknown -> ended |
endReason | enum RingEndReason | null | Yes | End reason. null while ringing; unknown -> cancelled |
endedAt | timestamp | null | Yes | End time. null while ringing |
sv-push+jwt jws
Request-bound JWS a home server presents to a gateway. Header exactly {alg: EdDSA, typ: sv-push+jwt, kid: <home domain>#<keyId>}; serialized <= 4,096 octets; new token (new jti) per attempt.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
iss | string | Yes | Issuer. home canonical domain; = kid domain part |
aud | string | Yes | Gateway base URL. normalize(gatewayUrl) (06 §8.3); root gateway gives trailing / |
htm | string | Yes | Method. POST |
htu | string | Yes | Target URI. normalize(gatewayUrl + /v1/push), never appended to aud |
bh | base64url | Yes | Body hash. SHA-256 of request content |
iat | integer | Yes | Issued at. NumericDate |
exp | integer | Yes | Expiry. iat < exp <= iat + 60 |
jti | base64url | Yes | Token id. >= 16 random octets; single use |
VapidJwt jws
RFC 8292 VAPID JWT, ES256 with the private key of endpoints.push.webPushKey; aud = origin of endpoint; exp <= 12 h ahead; sub = home server base URL (https).
WebPushMessage binary-frame
RFC 8291 aes128gcm encryption of the 93-octet payload: fresh ephemeral P-256 key and 16-octet salt, record size 4,096, one record; 196 octets (86 header + 93 payload + 1 delimiter + 16 tag).
WebPushSubscription object
webPush member of a PushRegistration, from the browser's PushSubscription.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
endpoint | string (https URL) | Yes | Push service endpoint. <= 2,048 octets; public unicast address check |
p256dh | base64url | Yes | UA public key. 65-octet uncompressed P-256 point |
auth | base64url | Yes | Auth secret. 16 octets |
ApnsEnvironment enum
| Value | Meaning |
|---|---|
production | |
development | APNs sandbox |
CtxKind enum
| Value | Meaning |
|---|---|
channel | ch: prefix |
direct | dm: prefix (1:1 DM) |
group | gdm: prefix (group DM) |
GatewayPlatform enum
| Value | Meaning |
|---|---|
apns | APNs alert and background (call delivered as alert) |
apns_voip | PushKit; only call |
fcm | All three types |
Level enum
| Value | Meaning |
|---|---|
default | Inherit (community and context only) |
all | Every message; DMs and group DMs only (global dms/groupDms, context dm:/gdm:) |
mentions | Only mentions; default for unknown stored values |
nothing | No notifications |
NotificationKind enum
| Value | Meaning |
|---|---|
mention | Hosting server; in notify.event; record; alert; coalesced |
reply | Hosting server, insecure contexts; alert; coalesced |
mention_all | Hosting server; alert; coalesced |
dm_message | Hosting server, or home server for auto-accepted dm.request; alert; coalesced |
call_ring | Hosting server (15); record; push type call (alert for device w/o call registration); not coalesced |
call_ring_ended | Hosting server; no record of its own, updates call_ring and may create call_missed; background or alert |
withdrawn | Hosting server; updates records; background |
call_missed | Home-local; alert |
dm_request | Home-local (12 §8.4); alert |
pairing_request | Home-local (08 §6); targeted at enrolled devices; alert |
account_alert | Home-local (07 §15.2); alert {code}, W4a in v1; alert |
test | Home-local (§9.4); one registration; alert |
NotificationWindowState enum
| Value | Meaning |
|---|---|
idle | No window |
open | Within 30 s window with pending list and deadline |
NotifyEventValidationResult enum
| Value | Meaning |
|---|---|
accepted | V9 |
ignored | V4 unknown kind, V8 unknown recipient or legitimacy failure |
rejected | V1-V3, V5-V7 with error code |
NotifyItemKind (priority order) enum
| Value | Meaning |
|---|---|
mention | highest priority |
reply | |
mention_all | |
dm_message | lowest; default for unknown |
Previews enum
| Value | Meaning |
|---|---|
full | Sender, context and message text (default) |
sender_only | Sender and context, never text; default for unknown |
none | Only New message / Incoming call |
PushResultStatus enum
| Value | Meaning |
|---|---|
accepted | Platform accepted; set lastDeliveredAt |
gone | push.token_gone; delete registration |
rejected | Permanent; counts toward failing |
deferred | Temporary; retry; default for unknown |
PushType enum
| Value | Meaning |
|---|---|
alert | Visible notification; urgency high; ttl 24 h |
call | Ring (PushKit / high-priority); ttl until ring expiry, >= 1,000 ms |
background | Silent sync; urgency normal; ttl 1 h; never Web Push |
RecordState enum
| Value | Meaning |
|---|---|
unread | Not yet seen; counts toward badge unless silent |
read | Opened, read past, or subject resolved; unknown -> read |
dismissed | Cleared from tray without opening |
withdrawn | All referenced messages deleted/expired; terminal |
RegistrationInvalidReason enum
| Value | Meaning |
|---|---|
transport | |
types | |
gateway_url | |
push_key | |
endpoint | |
keys |
RegistrationRemovedReason enum
| Value | Meaning |
|---|---|
gone | Platform says token invalid |
rejected | 3 consecutive rejections, 7 days failing, no types left, or old VAPID key past 90 days |
gateway_not_allowed | listed policy no longer includes the gateway |
RegistrationState enum
| Value | Meaning |
|---|---|
active | |
failing | After a rejected push; unknown -> failing |
RingState enum
| Value | Meaning |
|---|---|
ringing | |
ended | default for unknown |
Security enum
| Value | Meaning |
|---|---|
insecure | Insecure context |
secure | Secure context; unknown values treated as secure |
SettingsOutcome enum
| Value | Meaning |
|---|---|
drop | Store nothing |
silent | Store silent record, no push |
notify | Store record and deliver |
SettingsScope enum
| Value | Meaning |
|---|---|
global | |
community | |
context |
Transport enum
| Value | Meaning |
|---|---|
gateway | APNs/FCM via push gateway |
webpush | RFC 8030 Web Push (browsers, UnifiedPush) |
Urgency enum
| Value | Meaning |
|---|---|
high | |
normal | default for unknown at gateway |
20 Client behaviour and user experience
CopyText other
Grammar for reference text with placeholders: copy-text = 1*( copy-literal / placeholder ); copy-literal = 1*( %x20-7A / %x7C / %x7E-10FFFF ); placeholder = "{" ph-name "}"; ph-name = LCALPHA *( LCALPHA / DIGIT / "_" ). Fields list the defined placeholders.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
{person} | string | No | Person reference: display name if it passes the receiver check, else prepared local part, plus bot badge for bots §2.4; bidi-isolated |
{personForm} | string | No | The person's display form (01 §6.6) always with the domain |
{person2} | string | No | A second person reference (K8, §5) §2.4 |
{people} | string | No | A list of person references formatted by §2.5 |
{channel} | string | No | Channel display name channel-kind glyph (§15.5) prefixed in visual text, nothing in spoken text |
{context} | string | No | {channel} for a channel, {person} for a 1:1 DM, or the group DM's name |
{community} | string | No | The community's name (09), or its canonical domain if it has none |
{domain} | string | No | A canonical domain displayed per 01 §4.3; each use says which server's; before discovery has a canonical domain, the domain as typed after domain preparation |
{host} | string | No | Canonical domain of the context's hosting server |
{me} | string | No | The user's own display form |
{address} | string | No | A display form that isn't yet an account's (name being chosen, §9.3) |
{local} | string | No | The user's own prepared local part (01) |
{client} | string | No | An OAuth client's client_name (05 §5.4) only on the server's 'Continue to …' page |
{targetForm} | string | No | Display form of the target a typed address or link resolves to (§15.6) |
{device} | string | No | A device's name from its device record or DeviceSummary (05, 08), e.g. 'Chrome · Windows' fallback: platform label of §12.11 |
{provider} | string | No | Sign-in provider's display name from ServerMetadata auth.providers |
{providerLabel} | string | No | Provider account label from 05 (providerLabel, typically an e-mail) shown only to the account's own user |
{code} | string | No | A 6-digit pairing code (08) grouped form NNN NNN |
{size} | string | No | A byte size ('25 MB') locale format, binary units |
{instance} | string | No | The instance member of a problem object (RFC 9457) when present |
{origin} | string | No | The web client's own origin HTML serialization, host displayed per 01 §4.3 |
{link} | string | No | A share link or sloppyv URI generated by §10.4 |
{n} | integer | No | An integer locale-formatted; CLDR plural rules |
{time} | string | No | Local time locale format; each use names its source |
{date} | string | No | Local date locale format; each use names its source |
{key} | string | No | Name of the user's push-to-talk control, e.g. 'Space' or 'Mouse 4' |
DeviceLocalUiState other
Client state this document requires to be device-local (not in the AccountVault) (§2.7, §20.1). Field names other than afterBlock are descriptive, not wire names.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
afterBlock | boolean | — | Set when a moderator/server block or timeout forced a self-mute (PD-20-7); selects MI.after_moderator cleared on unmute, call end, or mode change to ptt |
rendered changeId set | array<string> | — | W2 changeIds whose system line this device already inserted |
collapsed banners | object | — | W3/W7 collapsed or expanded per context |
hints shown | object | — | Which one-time hints were shown |
link intent | LinkIntent | — | Pending link (§10.1) 24 h |
Problem reports | ProblemReportsSetting | — | Diagnostics consent (§17) default failures |
microphone mode | string | — | vad / ptt / open_mic default vad (PD-20-5) |
W4 alerts raised | object | — | W4a–W4d already raised (for W4d, the dids alerted) device-local own-identity state (07 §18.4) |
W1 device-local record | array<string> | — | Communities W1 was shown for memory only on shared-computer devices; merged into w1_seen on enrolment |
Security activity | array<object> | — | This device's W4 events, newest first kept 90 days |
sent reports list | array<object> | — | 'See what was sent' list of uploaded diagnostics last 30 days |
LinkIntent other
Device-local record stored when a link is opened by a user not signed in on this device; one at a time; expires after 24 h; resumes at §10.1 step 1 after sign-in or sign-up.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
target | string | — | The canonical link target canonical |
inviteCode | string | — | The invite code from the link (fills inviteCode under registration: invite without asking) |
time | timestamp | — | When the intent was stored expires after 24 h |
SurfaceLogLine other
One line of the surface log (PD-20-1) that Full and Web clients MUST be able to produce in test or debug builds: one line per surface shown, removed or changed. ABNF: log-line = mono-ms SP action SP surface-id [ SP ctx-ref ] LF. Never contains message content, keys or recovery words; never uploaded.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mono-ms | string | Yes | Monotonic milliseconds since the log started 1*15DIGIT |
action | SurfaceLogAction | Yes | What happened to the surface; change = variant data changed without the ID changing "show" / "change" / "remove" |
surface-id | string | Yes | Surface ID (§2.6, §20.2) id-part ( "." id-part ); id-part = 1( ALPHA / DIGIT / "_" ) |
ctx-ref | string | No | A context reference (00 §7.6), 'call:' + call ID, 'pid=' + participant index, or 'me' 1*( %x21-7E ) |
W1SeenSetting object
The AccountVault settings record w1_seen (08 §8.6.4), owned by 20: canonical domains of communities for which W1 has been shown. Merge = set union, order of the version merged into, other version's new entries appended; entries past the record size limit dropped from the end.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
value | array<string> | — | Communities for which W1 has been shown canonical domains, in order added, no duplicates, entries never removed; must fit the home server's maxVaultRecordBytes (08 §16) — once full, the device adds nothing more to the vault record and records further domains only device-locally |
WebReleaseManifest object
Web release manifest at /sloppyv-release.json on the web client's origin (PD-20-6, SHOULD). The About screen shows the version and the SHA-256 of the manifest's exact bytes; that hash only identifies the release the origin claims to serve and is never called a verification.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Product name at most 64 characters |
version | string | Yes | Release version at most 32 characters |
source | string | Yes | Source repository https URL |
revision | string | Yes | Exact source revision e.g. a 40-character Git commit ID |
builder | string | No | Identifier of the build environment e.g. a container image digest |
files | object | Yes | File digests keys are paths beginning with '/'; values 'sha384-' + standard base64 SHA-384 of the file, as in SRI; covers every file the origin serves for the release |
createdAt | timestamp | Yes | Creation time RFC 3339 |
AddressInvalidReasonPresentation enum
| Value | Meaning |
|---|---|
empty | “Type a name.” |
too_long | “That name is too long.” |
too_short | “That name is too short.” |
disallowed_code_point, unstable, invalid_utf8 | “Names can only use letters, numbers and spaces.” |
restricted_code_point | “That character can't be used in names.” |
unassigned | “That character isn't supported yet. Updating the app may help.” |
leading_mark | “Names can't start with an accent.” |
no_letter | “Names need at least one letter.” |
too_many_marks, repeated_mark, confusable_mark | “That name has too many accents.” |
mixed_script | “Use letters from one alphabet.” |
mixed_digits | “Use one kind of digits.” |
bidi_rule | “That mix of right-to-left letters and numbers isn't allowed.” |
contains_at | “Type only your name, without @ and the server.” |
AddressLookupAvailabilityPresentation enum
| Value | Meaning |
|---|---|
404, available: true | “{address} is available” with a check mark |
404, taken | “That name is taken. …” |
404, reserved | “That name is reserved. Try another one.” |
404, too_similar | “That name looks too much like one that's already taken. Try another one.” |
404, not_allowed with minChars | “Names here need at least {n} letters or numbers.” |
404, not_allowed otherwise | “That name isn't allowed here. Try another one.” |
410 address.deleted | “That name was used recently and can't be taken yet.” |
200 (exists) | “That name is taken. …” |
lookup failed (network, 5xx) | “Can't check right now. You can still try.” |
CallEndSurface enum
| Value | Meaning |
|---|---|
ST.call_end.ended | call.ended completed/context_closed/channel_deleted/unknown, empty (except voice-channel rejoin), relay.closing call_ended, call.not_active: “The call ended.” |
ST.call_end.dm | dm.closed, dm.encryption_pending: “This conversation can't take calls right now.” |
ST.call_end.unanswered | unanswered: “No answer.” + “Ring again” |
ST.call_end.declined | declined: “{person} declined the call.” (1:1) / “Nobody answered.” (group) |
ST.call_end.downgraded | security_downgraded: “The call ended because {person} turned off encryption.”; no auto-rejoin |
ST.call_end.moved | call.moved with sameCall true; relay.closing moved: “Your call moved to {device}.” |
ST.call_end.moved_other | call.moved with sameCall false: “You joined another call on {device}.” |
ST.call_end.elsewhere | call.already_in_call (terminal): “You're in this call on {device}.” + “Move here”, or “You're in a call on {device}.” |
ST.call_end.removed | Seat removed with removed: “You were removed from the call.” |
ST.call_end.revoked | Seat removed with revoked: “This device was disconnected from the call.” |
ST.call_end.start_fresh | Left to start fresh: “You left the call to start fresh with new encryption keys.” |
ST.call_end.encryption_off | Left to turn off encryption: “You left the call to turn off encryption.” |
ST.call_end.forbidden | core.forbidden, core.not_found, call.rejoin_invalid, any other 4xx: “You can't rejoin this call.” |
ST.call_end.gate | security.* during rejoin: G1/G2 in the call view |
ST.call_end.w9 | W9 raised for the context: W9 |
ST.call_end.full | call.full at first join: “This call is full.” |
CallStatusSurface enum
| Value | Meaning |
|---|---|
ST.call_reconnecting.0 | 0–15 s since drop: “Reconnecting…” |
ST.call_reconnecting.15 | 15–60 s: “Still reconnecting. Check your internet connection.” |
ST.call_reconnecting.60 | After 60 s (fresh joins): “Trying to get you back into the call…” |
ST.call_reestablishing | From call.ended security_upgraded/group_restarted or relay.closing call_restarted until new call's first lease tick: “Setting up the call again…” |
ST.ptt_unobservable | PTT control unobservable: “Push-to-talk works only while this window is active.” (desktop) / “… while this tab is open and in front.” (web) |
BADGE.reconnecting | Another participant still reconnecting 2,000 ms after the update: looping-arrows badge, 'Reconnecting…' on hover |
CommunityModerationStatus enum
| Value | Meaning |
|---|---|
ST.pending_approval | member.pending: “Waiting for approval” + “Cancel request” |
ST.invite_required | community.invite_required: “You need an invite to join this community.” |
ST.closed | community.closed: “This community isn't taking new members.” |
ST.rules | community.rules_acceptance_required: rules + “Agree and join” |
ST.removed | Kick or ban: “You were removed from {community}.” / “You've been banned from {community}.” |
ST.timed_out | “You can't send messages until {time}.” |
ST.new_member | moderation.new_member_restricted: “New members can do this after {n} minutes.” |
ST.request_card | Message request card; actions Accept, Decline, Block, Report and block |
ST.group_remove | Remove from group rules (owner, or ownerless group and active participant) |
ST.report_disclosure | 10's disclosure lines |
ST.insecure_bot | “This bot can't join encrypted channels. Its owner needs to turn on encryption for it.” |
ST.would_downgrade | security.would_downgrade: “{people} hasn't/haven't turned on encryption, so they can't join this encrypted group.” + “Start a new group without encryption” |
ST.downgrade_forbidden | “Encrypted channels can't be switched back. To have an unencrypted channel, create a new one.” |
ST.push_not_allowed | gateway_not_allowed: “{domain} doesn't send notifications to this app. You'll see new messages when you open it.” |
HELP.push_test | Test push didn't arrive |
ST.notification_settings | Notification settings copy (previews full/sender_only/none) |
ST.mention_hints | Mention-hints setting explanation |
HELP.community_metadata | Community metadata visible even when encrypted |
HELP.secure_channel_creator | “You'll need to turn on encryption to open this channel.” |
ST.provider_down | “{provider} sign-in isn't working right now. Try another way to sign in.” |
ST.report_item.* | 10 §10.8 evidence labels, neutral |
DiscoveryAndConnectionStatus enum
| Value | Meaning |
|---|---|
ST.server_not_found | discovery.not_found, discovery.invalid_domain: “There's no Sloppy Voice server at {domain}. Check the spelling.” |
ST.domain_not_served | discovery.domain_not_served: “{domain} doesn't host that address.” |
ST.server_misconfigured | discovery.record_invalid, delegation_conflict, metadata_invalid, canonical_mismatch, version_unsupported: “{domain} isn't set up correctly right now.” + contact link if contact.admin known |
ST.server_unreachable | Every other discovery error incl. discovery.peer_suspended, discovery.forbidden_target: “{domain} can't be reached right now. We'll keep trying.” |
ST.host_unreachable | Remote channel host not answering: header “{domain} isn't responding. Your messages will be sent when it's back.”; message “Waiting for {domain}” |
ST.host_unreachable.dm | DM host not answering: “Waiting to send — the server for this chat isn't reachable right now. Your messages will send automatically.” |
ST.home_unreachable | Home server not answering; also identity key not named in IdentityState after self-started sign-in: “Your server ({domain}) isn't responding. You can keep chatting where you're already connected.” |
ST.session_extension | federation.extension_limit, federation.issuer_unreachable: “Can't confirm your account with {domain}. Reconnecting when it's back.” |
ST.join_waiting_home | federation.home_unreachable / secure join refused while extended: “Waiting for your server ({domain}) before you can join. This will continue by itself.” |
ST.federation_blocked | federation.blocked: “Your server doesn't connect with {domain}.” |
ST.offline | “You're offline. Messages will be sent when you're back online.” |
ST.socket_reconnecting | Event WebSocket not ready > 5 s: “Reconnecting…” |
ST.other_window | Socket replaced again within 60 s of a silent reconnect: “Sloppy Voice is open in another window.” + “Use this window” |
ST.admin_peer_suspended | Admin view of a suspended peer (02 §10.5) |
GateErrorMapping enum
| Value | Meaning |
|---|---|
security.account_required | userAction enable_encryption → G1 |
security.upgrade_required (remote server) | enable_encryption → G1 |
security.upgrade_required (home server) or account state upgrade_required | enable_encryption → blocking screen §4.4 |
security.device_not_enrolled | set_up_device → G2 |
(no request) secure context known unopenable | G1 or G2 directly without sending the request; G1 always wins over G2 for insecure accounts |
InviteErrorPresentation enum
| Value | Meaning |
|---|---|
invite.not_found | “This invite link doesn't work. Ask for a new one.” |
invite.expired | “This invite has expired. Ask for a new one.” |
invite.used_up | “This invite has been used up. Ask for a new one.” |
invite.revoked | “This invite was cancelled. Ask for a new one.” |
410 on address lookup (ST.address_gone) | “This address is no longer in use.” |
domain/alias no longer resolves (ST.link_broken) | “This link no longer works. Ask for a new one.” |
JoinPreviewPrimaryAction enum
| Value | Meaning |
|---|---|
1 | Community closed: no action; ST.closed |
2 | joinPolicy invite, no valid invite: no action; “You need an invite to join this community.” |
3 | Secure target, insecure account: “Turn on encryption and join” (or “Turn on encryption and ask to join” with joinPolicy request) |
4 | Secure channel target, secure account, unenrolled device: “Set up this device and join” |
5 | joinPolicy request, no invite: “Ask to join”, then “Waiting for approval” + “Cancel request” |
6 | Anything else: “Join” (“Open” for existing community member opening a channel link) |
LockState enum
| Value | Meaning |
|---|---|
closed | Closed lock, 'End-to-end encrypted'. SM-12 holds: advertised secure by hosting server, client's evaluation agrees, device group state member (13 §16); for a call also SFrame keys for the media epoch. Surface LOCK.closed |
gated | Outline closed lock, 'Encrypted'. Secure context this account/device can't open (G1 or G2). Only in lists, previews, gate card; never next to content (PD-20-8). Surface LOCK.gated |
pending | No glyph, 'Joining…' or 'Setting up encryption…'. Secure, device may open it, SM-12 doesn't hold yet. Label only after 1 s when following closed. Surface LOCK.pending |
open | Open lock, 'Not encrypted'. Insecure context, viewer's account secure. Surface LOCK.open |
none | Nothing shown. Insecure context, insecure viewer account. Surface LOCK.none |
error | Broken lock, 'Encryption problem'. W9 active. Surface LOCK.error |
MuteIndicatorSurface enum
| Value | Meaning |
|---|---|
MI.moderator | 1. B (audioBlockedBy) is muted_for_everyone or server_muted: button disabled, “Muted by a moderator” |
MI.timeout | 2. B is timed_out: disabled, “Timed out until {time}” |
MI.permission | 3. B is no_permission: disabled, “You can't talk in this channel” |
MI.blocked | 4. B is other or unknown: disabled, “You can't talk here right now” |
MI.after_moderator | 5. userMuted and afterBlock: “You can talk again. Tap to unmute.” (desktop 'Click to unmute') |
MI.rejoin | 6. userMuted and muteReason = rejoin: “You were reconnected and muted. Tap to unmute.” |
MI.interruption | 7. userMuted and muteReason = interruption: “Muted after another app used your microphone. Tap to unmute.” |
MI.user | 8. userMuted, any other reason: “Muted” |
MI.unmuted | 9. Otherwise: not muted, no text |
NeverPromptEvent enum
| Value | Meaning |
|---|---|
NP-1 | MLS joins/leaves/epoch changes: only member list, K6 (own join), membership system lines, W6 (bot), W4b (own address) |
NP-2 | Another user adds/removes a device: nothing |
NP-3 | Another user's reset/downgrade in a channel: nothing |
NP-4 | Media key rotation/epoch switches: only TI.*, SHARE.not_seen.keys, CAM.not_seen.keys while gate really closed |
NP-5 | Route changes between relay and SFU (15 §7.3): nothing (a Connection details screen the user opens MAY show the route); TalkState stays transmitting while PTT is held and routeUp stays true |
NP-6 | Reconnects/auto-rejoins: only TI., MI., ST.call_reconnecting., ST.call_reestablishing, ST.socket_reconnecting, ST.other_window, BADGE.reconnecting, SHARE., CAM., VIEW. |
NP-7 | History restore / shared messages: only K4, K7, ST.history_unavailable |
NP-8 | Vault/key-archive sync: no surface from the sync itself |
NP-9 | KeyPackage publication: nothing |
NP-10 | Bot key handling: no W6 on bot reset |
NP-11 | Server key rotation: nothing |
NP-12 | Silent credential-check failures in channels: diagnostic report only |
NP-13 | MediaAttestation failures: stream stops, no surface or tile label |
NP-14 | Discovery pin conflicts, delegation, federation renewals: only unreachable status lines |
NP-15 | Item decryption failures, MLS blocked: only ST.* |
NP-16 | Display name failing receiver check: local part shown, no surface |
NP-17 | Pairing session ended elsewhere: remove M5.approver_prompt, nothing else |
NP-18 | Someone joins/re-added to a secure context: no HSHARE., no K on others' devices |
OnboardingState enum
| Value | Meaning |
|---|---|
server | 'Where is your account?' (ONB.server) |
provider | Sign in with a provider (M1) |
name | 'Choose your name' (M2), on signupRequired |
device_setup | Device-setup chooser as full screen with 'Skip for now' |
blocking_upgrade | §4.4 'Turn on encryption to continue' / 'One more step' |
home | Home screen or pending link intent |
PlatformLabel enum
| Value | Meaning |
|---|---|
desktop | “Computer” |
web | “Web browser” |
ios | “iPhone or iPad” |
android | “Android device” |
bot | “Bot” |
unknown | “Device” |
ProblemReportsSetting enum
| Value | Meaning |
|---|---|
off | “Off” — “Don't send problem reports.” Nothing uploaded to /v1/diagnostics; queued reports discarded |
failures | Default (D-089). “Problems only (recommended)” — “Send a report when a call fails or keeps dropping, or an encryption check fails.” |
full | “Problems and call summaries” — “Also send a short summary after every call.” |
SecuritySurfaceCatalogue enum
| Value | Meaning |
|---|---|
W1 | Secure account entering an insecure community. Inline card 'This community isn't end-to-end encrypted'; once per community via w1_seen; never blocks (D-076) |
W2.key_changed | Pinned DM contact's security key changed (pin changed). Non-blocking. Line + banner; 'Verify', 'OK' |
W2.verified | Verified contact's key changed (verified_blocked). Blocks sending in secure DMs; 'Accept new key', 'Verify'; no dismiss |
W2.downgraded | Contact turned off encryption (downgraded). Non-blocking; 'OK' |
W2.downgraded_verified | Verified contact turned off encryption (downgraded_blocked). Blocks; 'Continue without encryption' |
W2.new_account | Address now belongs to a new account (D-086). 1:1 DM only, every device, secure or not; never blocks; no Verify; no bot wording |
W3 | Insecure group DM with insecure participants, seen by secure viewer. Banner; 'Ask them to turn on encryption' (fills composer, never sends); 'Hide' |
W4a.reset | Own encryption reset from another device. System alert; 'This wasn't me', 'Set up this device', 'Later' |
W4a.downgraded | Encryption turned off for own account. System alert; 'This wasn't me', 'It was me' |
W4b | Someone else using your address (07 §18.2). System alert; once per (context, identity key, did) per device |
W4c | New device added to your account. Notice fading after 10 s or navigation, whichever is later |
W4d | New sign-in to your account (05 §12.12, D-084); also for insecure accounts; notice; never OS notification/sound/badge |
W5.channel | Admin confirmation modal for channel encryption upgrade |
W5.server | Admin confirmation modal for server-wide upgrade; requires typing the domain (PD-20-3) |
W6.channel | Secure bot joined a secure channel (system line) |
W6.group | Secure bot joined a secure group DM (system line) |
W6.direct | Secure 1:1 DM with a bot starts (system line) |
W7 | Insecure 1:1 DM: secure viewer, insecure peer; also encryption_pending. Banner, no action, 'Hide' |
W8.badge | Recovery key not saved: dot on Settings and Encryption row, 'Not saved' |
W8.banner | 'Save your recovery key' banner on home screen, at most once per 7 days per account |
W9.channel | Secure channel presented as insecure; blocks; no dismiss |
W9.community | Secure community presented as insecure; blocks all channels |
W9.group | Pinned secure group DM presented as insecure (12 §11.1) |
G1.channel / G1.community / G1.needs_encryption / G1.call / G1.dm | Gate card: turn on encryption (insecure account at a secure door); each with .other_origin suffix under §16.11 |
G2 | Gate card: set up encryption on this device (unenrolled device) |
G2.other_origin | G2 on a web origin not allowed to hold this account's keys (§16.11) |
K1–K8, K8.self | Timeline markers (see TimelineMarker) |
SignedOutLine enum
| Value | Meaning |
|---|---|
signed_out | No line |
signed_out_elsewhere | “This device was signed out from another device at {time}.” (+ “This wasn't me” if W4a not raised) |
removed, lost_or_stolen | “This device was removed from your account at {time}.” (+ “This wasn't me” if W4a not raised) |
shared_expired, inactive | “You were signed out because this device wasn't used for a while.” |
account_deleted | “This account was deleted.” |
admin | “Your server's administrator signed this device out.” |
other | “You were signed out.” (surface ID ST.signed_out.other) |
SignupErrorPresentation enum
| Value | Meaning |
|---|---|
address.taken | “That name is taken. Try adding something, like a number or your last name.” |
address.reserved | “That name is reserved. Try another one.” |
address.too_similar (data.field local) | “That name looks too much like one that's already taken. Try another one.” |
address.too_similar (data.field name, editors only) | “That name looks too much like another name here. Try writing it differently.” |
address.quarantined | 410 address.deleted row: “That name was used recently and can't be taken yet.” |
address.not_allowed (reason too_short) | “Names here need at least {n} letters or numbers.” ({n} = data.minChars) |
address.not_allowed (blocked/other) | “That name isn't allowed here. Try another one.” |
address.invalid_local_part | Row for its data.reason (see AddressInvalidReasonPresentation) |
address.display_name_mismatch | “Names can only use letters, numbers and spaces.” |
auth.invite_required / auth.invite_invalid | Under invite field: “That invite code doesn't work. Check it or ask for a new one.” |
auth.terms_not_accepted | Focus terms checkbox: “Tick this box to continue.” |
auth.registration_closed | data.reason provider: “No account on {domain} uses this {provider} account ({providerLabel}).” + “Use a different sign-in” (prompt=select_account); server/unknown: “{domain} isn't taking new accounts right now.” |
auth.signup_token_invalid | “Sign-in took too long. Try again.”; restart login, keep typed name |
auth.identity_already_linked | No text; restart login (signs in to the created account) |
network/5xx | “Can't create your account right now. Try again.” |
201 with account.name ≠ typed name | “Your name will be shown as {local} for now. You can change how it's written in Settings.” |
SurfaceIdPrefix enum
| Value | Meaning |
|---|---|
W1–W9 (with variants) | Warnings |
G1.*, G2, G2.other_origin | Gate cards (.other_origin suffix under §16.11) |
K1–K8, K8.self | Timeline markers |
LOCK.* | Lock indicator states |
TI.*, MI.* | Talk and mute indicators |
BADGE.reconnecting | Reconnecting badge on others' tiles |
SHARE.*, CAM.*, VIEW.* | Sharing, camera, viewer surfaces |
ST.* | Status lines |
HELP.* | Help texts |
HINT.encrypt_peer, HINT.backup_signin, HINT.vad_first_call, HINT.muted_speaking | One-time hints |
HSHARE.* | Manual history sharing |
M1.continue, M1.reauth, M4.progress, M4.save, M4.saved_confirm, M5.approver_prompt, M5.denied, M10 | Moment screens |
SETUP.chooser, SETUP.pair_new, SETUP.pair_add, SETUP.pair_add.joined, SETUP.pair_add.confirm, SETUP.recovery, SETUP.verify, SETUP.banner | Device setup screens |
SECURITY.account | Account security screen |
ONB.<state> | Onboarding screens |
SurfaceKind enum
| Value | Meaning |
|---|---|
Modal dialog | Interrupts; dismissed only through its buttons. W5, M10, downgrade confirmation, HSHARE.confirm |
System alert | Interrupts once; app-wide alert area; only its actions dismiss (M5 prompt also disappears when its pairing session ends). W4a, W4b, M5 approver prompt |
Notice | Interrupts once; fades by itself. W4c, W4d |
Banner | Pinned at top of one context below header. W2, W3, W7, W8, SETUP.banner |
Inline card | No interruption; not dismissable; action resolves it. W1, G1, G2, W9 error |
System line | Centred non-message timeline line; no sender/avatar. K1–K8, W2 timeline line, W6 |
Badge | W8 settings badge |
Passive state | Lock indicator, talk and mute indicators, reconnecting badge, status lines |
SurfaceLogAction enum
| Value | Meaning |
|---|---|
show | Surface shown |
change | Shown surface's variant data changed without its ID changing (e.g. W3 naming one more person) |
remove | Surface removed |
TalkIndicatorSurface enum
| Value | Meaning |
|---|---|
TI.transmitting | (transmitting, —): “Talking”; filled mic in accent colour, animated ring — only state allowed this presentation |
TI.not_heard.reconnecting | (not_heard, reconnecting): “Reconnecting — you're not being heard” |
TI.not_heard.connecting | (not_heard, connecting): “Connecting — you're not being heard” |
TI.not_heard.keys | (not_heard, waiting_for_keys): “Securing the call — you're not being heard” |
TI.not_heard.muted | (not_heard, muted): “You're muted — you're not being heard” + “Unmute” |
TI.not_heard.moderator | (not_heard, not_allowed), blockedBy muted_for_everyone or server_muted: “Muted by a moderator — you're not being heard” |
TI.not_heard.timeout | (not_heard, not_allowed), blockedBy timed_out: “You're timed out — you're not being heard” |
TI.not_heard.permission | (not_heard, not_allowed), blockedBy no_permission: “You can't talk in this channel — you're not being heard” |
TI.not_heard.other | (not_heard, not_allowed), blockedBy other/unknown/absent: “You can't talk here right now — you're not being heard” |
TI.not_heard.mic | (not_heard, no_microphone): “Your microphone isn't working — you're not being heard” + “Check microphone” |
TI.not_heard | Unknown state or reason: “You're not being heard” |
TI.idle | (idle, null): ptt “Hold {key} to talk” / “Hold to talk”; vad or open_mic no text |
TI.idle.listening | (idle, not_allowed): “Listening only” + reason |
TI.idle.connecting | (idle, connecting): “Connecting…” |
TI.idle.reconnecting | (idle, reconnecting): “Reconnecting…” |
TI.muted | (muted, any): no talk text; mute indicator explains |
(off) | No indicator |
TimelineContentStatus enum
| Value | Meaning |
|---|---|
ST.history_unavailable | Items unavailable or keys not arrived after 10 min: “Earlier messages aren't available on this device.” |
ST.message_invalid | Item invalid: “This message can't be shown.” |
ST.message_pending | pending_key / pending_sender: placeholder “Loading…” |
ST.file_failed | “This file couldn't be opened.” + “Try again” |
ST.file_too_large | Over maxAttachmentBytes: “This file is too large. Files here can be up to {size}.” |
ST.not_sent | Outbox failed: “Not sent” + “Retry”, “Delete” + 11 §13.5 reason |
ST.waiting.server | waiting_for_server: uses ST.host_unreachable(.dm) |
ST.waiting.keys | waiting_for_keys: “Getting encryption ready…” |
ST.waiting.action | waiting_for_action: “Will send when you're ready” |
ST.deleted_by_mod | “Message removed by a moderator” |
ST.edited | “(edited)” |
ST.deleted_account | Author shown as “Deleted account”, address hidden |
ST.group_full | mls.group_full: “This channel is full. Try again later.” / “This group is full. Try again later.” |
ST.context_unavailable | MLS blocked: “Can't connect to this chat right now. We'll keep trying.”; composer disabled |
ST.dm_setting_up | DM upgrading: “Setting up encryption…” |
ST.dm_waiting_readd | Awaiting re-add after own reset: “Waiting for {person}'s app to come online to continue this encrypted chat.” |
ST.dm_paused | 1:1 DM closed reason banned: “This conversation is read-only for now.” |
ST.retention | “Messages here are deleted after {n} days. People in the channel can still keep copies.” |
TimelineMarker enum
| Value | Meaning |
|---|---|
K1 | “Messages from here on are end-to-end encrypted.” Closed lock; at channel.security_changed (upgradeSeq + 1) or dm.security_changed to secure |
K2 | “Messages from here on aren't end-to-end encrypted.” Open lock; at dm.security_changed to insecure (1:1 only) and start of an insecure successor after K5 |
K3 | “Sent before encryption was turned on.” Open lock; above earliest pre-upgrade message in an upgraded channel, sticky while any seq ≤ upgradeSeq is on screen; not shown if pre-upgrade history deleted |
K4 | “Loading earlier messages…” Spinner; while keys for served items still arrive (own new device archive, shared messages); never blocks; never for own join |
K5 | “This conversation moved.” Arrow; at dm.closed reason host_secure between closed DM and successor |
K6 | “Earlier messages are end-to-end encrypted and aren't available to people who join later.” Closed lock; before item at MessagePage withheldBeforeSeq when non-null; plain statement, not a warning |
K7 | “{person} shared earlier messages with you.” History icon; above earliest shared message, one per share |
K8 | “{person} shared earlier messages with {person2}.” At the seq of history.shared for every member except the recipient |
K8.self | “You shared earlier messages with {person2}.” On the sharer's own devices |
Also described in 00 §4.12.3.
UserActionPresentation enum
| Value | Meaning |
|---|---|
none | Action's own failure text, else “That didn't work.” |
retry | “That didn't work.” + “Try again” |
wait | After 2 s: “Waiting for {domain}…” |
sign_in | After silent recovery fails: sign-in screen titled “Sign in again to {domain}” |
enable_encryption | G1 |
set_up_device | G2 |
update_app | Full screen “Update Sloppy Voice” / “{domain} needs a newer version of this app.” / “Update” |
contact_admin | “Only the people who run {domain} can fix this.” + ServerMetadata contact link + “Reference: {instance}” |
UxMoment enum
| Value | Meaning |
|---|---|
M1 | OAuth consent (§9.2) |
M2 | Choosing an address (§9.3) |
M3 | OS permission prompts (§6.1) |
M4 | Turning on encryption and saving the recovery key (§9.5) |
M5 | Approving a new device (§12.3, §12.4) |
M6 | A contact's key changed — W2 (§3.2) |
M7 | Secure account entering insecure community — W1 (§3.1) |
M8 | Insecure account at a secure door — G1 (§4.2) |
M9 | Admin upgrading a channel or server — W5 (§3.5) |
M10 | Every device and the recovery key lost — 'Start fresh' (§12.8) |
M11 | Waiting for history on own new device or for shared messages — K4 (§5) |
Also described in 00 §4.12.4.
WebHardeningRequirement enum
| Value | Meaning |
|---|---|
WH-1 | MUST: strict CSP of §16.2 on every HTML document and every script and worker response |
WH-2 | MUST: no inline script, no eval, no third-party script origins |
WH-3 | MUST: SRI on every script/stylesheet loaded by markup; integrity-checked dedicated worker loading |
WH-4 | MUST (except where SHOULD): response headers of §16.3 |
WH-5 | SHOULD separate origin from API base URL; MUST separate from user-content origins |
WH-6 | SHOULD: reproducible builds and release manifest |
WH-7 | MUST: no third-party analytics, advertising, fonts, CDNs or error reporting |
WH-8 | MUST: Trusted Types enforced; content never rendered as HTML |
WH-9 | MUST: service worker restrictions of §16.6 |
WH-10 | MUST: identity and vault keys only on an origin allowed by §16.11 |
21 Deployment and operations
CallControlMetrics other
RECOMMENDED metric names for call control, plus federation and key metrics.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sv_callctl_snapshot_interval_seconds | histogram | No | Gap between consecutive snapshots of one call. MUST stay within 0.9–1.1 s (15 §4.3) |
sv_callctl_revocation_push_seconds | histogram | No | From a list-changing decision to writing the snapshot to the link. SHOULD be <= 0.1 s, MUST be <= 0.5 s |
sv_callctl_snapshot_ack_seconds | histogram | No | From sending a snapshot to its ack. |
sv_callctl_relay_failovers_total | counter | No | Failovers of §6.9.3. |
sv_callctl_relay_unavailable_total | counter | No | Joins refused with call.relay_unavailable. |
sv_callctl_calls | gauge | No | Active calls. by state |
sv_callctl_seats | gauge | No | Active seats. by state |
sv_fed_queue_depth | gauge | No | Federation queue depth. labels: lane |
sv_fed_oldest_event_age_seconds | gauge | No | Oldest queued federation event age. labels: lane |
sv_fed_revocation_fanout_seconds | histogram | No | Revocation fan-out time. against the 10 s target of 06 §11.3 |
sv_fed_peers_suspended | gauge | No | Suspended peers. |
sv_keys_active_expiry_seconds | gauge | No | Time to the active key's exp; alert with the key-expiry rule of §9.2. labels: purpose |
CallStatsEntry object
Entry of relayctl.call_stats calls.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | string | Yes | The call. |
videoPairs | integer | Yes | Number of (viewer, source) pairs for sources 1 and 3 the relay currently serves (17 §8.2). |
videoPairsDegraded | integer | Yes | How many of them are in a viewer state other than normal. |
RelayCapacity object
capacity member of relayctl.hello: what the operator configured the node to carry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
maxSessions | integer | Yes | Maximum sessions. >= 1 |
maxEgressKbps | integer | Yes | Maximum egress bandwidth. >= 1 |
RelayControlMessage object
Frame of the sloppyv-relay-control.v1 binding: one UTF-8 text WebSocket frame holding one I-JSON object of at most 1 MiB. Receivers ignore unknown members and messages of unknown t; binary frames are a protocol error (close 1003).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Binding frame version. 1; any other value -> close 4026 |
t | string | Yes | Message type. relayctl.* type from §6.3 |
id | uuidv7 | Yes | ID of this message. 00 §7.6 |
re | string | No | On replies: the id being answered. |
ts | timestamp | Yes | Sender's clock at sending. Informative; no rule depends on it. RFC 3339 with milliseconds |
d | object | Yes | Payload, defined in §6.4 and §6.5. |
RelayCredential other
Secret a relay node presents (Authorization: Bearer) to open a control link. Random value of at least 128 bits, base64url (ABNF credential = 22*86( ALPHA / DIGIT / "-" / "_" )), issued by the operator for one (relay node, issuer) pair. Call control stores only a SHA-256 hash, compares in constant time, and MUST accept at least two credentials per relay node at a time for rotation.
RelayMetrics other
RECOMMENDED OpenMetrics names a relay SHOULD export. Labels MUST NOT include addresses, device IDs, pids, callIds, IP addresses or anything identifying a person; issuer and the enumerated reason, result and channel labels are allowed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sv_relay_sessions | gauge | No | Open sessions. labels: issuer |
sv_relay_calls | gauge | No | Open calls. labels: issuer |
sv_relay_connect_total | counter | No | /connect outcomes. labels: issuer, result (ok, ticket_invalid, ticket_expired, ticket_replayed, wrong_relay, call_unknown, bad_offer, overloaded) |
sv_relay_forwarded_total | counter | No | Messages forwarded, per recipient. labels: channel (audio, video, control) |
sv_relay_dropped_total | counter | No | Messages dropped. labels: reason (not_covered, snapshot_stale, pid_mismatch, mode_mismatch, malformed, inbound_cap, queue_full, too_late, video_congestion, video_need_key, video_expired) |
sv_relay_ingress_bytes_total | counter | No | Payload bytes in. |
sv_relay_egress_bytes_total | counter | No | Payload bytes out. |
sv_relay_tick_delay_seconds | histogram | No | From snapshot receipt to call.tick written to the last session. 15 §4.4 asks for <= 50 ms |
sv_relay_calls_stale | gauge | No | Calls whose newest snapshot is 3 s old or more. labels: issuer |
sv_relay_session_down_total | counter | No | Session-down reports. labels: reason (§6.5.2 reasons) |
sv_relay_control_link_up | gauge | No | 1 when the link is linked. labels: issuer |
SecurityJournal other
Append-only record kept outside the main database with at least the durability and separation of the server keys (write-once object store, append-only file on the key-service host, or the key service). Each append MUST be durable before the server acknowledges the change or sends any event about it. MUST hold: server and channel security upgrades with securedAt and upgradeSeq; every IdentityState signed whose content changed (as the signed JWS, with its DeviceCertificates, ver and igen); account deletions and account-state changes; the MLS group-generation high-water mark of every context; the server key state of §8.1 item 3 unless the key service holds it. SHOULD hold bans, federation blocks and policy changes, and admin role grants/removals. Kept at least as long as the oldest restorable backup; never holds content.
SnapshotAck object
Entry of relayctl.ack acks. A snapshot counts as acknowledged when an ack has result applied and seq >= the snapshot's seq, or stale with heldSeq >= it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | string | Yes | The call. |
seq | integer | Yes | seq of the snapshot processed. |
result | SnapshotAckResult | Yes | Processing result. applied | stale | unknown_call | invalid; unknown treated as invalid by call control |
heldSeq | integer|null | Yes | seq of the snapshot the relay holds after processing. null if the relay holds no snapshot |
CallCloseReason enum
| Value | Meaning |
|---|---|
ended | Call ended for a terminal reason (any but security_upgraded, group_restarted, server_restart); relay sends relay.closing call_ended. |
restarted | Call ended with security_upgraded or group_restarted and a new call replaces it; relay sends relay.closing call_restarted. |
migrated | Call now lives on another relay; relay sends relay.closing drain, retryAfterMs 0. |
lost | Call control lost state and ended it with server_restart; relay sends relay.closing timeout. |
unknown | Call control has no record (after resync); relay sends relay.closing timeout. Unknown reasons are treated as unknown. |
DeploymentProfile enum
| Value | Meaning |
|---|---|
S | One self-hosted binary (family, club, small community). |
M | Scaled multi-node (tens of thousands of accounts, several regions). |
E | Edge/CDN deployment (one option, e.g. Cloudflare), relay still on ordinary compute. |
H | Hosting provider with many tenant servers. |
FederationLane enum
| Value | Meaning |
|---|---|
high | Revocations, deletions, call rings. |
normal | Everything else. |
RelayControlCloseCode enum
| Value | Meaning |
|---|---|
1000 | Normal close (call control stopping the link cleanly); relay reconnects with the §6.8 schedule. |
1001 | Going away (shutdown or drain finished); reconnect with the §6.8 schedule. |
1003 | Binary frame received; log the bug; reconnect with the §6.8 schedule. |
4001 | Authentication failed after the handshake (credential revoked); stop retrying; alert the operator. |
4003 | Forbidden (URLs not allowed, relay disabled, wrong or duplicate issuer); stop retrying; alert the operator. |
4008 | Heartbeat or handshake timeout; reconnect at once, then with the §6.8 schedule. |
4009 | Replaced by a newer link from the same relayId; don't reconnect this link. |
4026 | Unsupported binding version; stop retrying; alert the operator. |
RelayLinkStateControlSide enum
| Value | Meaning |
|---|---|
linked | Link up; -> suspect on socket close/reset, no pong for 3,000 ms, no write accepted for 3,000 ms, or no keys_ack within 2,000 ms. |
suspect | No new calls assigned; relink within 1,000 ms of t0 -> resynchronise and linked; else fail over every call -> failed. |
failed | Calls failed over; on relink, resynchronise with call_close (migrated) for every moved call -> linked. |
RelayLinkStateRelaySide enum
| Value | Meaning |
|---|---|
connecting | Handshaking or retrying; -> linked on welcome. |
linked | Link up; -> lost after 3,000 ms without a message from control or on socket close. |
lost | Keeps sessions and calls of the issuer, retries; after 30 s closes every session of the issuer's calls without relay.closing and frees the calls. |
RelayProfile enum
| Value | Meaning |
|---|---|
voice-dc/1 | Voice over data channels (16). |
video-dc/1 | Video over data channels through the relay (17). |
RelaySessionCloseReason enum
| Value | Meaning |
|---|---|
left | relay.closing reason (15 §6.6); e.g. sent when a participant leaves (21 §6.13). |
removed | relay.closing reason (15 §6.6). |
revoked | relay.closing reason (15 §6.6); also sent by call control when relayctl.session_up doesn't match a seat (§6.5.1). |
moved | relay.closing reason (15 §6.6); used for Move voice here (RC-5). |
switched | relay.closing reason (15 §6.6). |
call_ended | relay.closing reason (15 §6.6); what the relay sends for call_close reason ended. Terminal: clients leave for good (§6.4.7). |
call_restarted | Used for the seat removals of a call that ended with security_upgraded or group_restarted (§6.4.5); also sent for call_close reason restarted. |
session_expired | relay.closing reason (15 §6.6). |
drain | Sent with retryAfterMs 0 for relayctl.call_drain, call_close reason migrated, and sessions closed after a key revocation (§6.4.6, §6.4.7, §6.7 rule 4). |
timeout | Sent for call_close reasons lost and unknown; not terminal (§6.4.7). |
overloaded | relay.closing reason (15 §6.6). |
RelayState enum
| Value | Meaning |
|---|---|
accepting | May receive new calls. |
full | Keep existing calls, assign no new ones. Unknown values are treated as full. |
draining | Migrate existing calls away (§6.9). |
SessionDownReason enum
| Value | Meaning |
|---|---|
client_gone | 10 s without any packet from the client (15 §6.7 rule 3); seat -> reconnecting. |
transport_closed | ICE failed, or DTLS/SCTP closed; seat -> reconnecting. Unknown reasons treated as this. |
overloaded | Relay shed the session under load; seat -> reconnecting; consider the relay full. |
relay_shutdown | Relay stopping without a drain; seat -> reconnecting. |
drain_deadline | Closed at the call_drain deadline; seat -> reconnecting unless already moved. |
key_revoked | Ticket signed by a since-revoked key (§6.7 rule 4); migration-window rule of §6.9.3. |
replaced | A newer session for the same (callId, pid) replaced this one; no seat change. |
instructed | After relayctl.session_close; no action. |
SnapshotAckResult enum
| Value | Meaning |
|---|---|
applied | Snapshot applied and emitted as call.tick. |
stale | seq <= held seq and the held snapshot was received less than 3,000 ms ago; ignored. |
unknown_call | Call not open on this link; call control sends call_open and the newest snapshot. |
invalid | Breaks 15 §4.2 rules; relay keeps its current snapshot; call control records an error and resends the newest snapshot with a higher seq. Unknown results are treated as invalid. |
22 Security considerations and threat model
MetadataExposureRow other
Documentation record (not a wire object): one row MX-n of the §7.1 metadata exposure table for secure contexts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
# | string | Yes | Row ID MX-1..MX-29, MX-31..MX-38 |
Item | string | Yes | Metadata item |
Hosting server | MetadataObserverMark | Yes | Visibility to hosting server Y | P | – |
Home server (of the user) | MetadataObserverMark | Yes | Visibility to the user's home server Y | P | – |
Relay / SFU | MetadataObserverMark | Yes | Visibility to media plane Y | P | – |
Push gateway and provider | MetadataObserverMark | Yes | Visibility to push Y | P | – |
Members | MetadataObserverMark | Yes | Visibility to other members of the context Y | P | – |
Network | MetadataObserverMark | Yes | Visibility to ADV-NET Y | P | – |
Public | MetadataObserverMark | Yes | Visibility to anyone without an account Y | P | – |
Mitigation and notes | string | Yes | Mitigations |
Owner | string | Yes | Owning documents doc numbers |
ResidualRiskEntry other
Documentation record (not a wire object): one row of the §8.2 residual-risk register. Other documents cite it by RR-n ID; it is the only place a risk is 'accepted' (PD-22-3).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ID | string | Yes | Stable risk ID RR-n; stable and never reused (§8.2). The register lists RR-1 to RR-4 and RR-7 to RR-55; RR-35 is marked Withdrawn |
Risk, stated plainly | string | Yes | Plain-language statement of the risk |
Exploited by | string | Yes | Adversary or adversary combination ADV-* IDs or a plain party |
Modes | string | Yes | Modes affected Insecure / Secure channel / Secure DM / Calls / All etc. |
Status and source | RegisterStatus | Yes | Acceptance status and where it was accepted Accepted (owner) | Accepted (D-nnn) | Accepted (document §) | Open | Withdrawn |
Mitigations | string | Yes | What reduces the risk |
Owners | string | Yes | Documents that own the mechanisms document numbers |
SecurityChecklistItem other
Documentation record (not a wire object): one item of the §13 implementer checklist. Restates a requirement of its owning document; the force is that of the owning document, which governs.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ID | string | Yes | Stable checklist ID SC-A1..A11, SC-S1..S15, SC-S20..S46, SC-M1..M3, SC-M5..M7, SC-C1..C34, SC-W1..W5, SC-B1, SC-P1, SC-O1..O8 |
Requirement | string | Yes | Restated requirement |
Applies to | string | No | Which implementations it applies to conformance classes of 00 §1.5; present only in §13.1 and §13.7 tables |
Normative source | string | Yes | Owning sections doc § references |
AdversaryId enum
| Value | Meaning |
|---|---|
ADV-NET | Network attacker: reads, drops, delays, replays, injects packets; can't break TLS 1.2+, DTLS or 04 primitives |
ADV-DNS | DNS attacker: controls DNS answers a verifier sees; can't forge DNSSEC |
ADV-REG | Domain registration holder: controls a server domain's registration, DNS (incl. DNSSEC) and gets legitimate certificates |
ADV-HOME | Malicious or compromised home server for its own accounts |
ADV-HOST | Malicious or compromised hosting server for contexts it hosts (sequencing, storage, MLS DS and channel AS, call control, moderation, relays, SFU) |
ADV-MEDIA | Malicious relay or SFU: controls the media plane, may forge lease ticks, holds no MLS secrets |
ADV-PUSH | Push gateway or push provider: sees, drops, delays, replays pushes; knows installations and timing |
ADV-OIDC | OIDC provider takeover: can pass a login, and so fresh authentication, as the victim |
ADV-DEV | Stolen or lost device with stored tokens and keys, subject to platform protection at rest |
ADV-TOK | Token thief: holds bearer credentials (AS-9) but not the device, keys or provider login |
ADV-MEM | Malicious member of a context with a conforming or modified client |
ADV-BOT | Malicious bot operator: holds the bot token and, for a secure bot, its keys |
ADV-WEB | Compromised web origin: can serve any code from the origin serving a web client |
ADV-PEER | Malicious federation peer: any other server |
ADV-QC | Future quantum attacker: records now, later breaks X25519 and Ed25519 |
AnalysedMode enum
| Value | Meaning |
|---|---|
Insecure | Any insecure context: insecure channels, insecure 1:1 DMs and group DMs, and their calls. Confidentiality rests on TLS and DTLS hop by hop (D-021). Owners 00 §5.1, 11, 12 |
Secure channel | A secure channel on any server, including every channel of a secure server. MLS group, SealedMessage, server-validated identity (D-035). Owners 09, 13, 14 |
Secure DM | A secure 1:1 DM or secure group DM. MLS group with sv_participants, SealedMessage, client-validated identity with pins (D-036, HP-2). Owners 12, 13, 14, 07 |
Calls | Calls in any context; a call has the mode of its context (SM-11). Insecure: DTLS only. Secure: SFrame keyed from MLS plus MediaAttestation (D-041 to D-043). Routes: the hosting server's relay and SFU, in every context (D-094). Owners 15 to 18 |
AssetId enum
| Value | Meaning |
|---|---|
AS-1 | Message content: text, formatting, edits, reaction values, replies |
AS-2 | Attachments and their names |
AS-3 | Live media: voice, screen video, screen and application sound, webcam |
AS-4 | History keys K_hist(e), the key archive, and per-message keys in manual history shares |
AS-5 | The identity key |
AS-6 | DSKs (one per device, never exported) |
AS-7 | Vault keys and the AccountVault |
AS-8 | Recovery phrase and KeyBackup |
AS-9 | Session credentials: access and refresh tokens, remote session tokens, bot tokens, fetch tokens, event tickets, rejoin tokens, RelayTickets |
AS-10 | Linked provider logins |
AS-11 | Server keys (sign, mls-external-sender), relay-control credentials, VAPID keys |
AS-12 | Membership and identity bindings: rosters, sv_participants, pins, verification state |
AS-13 | Metadata: who talks to whom, when, how much, from where |
AS-14 | IP addresses: seen by every server, relay and SFU a client connects to; never by other clients (D-094) |
AS-15 | Availability |
AS-16 | The secure state of contexts |
AS-17 | Push tokens and push keys |
ConsistencyFinding enum
| Value | Meaning |
|---|---|
X-1 | Partly resolved; open: make S2 a MUST (OQ-22-2). Hosting-server fabrication of another server's user detected only by diagnostics |
X-2 | Resolved: relay+member media injection bound stated consistently |
X-3 | Resolved by D-082: revoked device reads nothing new only if removed as lost/stolen |
X-4 | Resolved: audiences include community-list servers |
X-5 | Resolved (revised D-007): re-added DM participant gets nothing pre-re-add |
X-6 | Resolved: SM-4 records event tickets and needs_encryption pre-upgrade reads as exceptions |
X-7 | Open (Lead): 00 §4.7 Matrix E says only participants hear secure channel calls; every member can (RR-44) |
X-8 | Resolved (revised D-007) |
X-9 | Resolved by D-085: turning on encryption needs provider sign-in within 24 h |
X-10 | Resolved (revised D-007): since_join removed |
X-11 | Open (Lead): 00 HP-5 should say 'on honest paths' for lease-based cut-off (RR-12) |
X-12 | Resolved: MediaAttestations travel on every relay connection, with the attestations of SFU-routed sources on the relay (18 §9.6, D-080) |
X-13 | Resolved: W4b covers channel, DM, group DM rosters and unlisted devices |
X-14 | Resolved: gated outline lock for insecure accounts |
X-15 | Resolved by D-081: same-site evidence restricted |
X-16 | Resolved: 05 transaction cookie authorizes nothing |
X-17 | Resolved: HP-9 uses 12 §4.3, dm.encryption_pending |
X-18 | Open (Lead): 07 §22.12 clock warning vs 04/20 |
X-19 | Resolved by D-086: account incarnation inc |
X-20 | Open (Lead): 07 should keep previously accepted keys per pin (RR-37) |
X-21 | Open (Lead): after lossy restore, devices should re-register/re-upload when they see older igen/KeyBackup/vault generation |
X-22 | Partly resolved; open (Lead): 00 §5.2 Home server 'Can never' cell wording |
X-23 | Open (Lead): 00 HP-8 canonicalize() lacks the resolve-back check (PD-02-3) |
X-24 | Resolved: token may follow a move the client's own pin accepts |
X-25 | Resolved by D-079: OAuth form bodies are the only non-JSON bodies besides attachments and consent form |
DetectionKind enum
ForbiddenClaim enum
| Value | Meaning |
|---|---|
NC-1 | 'The server can't see who you talk to' or 'can't see when you talk' (§7) |
NC-2 | An insecure (unlocked) context is private from its server, or 'not encrypted' only means 'not encrypted between devices' (RR-3) |
NC-3 | A channel lock protects against the community's server or a member's home server (RR-2) |
NC-4 | Members are told when another member's identity changes in a channel (D-035) |
NC-5 | Messages are deniable, or 'can't be used as proof' (RR-22, PD-22-1) |
NC-6 | Deleting removes a message from everyone's devices, or retention guarantees erasure (RR-27, RR-26) |
NC-7 | An encrypted channel or group chat is protected if a member's device is later compromised; or a later joiner can never see earlier messages (RR-7, RR-55; D-007) |
NC-8 | 'Delete messages sent before encryption' removes them from server backups (RR-46) |
NC-9 | The web app is as safe as the native app, or the release manifest hash on About verifies the running code (RR-4, 20 §16.7) |
NC-10 | The server that hosts a call can't see who is in it, who speaks when, or the participants' internet addresses (§7 MX-24, MX-25, MX-29; D-094) |
NC-11 | Bots in encrypted contexts can't read messages (D-061, W6) |
NC-12 | Reported encrypted messages stay encrypted (D-077) |
NC-13 | A verified contact can never be impersonated, or verification protects channels (07 §16) |
NC-14 | Sloppy Voice is anonymous (§9.3) |
NC-15 | Encrypted calls are protected against eavesdropping by every member, or only people visibly in a call can hear it (RR-44) |
MetadataItemId enum
| Value | Meaning |
|---|---|
MX-1 | Context membership and roster, device counts, join/leave times |
MX-2 | Context names, topics, rules, settings, group DM names |
MX-3 | Each member's accountSecurity and needs_encryption |
MX-4 | Who sends each entry, from which device (did), and when |
MX-5 | Entry kind and, for operations, the target message |
MX-6 | Padded content size (256-byte buckets) |
MX-7 | Attachment count and padded sizes |
MX-8 | Reply structure (encrypted; members only) |
MX-9 | Mention hints and mentionAll |
MX-10 | Typing, read positions |
MX-11 | Presence and custom status |
MX-12 | Session subscriptions, levels, foreground state |
MX-13 | MLS handshake metadata |
MX-14 | Manual history shares (VisibilityGrants) |
MX-15 | KeyPackage claims |
MX-16 | DM index and message requests |
MX-17 | Notification records |
MX-18 | Push timing and push type per installation |
MX-19 | Vault shape and write times |
MX-20 | Public identity: secure or not, device count, platforms, enrolment and revocation times |
MX-21 | Device IDs (did) identical everywhere |
MX-22 | Audiences (servers that received a HomeAssertion) |
MX-23 | Community list |
MX-24 | Call participation and ringing |
MX-25 | Who speaks when, loss reports |
MX-26 | Who shares/watches which source, frame sizes, keyframe flags, codec, VP8 picture size, layer IDs |
MX-27 | KID leaf index, epoch residue, attestation timing |
MX-28 | Media bitrates, quality, diagnostics counters |
MX-29 | IP addresses of connecting clients (hosting server, home server, relay/SFU, network; never other call participants, D-094) |
MX-31 | DTLS certificate fingerprints |
MX-32 | DNS queries for _sloppyv names; /v1/resolve queries |
MX-33 | Address existence and kind |
MX-34 | Reported content and context messages (plaintext to moderators) |
MX-35 | sigHash of author-deleted secure messages |
MX-36 | Event tickets and the ciphertext they unlock |
MX-37 | The OIDC login: provider, sign-in times, client identity |
MX-38 | Client software name and version |
MetadataObserverMark enum
| Value | Meaning |
|---|---|
Y | The observer sees the item in normal operation |
P | Partially (the cell's note or Mitigation column says how) |
– | No |
RegisterStatus enum
| Value | Meaning |
|---|---|
Accepted (owner) | Accepted by the owner |
Accepted (D-nnn) | Accepted through a logged decision |
Accepted (document §) | An owning document accepts it within its scope, written with that section, e.g. 'Accepted (04 §18 item 3)' |
Open | A pending question could change it |
Withdrawn | Used for RR-35 (not listed among the §8.2 status values); its ID stays reserved because RR-* IDs are stable and never reused |
ResidualRiskId enum
| Value | Meaning |
|---|---|
RR-1 | Hijacked provider login replaces or removes the user's identity at once; silent for channel members; group DM clients re-add after W2; no earlier content (D-007); signed-out devices learn only when next opened. Accepted (owner, D-071) |
RR-2 | Channels trust the hosting server for membership and home server for keys; malicious ones add members or replace keys unnoticed; fabricated users of other servers caught by diagnostics only. Accepted (owner requirement, D-035); fabrication part Open (X-1, OQ-22-2) |
RR-3 | Insecure contexts fully readable and forgeable by servers handling them. Accepted (owner, D-021) |
RR-4 | Compromised web origin takes keys of every secure user who loads it; can phish recovery key or run 'Start fresh'; with no links.web any origin may hold keys. Accepted (D-065) |
RR-7 | Content keys don't expire: one compromised member device or vault exposes all history that member can read. Accepted (owner, D-007, D-054) |
RR-8 | First contact with cross-site non-DNSSEC delegation is TOFU; also same-site when another party holds a host in the registrable domain; mis-issued certificate defeats same-site, wellknown and pinning. Accepted (D-074) |
RR-9 | DM identity pins are trust on first use. Accepted (owner requirement for DMs; 07, 12 §20) |
RR-10 | Controller of an insecure account's provider login, or a token holder within 24 h of sign-in, can turn on encryption with own key; contacts pin silently. Accepted (D-085, D-071) |
RR-11 | Member controlling relay/SFU can inject media under another member's key: normally <1 s, up to ~3 s per episode, at most 3 counted episodes per participant and source per minute plus ~3 s/min excused. Accepted (D-043, D-080) |
RR-12 | Removed device holds current epoch keys until a member commits; removed member colluding with the relay or SFU can keep hearing, unbounded if nobody commits. Accepted (D-037) |
RR-13 | SFU path: capture timing and webcam orientation not authenticated. Accepted (17, 18) |
RR-14 | Harvest now, decrypt later for MLS traffic, VaultKeyGrants and 6-digit pairing transcripts. Accepted (04 §17.3) |
RR-15 | Relaying home server gets one online guess per device per user-started pairing session (1 in 10^6). Accepted (D-053) |
RR-16 | Attachment size classes and counts visible; while streaming, a substituted validly encrypted blob is caught only by the final sha256 check. Accepted (04 §18 items 8, 9) |
RR-17 | An Ed25519 library less strict than 04 §4.3 may accept signatures others reject. Accepted (04 §18 item 3) |
RR-18 | Platforms without hardware-backed key store protect keys in software only. Accepted (04 §18 item 13, 08 §13) |
RR-19 | Stolen fetch token reads notification records, previews and event tickets for up to 60 days; event ticket gives account-level access to secure ciphertext for 72 h. Accepted (PD-19-16) |
RR-20 | Leaked platform push token lets anyone wake the device; on iOS a forged call push briefly shows a CallKit call. Accepted (19 §21) |
RR-21 | Observer of hosting server and push traffic can correlate who is notified when. Accepted (19 §21) |
RR-22 | Secure messages and media are non-repudiable. Accepted (D-038, D-040; PD-22-1) |
RR-23 | Remote session tokens are bearer tokens for 1 h (24 h extended). Open (06 OQ-06-1, deferred) |
RR-24 | Revocation isn't instant everywhere (~70 s reachable; up to the hour unreachable; up to 24 h if network cut; 90-day eviction outside audience set). Accepted (D-062; 07 §22.7) |
RR-25 | Home server equivocation on IdentityStates; no key transparency in v1; can delay W4a. Accepted for v1 (07 OQ-07-2) |
RR-26 | Some limits server-enforced, not cryptographic (post-join ops on pre-join messages, VisibilityGrant extent, insecure visibility, retention/deletion). Accepted (D-007; 11 §20; 14) |
RR-27 | Delivered content can't be recalled. Accepted (10 §16 item 6) |
RR-28 | Reported secure content becomes plaintext to the hosting server's moderators; reporter addresses visible to moderators. Accepted (D-077) |
RR-29 | After 365-day quarantine a deleted address can be re-registered as a new incarnation. Accepted (D-086) |
RR-30 | Some lookalike names escape confusable data; squatting. Accepted (01 §15) |
RR-31 | Encrypted media leaks timing and sizes. Accepted (16 §15 item 4, 17 §16 item 2) |
RR-32 | Notification extension holds recent history keys in less isolated storage. Accepted (08 §18.8, 19 §21) |
RR-33 | Device removed as 'removed' (not lost or stolen) keeps a working recovery phrase. Accepted (D-082) |
RR-34 | Home server can serve a new device older authentic vault records or omit a pin. Accepted (08 §18.5) |
RR-35 | Withdrawn (revised D-007): no automatic history handover to delay |
RR-36 | Sequencer can partition a group unnoticed. Accepted (13 §21 item 1) |
RR-37 | Historical message misattribution by hosting server + member; DM backdating with stolen DSK of a device revoked without DeviceRevocation; old-key DM messages can't be shown. Accepted (14 §17 item 5); pin history Open (14 OQ 2) |
RR-38 | DM hosting server can invent group DMs, lie about participation, remove participants. Accepted (12 §20) |
RR-39 | Lease ticks aren't signed; malicious relay can delay/extend coverage ~3 s plus WebSocket downtime. Accepted (15 §17 item 2) |
RR-40 | KeyBackup holder can guess recovery phrase offline (~2^79 Argon2id evaluations). Accepted (D-052) |
RR-41 | With two linked providers whoever acts first wins; unlocked-device thief with a provider login passes fresh authentication. Accepted (05 §22.2) |
RR-42 | Detection depends on settings and silence; diagnostics default failures (D-089), none when off. Accepted (D-035, D-043, D-055); Open in part (OQ-22-2) |
RR-43 | Social engineering to approve attacker's device or type a code. Accepted (08 §18.2) |
RR-44 | Every member of a secure channel's group can decrypt its calls. Accepted (18 §14 item 3) |
RR-45 | Stolen server sign key: impersonation until revocation reaches verifiers (~48 h if blocked from /meta); ver poisoning. Accepted (02 §21.4) |
RR-46 | Pre-upgrade plaintext stays on server and backups. Accepted (D-057) |
RR-47 | Downgrade detection works only after first sight as secure; lookalike insecure channel. Accepted (09 §18 item 2) |
RR-48 | Metadata of secure contexts visible to servers (§7). Accepted (00 §5.4) |
RR-49 | Device IDs identical everywhere and public; cross-federation correlation; public IdentityState shows platforms and enrolment times. Accepted (06 §19); plat Open (07 OQ-07-5) |
RR-50 | Login providers learn sign-in times; provider loss can lock owner out. Accepted (D-016) |
RR-51 | In secure contexts moderation acts on metadata; forbidden content found only via reports. Accepted (D-023, D-040) |
RR-52 | Domain registration controller defeats pinning with strong evidence. Accepted (21 §13 item 12) |
RR-53 | Naive server restore undoes revocations and resets, rolls back ver, KeyPackages, replay caches. Accepted (21 §13 item 7) |
RR-54 | Talk indicator can show 'talking' up to ~1.6 s after a route dies silently. Accepted (16 §15 item 7) |
RR-55 | A member allowed to share can reveal earlier messages to a specific current member; can't be withdrawn. Accepted (owner, D-007) |
SecurityGoal enum
| Value | Meaning |
|---|---|
SG-1 | Confidentiality against third parties |
SG-2 | Confidentiality against the servers involved |
SG-3 | Sender authenticity against servers |
SG-4 | Sender authenticity against other members |
SG-5 | Membership integrity |
SG-6 | Identity continuity: a changed identity key is visible |
SG-7 | Forward secrecy |
SG-8 | Post-compromise security |
SG-9 | Downgrade resistance |
SG-10 | Bounded authority: a revoked speaker or listener is cut off quickly (within 4 s; every call path goes through the hosting server's relay or SFU, which enforces leases, D-094) |
SG-11 | Live only: nothing captured while the user believed they weren't heard or seen is sent |
SG-12 | Non-repudiation (the opposite of deniability) |
SG-13 | Metadata privacy against servers |
SG-14 | Availability against the servers involved |
SG-15 | IP address privacy against strangers (in calls, against other participants: all media goes through the hosting server's relay or SFU, D-094; not against those servers) |
SummaryMatrixCell enum
| Value | Meaning |
|---|---|
Full | Reads and forges |
Read | Reads but can't forge |
Meta | Metadata only |
DoS | Can deny service |
Imp | Can impersonate a user to others |
None | None |