Endpoints
Every HTTPS endpoint of the protocol, grouped by specification document.
262 endpoints from the specification, grouped by the document that defines them. Each entry links to the section it comes from; the specification is authoritative.
01 Addresses, display names and links
- GET
{expansion of links.join} (RECOMMENDED template: https://<canonical-domain>/j{/local}{?invite}) - GET
/v1/addresses/{local}
GET {expansion of links.join} (RECOMMENDED template: https://<canonical-domain>/j{/local}{?invite})
The HTML page an expanded share link serves (GET and HEAD), naming the target and carrying its sloppyv URI in a Link rel="alternate" header and <link rel="alternate"> element; also fetched by clients to recognise pasted share links.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | No | Target local part. Display-local form, percent-encoded UTF-8 by RFC 6570 expansion; undefined for a community |
domain | string | No | Target server's canonical domain. Canonical domain as an A-label; only if the template references it |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
invite | string | No | Invite code. 09's canonical form; undefined when there is none |
Response: 200, 404, 410 with HTML page (works without JavaScript, cookies or sign-in)
GET /v1/addresses/{local}
Says what a local part names on the owning server (a user/bot or a channel), with its canonical address and display name, and for a channel its ctx, kind and security; a miss carries registration availability.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | The local part to look up. One path segment: a local part in any input form (case, width and spacing variants, display-local form), percent-encoded as UTF-8 (RFC 3986). Server percent-decodes exactly once; must be valid UTF-8; must not contain @, U+FF20 or U+FE6B; looked up by minimalPrepare. |
Response: 200, 400, 401, 404, 410, 429 with AddressInfo
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
kind | enum AddressInfoKind | Yes | What the address names (user covers user and bot accounts). user or channel; unknown value: treat as not openable, show the address only |
address | string (canonical address) | Yes | The canonical address. §7; domain is the server's canonicalDomain whatever domain the client used; for the old local part of a renamed channel during its rename reservation, the channel's current address |
name | string | Yes | The display name. §6.2; receivers apply §6.4 |
bot | boolean | No | Whether the account is a bot (kind: "bot" in 05). For secure bots the IdentityCertificate kind wins if they disagree. Required when kind is user |
ctx | string | No | The channel's context reference. Required when kind is channel; ch:<UUIDv7> (00 §7.6); MUST equal the Channel object's value |
channelKind | enum ChannelKind | No | The channel kind. Required when kind is channel; text or voice; MUST equal Channel object kind; unknown value treated as text |
security | enum ChannelSecurity | No | The channel's security mode. Required when kind is channel; insecure or secure; MUST equal Channel object security; unknown value treated as secure for pre-join display and never creates/changes a secure-state pin |
Errors: address.invalid_local_part, address.not_found, address.deleted, core.unauthenticated, core.token_expired, core.rate_limited
02 Discovery, server metadata and server keys
- GET
/meta - GET
/v1/resolve - GET
/v1/resolve/pins - DELETE
/v1/resolve/pins/{domain} - GET
/v1/resolve/pins/{domain} - POST
/v1/resolve/pins/{domain}/accept - GET
https://<fqdn>/.well-known/sloppyv
GET /meta
Returns the server's ServerMetadata; unversioned, also served for HEAD, identical for every requester, never redirected; fetched by clients, web clients, servers and push gateways.
Response: 200, 304 with ServerMetadata
Errors: discovery.metadata_invalid, discovery.server_unreachable, discovery.version_unsupported, core.unsupported_version
GET /v1/resolve
Runs the server's own resolve(domain) (including its pin state) and returns a ResolveResult; used by web clients for every resolution (D-029), and by any client (native included) for no-contact use (§5.8) and pin recovery (§10.6). Every server MUST implement it. CORS *, Cache-Control: private, max-age=<seconds until expiresAt>, no Vary on Authorization.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The domain to resolve. A-label or U-label form, at most 253 octets after conversion; converted per 01 (UTS #46, IDNA2008, lowercase A-label); exactly one parameter, repeats fail with core.invalid_request |
Response: 200 with ResolveResult
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The queried domain. lowercase A-label |
baseUrl | string | Yes | Normalized base URL. normalized base URL (§3.3) |
canonicalDomain | string | Yes | The canonical domain, verified per §5.3. |
source | Source | Yes | Where the delegation came from.txt or wellknown; unknown values treated as wellknown |
evidence | Evidence | Yes | Delegation evidence.dnssec, same-site, wellknown or dns-only; unknown values treated as dns-only |
resolvedAt | timestamp | Yes | Timestamp of the delegation. RFC 3339 |
expiresAt | timestamp | Yes | When the client's cached copy expires. earlier of delegation and metadata expiry, never more than 86,400 s after the response |
stale | boolean | Yes | True if the server is using a stale copy because the target is unreachable. |
Errors: discovery.invalid_domain, discovery.not_found, discovery.record_invalid, discovery.delegation_conflict, discovery.dns_failure, discovery.server_unreachable, discovery.metadata_invalid, discovery.domain_not_served, discovery.canonical_mismatch, discovery.version_unsupported, discovery.forbidden_target, discovery.peer_suspended, core.invalid_request, core.rate_limited
GET /v1/resolve/pins
Admin: list federation pins, optionally filtered by state, with cursor pagination.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | PinState | No | Filter by pin state.pinned or suspended |
cursor | string | No | Pagination cursor. opaque cursor (00 §7.10) |
limit | integer | No | Page size. 1–100, default 50 |
Response: 200 with PinList
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<PeerPin> | Yes | Pins on this page. |
nextCursor | string | Yes | Cursor for the next page. cursor pagination per 00 §7.10 (value shown only as … in §10.5) |
Errors: core.forbidden
DELETE /v1/resolve/pins/{domain}
Admin: forget a pin; the next resolution is a first use.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The pinned domain. lowercase A-label |
Response: 204
Errors: core.not_found, core.forbidden
GET /v1/resolve/pins/{domain}
Admin: read one federation pin.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The pinned (queried) domain. lowercase A-label |
Response: 200 with PeerPin
Errors: core.not_found, core.forbidden
POST /v1/resolve/pins/{domain}/accept
Admin: accept the observed result of a suspended pin (compare-and-set against the observed values); not allowed for reasons key_unrevoked and secure_downgrade.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | The suspended domain. lowercase A-label |
Request body: PinAcceptRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
baseUrl | string | Yes | Observed base URL the admin reviewed. MUST equal observed.baseUrl |
canonicalDomain | string | Yes | Observed canonical domain the admin reviewed. MUST equal observed.canonicalDomain |
keyThumbprints | array<string> | Yes | Thumbprints of the observed keys the admin reviewed. MUST equal the observed key thumbprints |
Response: 200 with PeerPin
Errors: core.not_found, core.conflict, core.forbidden
GET https://<fqdn>/.well-known/sloppyv
Fallback delegation document served by the queried domain's own HTTPS origin (not by a Sloppy Voice server), fetched by clients, servers, web clients (DoH path) and push gateways when there is no TXT record, after a temporary DNS failure, or (servers MUST) to upgrade a weak TXT delegation.
Response: 200, 404, 410 with WellKnownDocument
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | string | Yes | Protocol version of this delegation. MUST be "sv1"; any other value means the document is treated as absent by v1 consumers |
url | string | Yes | The base URL for D. A base-url (§3.3) |
Errors: discovery.record_invalid, discovery.not_found, discovery.server_unreachable, discovery.dns_failure, discovery.delegation_conflict
03 Client transport, envelopes and errors
GET /v1/events
The event WebSocket (RFC 6455) at {base}/v1/events with the https scheme replaced by wss, subprotocol sloppyv.v1; carries envelopes, server-to-client events and the session.* client messages. The spec does not name the HTTP method; GET is the RFC 6455 upgrade (RFC 8441/9220 extended CONNECT over HTTP/2/3 is allowed).
Response: 101, 400, 429
05 Accounts, login, sessions, devices and bots
- GET
/v1/auth/authorize - GET
/v1/auth/callback - POST
/v1/auth/consent - POST
/v1/auth/logout - POST
/v1/auth/par - POST
/v1/auth/signup - POST
/v1/auth/token - GET
/v1/bots - POST
/v1/bots - DELETE
/v1/bots/{local} - GET
/v1/bots/{local} - PATCH
/v1/bots/{local} - DELETE
/v1/bots/{local}/avatar - PUT
/v1/bots/{local}/avatar - GET
/v1/bots/{local}/tokens - POST
/v1/bots/{local}/tokens - DELETE
/v1/bots/{local}/tokens/{did} - POST
/v1/bots/{local}/tokens/{did}/rotate - DELETE
/v1/me - GET
/v1/me - PATCH
/v1/me - DELETE
/v1/me/avatar - PUT
/v1/me/avatar - GET
/v1/me/devices - DELETE
/v1/me/devices/{did} - GET
/v1/me/devices/{did} - PATCH
/v1/me/devices/{did} - POST
/v1/me/devices/{did}/revoke - GET
/v1/me/providers - POST
/v1/me/providers - DELETE
/v1/me/providers/{linkId} - GET
/v1/users/{local}/profile - GET
/v1/users/{local}/profile/avatar
GET /v1/auth/authorize
Starts leg A: validates client and redirect, creates the authorization transaction, sets the transaction cookie and redirects to the provider.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
client_id | string | Yes | Client identifier (§5.1). HTTPS Client ID Metadata Document URL (no query/fragment/userinfo) or urn:sloppyv:client:loopback |
request_uri | string | No | Alternative to the full parameter set: from POST /v1/auth/par. When present only pushed params are used; client_id MUST equal the pushed client_id. urn:ietf:params:oauth:request_uri:...; single use, 60 s |
response_type | string | Yes | Always code. code |
redirect_uri | string | Yes | §5.2. exact match against client's redirect_uris; loopback port ignored; no fragment |
code_challenge | base64url | Yes | PKCE challenge (RFC 7636 §4.2). 43 characters; BASE64URL(SHA-256(code_verifier)) |
code_challenge_method | string | Yes | PKCE method. S256; plain MUST be refused |
state | string | Yes | Opaque client state; checked on return. 1-512 characters; client MUST generate >=128 random bits |
provider | string | No | If absent the server shows its own provider chooser. provider-id from auth.providers |
prompt | string | No | For 'Use a different account'. select_account only; anything else -> invalid_request |
ui_locales | string | No | Language of the server's pages. BCP 47 language tags |
Response: 302
Errors: auth.invalid_client, auth.invalid_redirect_uri, core.invalid_request, auth.provider_unknown, core.rate_limited
Opened in the system browser or top-level navigation. client_id and redirect_uri validated first; failures shown as an error page, never redirected. Later errors redirected with error, error_description, state, iss, sv_code. intent=reauth in a non-pushed request is treated as login. Unrecognized params (scope, nonce) ignored.
GET /v1/auth/callback
Provider redirect target for leg B; validates the provider response, resolves the intent, may show the 'Continue to ...' page, then issues the code.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
code | string | No | Provider authorization code. |
state | string | Yes | Upstream state (32 random bytes, 43 chars). |
iss | string | No | RFC 9207. required equal to issuer when provider sets authorization_response_iss_parameter_supported |
error | string | No | Provider error; access_denied -> auth.access_denied, other -> auth.provider_error. |
Response: 302
Errors: auth.transaction_expired, auth.access_denied, auth.provider_error, auth.reauth_mismatch, auth.reauth_required
redirectUri registered at the provider is always {base}/v1/auth/callback. HTML pages: Cache-Control: no-store, Referrer-Policy: no-referrer, X-Content-Type-Options: nosniff, CSP frame-ancestors 'none'.
POST /v1/auth/consent
Answers the server's own 'Continue to ...' page.
Request body: ConsentForm (application/x-www-form-urlencoded)
| 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 |
Response: 302
Errors: auth.transaction_expired, auth.access_denied
Rejected if Origin present and not the server's origin, or Sec-Fetch-Site present and not same-origin. Failures show the auth.transaction_expired page and end the transaction without redirect. cancel -> 302 with error=access_denied&sv_code=auth.access_denied.
POST /v1/auth/logout
Signs out: revokes this device (scope current) or every other active device (scope others).
Request body: LogoutRequest (optional JSON)
| 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 |
Response: 204, 200 with none (204) | LogoutOthersResponse (200)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
revoked | array<string> | Yes | dids revoked. only for scope others |
Errors: auth.reauth_required, bot.not_allowed, core.unauthenticated
scope current with an expired, revoked or unknown token also answers 204 (03 §3.2 rule 8(b)); scope others with such a token gets 401. Allowed for suspended accounts.
POST /v1/auth/par
Pushed authorization request (RFC 9126); mandatory for intent=reauth.
Request body: inline (application/x-www-form-urlencoded or application/json, snake_case)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
client_id | string | Yes | Client identifier (§5.1). HTTPS Client ID Metadata Document URL (no query/fragment/userinfo) or urn:sloppyv:client:loopback |
response_type | string | Yes | Always code. code |
redirect_uri | string | Yes | §5.2. exact match against client's redirect_uris; loopback port ignored; no fragment |
code_challenge | base64url | Yes | PKCE challenge (RFC 7636 §4.2). 43 characters; BASE64URL(SHA-256(code_verifier)) |
code_challenge_method | string | Yes | PKCE method. S256; plain MUST be refused |
state | string | Yes | Opaque client state; checked on return. 1-512 characters; client MUST generate >=128 random bits |
provider | string | No | If absent the server shows its own provider chooser. provider-id from auth.providers |
prompt | string | No | For 'Use a different account'. select_account only; anything else -> invalid_request |
ui_locales | string | No | Language of the server's pages. BCP 47 language tags |
intent | string | No | Binds a reauth request to that session's device. Only a pushed request can carry reauth. login (default) | reauth; reauth requires Authorization: Bearer <access token> |
Response: 201 with PushedAuthorizationResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
request_uri | string | Yes | single use, valid 60 s |
expires_in | integer | Yes | Seconds. 60 |
Errors: core.invalid_request, auth.invalid_client, auth.invalid_redirect_uri, auth.provider_unknown, core.rate_limited, core.internal, core.unavailable, bot.not_allowed
Cache-Control: no-store. Errors are problem details that also carry RFC 6749 error/error_description; HTTP status 400 for invalid_request/invalid_grant/unsupported_grant_type, 401 for invalid_client (§7.8). Unrecognized parameters ignored.
POST /v1/auth/signup
Creates the account, its ProviderLink, first device and token family after the user chose a name.
Request body: SignupRequest (JSON)
| 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). |
Response: 201 with TokenResponse
| 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). |
Errors: auth.identity_already_linked, auth.signup_token_invalid, core.invalid_request, auth.registration_closed, auth.invite_required, auth.invite_invalid, auth.terms_not_accepted, address.*, address.reserved, core.rate_limited
Processed in order: token check, body syntax, registration/invite, terms, name (01 checks), identity still unlinked, then one transaction creating everything. account.name may differ from name sent (prepared local part) when only the display name collided.
POST /v1/auth/token
Variant 1 of 2
Authorization code grant: redeems a code for tokens (login), a sign-up token (unknown identity), a fresh access token (reauth) or a ProviderLink plus access token (link).
Request body: inline (application/x-www-form-urlencoded or application/json, snake_case)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
grant_type | string | Yes | authorization_code |
code | string | Yes | From the redirect (§6.6). svc_ + 43 base64url chars; single use; 60 s |
redirect_uri | string | Yes | exactly the value used at /authorize |
client_id | string | Yes | exactly the value used at /authorize |
code_verifier | string | Yes | PKCE verifier (RFC 7636 §4.5). 43-128 chars [A-Za-z0-9-._~]; >=256 random bits; never reused |
platform | Platform | No | Device platform (§12.2). required for a login that creates a device; desktop|web|ios|android; bot refused with core.invalid_request |
client_software | string | No | Client software string (§5.3), e.g. sloppyvoice-desktop/1.0.3. required for a login that creates a device; 1-64 printable ASCII, loosely token/token |
device_name | string | No | Suggested device name. 1-64 characters |
shared_computer | boolean | No | Shared-computer mode (§12.6). default false; form body literal true/false, JSON boolean; only with platform web or desktop |
Response: with TokenResponse | SignupTokenResponse | ReauthTokenResponse | LinkTokenResponse
| 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). |
Errors: core.invalid_request, auth.invalid_grant, auth.unsupported_grant_type, auth.invalid_client, auth.registration_closed, account.suspended, auth.too_many_devices, auth.provider_in_use, auth.provider_unknown, core.rate_limited, core.internal, core.unavailable
Cache-Control: no-store. Status 400 for invalid_request/invalid_grant/unsupported_grant_type-mapped codes, 401 invalid_client, 429 core.rate_limited, 500/503 server_error (§7.8). Success HTTP status not stated by the spec.
Variant 2 of 2
Refresh token grant: rotates the refresh token and issues a new access token.
Request body: inline (form or JSON)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
grant_type | string | Yes | refresh_token |
refresh_token | string | Yes | The current refresh token. svr_ token |
client_id | string | Yes | must equal the client ID the family was issued to, else auth.invalid_grant |
Response: with RefreshTokenResponse
| 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 |
Errors: auth.invalid_grant, auth.refresh_reused, auth.session_revoked, account.suspended, auth.unsupported_grant_type, core.rate_limited
GET /v1/bots
Lists bots the caller owns, or all bots on the server with ?all=true (requires manage_bots).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
all | boolean | No | true requires manage_bots |
Response: 200 with {items: [Bot], nextCursor}
Errors: bot.not_allowed, core.forbidden, auth.home_session_required, account.suspended
POST /v1/bots
Creates a bot account owned by the caller, with its first token/device.
Request body: CreateBotRequest (JSON)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Bot display name. local part derived and checked as at sign-up (§8.4 step 5) |
about | string | No | §11.1 limits |
deviceName | string | No | Name of first token's device. default 'Bot token 1' |
expiresAt | timestamp | No | Expiry of first token. at most 2 years ahead |
Response: 201 with CreateBotResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
bot | Bot | Yes | |
token | string | Yes | svb_; shown only once |
Errors: core.forbidden, bot.permission_required, auth.reauth_required, bot.limit_reached, bot.not_allowed, address.*, auth.home_session_required, account.suspended
Requires fresh authentication (maxAgeMs 600000, §9). Caller must be an active local kind:user account holding manage_bots (core.forbidden with data.permission manage_bots otherwise). Independent of auth.registration. Emits bot.created to owner devices and device.added via bot_token on bot's me stream.
DELETE /v1/bots/{local}
Deletes the bot account (§16, reason owner).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Errors: auth.reauth_required, bot.not_owner, core.not_found, bot.not_allowed, auth.home_session_required, account.suspended
Requires fresh authentication (maxAgeMs 600000, §9).
GET /v1/bots/{local}
Returns one Bot (owner and manage_bots holders).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Response: 200 with Bot
Errors: core.not_found, bot.not_owner, bot.not_allowed, auth.home_session_required, account.suspended
PATCH /v1/bots/{local}
Edits a bot's name or about, or transfers ownership.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Request body: inline JSON
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | same rule as §11.6 |
about | string | No | |
owner | string | No | New owner. canonical address of a local kind:user account holding manage_bots; requires fresh authentication |
Errors: bot.invalid_owner, bot.not_owner, auth.reauth_required, core.not_found, bot.not_allowed, auth.home_session_required, account.suspended
Emits bot.updated (to old and new owner on transfer) and account.profile_changed if the profile changed. Response not stated.
DELETE /v1/bots/{local}/avatar
Removes a bot's avatar.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Errors: bot.not_owner, auth.home_session_required, account.suspended, bot.not_allowed, core.not_found
PUT /v1/bots/{local}/avatar
Sets a bot's avatar as §11.7.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Request body: raw image bytes
Errors: account.avatar_invalid, core.too_large, bot.not_owner, auth.home_session_required, account.suspended, bot.not_allowed, core.not_found
GET /v1/bots/{local}/tokens
Lists the bot's token device records.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Response: 200 with {items: [DeviceRecord], nextCursor: null}
Errors: bot.not_owner, core.not_found, auth.home_session_required, account.suspended, bot.not_allowed
POST /v1/bots/{local}/tokens
Creates a new bot device record and its token.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
Request body: inline JSON
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
deviceName | string | No | |
expiresAt | timestamp | No | at most 2 years ahead |
Response: 201 with BotTokenResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
token | string | Yes | svb_ |
device | DeviceRecord | Yes |
Errors: auth.reauth_required, bot.token_limit_reached, bot.not_owner, auth.home_session_required, account.suspended, bot.not_allowed, core.not_found
Requires fresh authentication (maxAgeMs 600000, §9). Owner only. Max maxBotTokens active tokens.
DELETE /v1/bots/{local}/tokens/{did}
Revokes a bot token's device (§13, reason bot_token_revoked).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
did | string | Yes |
Errors: bot.not_owner, core.not_found, auth.home_session_required, account.suspended, bot.not_allowed
Owner, owner without manage_bots, or other manage_bots holders may revoke.
POST /v1/bots/{local}/tokens/{did}/rotate
Issues a new token for the same device record; the old one keeps working for graceMs.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Bot's local part. |
did | string | Yes |
Request body: inline JSON
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
graceMs | integer | No | How long the old token keeps working. 0-86400000, default 0 |
expiresAt | timestamp|null | No | at most 2 years ahead; null removes expiry; absent keeps current |
Response: 200 with BotTokenRotateResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
token | string | Yes | svb_ |
device | DeviceRecord | Yes | |
oldTokenValidUntil | timestamp | Yes |
Errors: auth.reauth_required, bot.not_owner, auth.home_session_required, account.suspended, bot.not_allowed, core.not_found
Requires fresh authentication (maxAgeMs 600000, §9). Not a revocation: did, DSK and DeviceCertificate unchanged; nothing sent to other servers.
DELETE /v1/me
Deletes the account immediately and finally (no grace period).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
confirm | string | Yes | Not a secret; guards against stray/replayed requests. the account's canonical address exactly, percent-encoded per 03 §2.6 |
Response: 204
Errors: account.confirmation_mismatch, auth.reauth_required, bot.not_allowed, account.suspended, core.rate_limited, auth.home_session_required
Requires fresh authentication (maxAgeMs 600000, §9). kind:user home-session only; no request body.
GET /v1/me
Returns the caller's Account, its own device record and authAt (absent for bot tokens).
Response: 200 with MeResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
account | Account | Yes | |
device | DeviceRecord | Yes | |
authAt | timestamp | No | absent for bot tokens; equals device.authAt |
Errors: auth.home_session_required, core.token_expired, auth.session_revoked
Allowed for suspended accounts. Home-session or bot tokens only; remote-session token -> 403 auth.home_session_required.
PATCH /v1/me
Changes display name (spacing/capitalization only) or about.
Request body: inline JSON
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | processed per 01 §6.3 incl. 01 §5.3 collision check; empty/white space resets to prepared local part |
about | string | No | §11.1 limits else core.invalid_request |
Response: 200 with Account
Errors: address.display_name_mismatch, address.too_similar, core.invalid_request, account.suspended, auth.home_session_required
If anything changed: profileVersion +1, account.updated to own devices, account.profile_changed S2S to audiences.
DELETE /v1/me/avatar
Removes the avatar; bumps profileVersion.
Errors: account.suspended, auth.home_session_required
Response status not stated.
PUT /v1/me/avatar
Uploads a new avatar as raw image bytes; server decodes, scales to fit 1024x1024, re-encodes and strips metadata.
Request body: raw image bytes (Content-Type image/png | image/jpeg | image/webp)
Response: 200 with Account
Errors: account.avatar_invalid, core.too_large, account.suspended, auth.home_session_required
At most maxAvatarBytes; images over 4096x4096 or undecodable refused. Bumps profileVersion.
GET /v1/me/devices
Lists active device records (newest lastSeenAt first), optionally followed by devices revoked in the last 30 days.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
include | string | No | Append devices revoked in the last 30 days. revoked |
Response: 200 with {items: [DeviceRecord], nextCursor: null}
Errors: auth.home_session_required, account.suspended
With a bot token, returns the bot's own devices.
DELETE /v1/me/devices/{did}
Body-less alias of POST .../revoke with reason removed and no revocation; 204, also for an already revoked device. Fresh authentication needed unless it is the caller's own device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | device ID (§12.4); the spec allows the literal 'current' explicitly only for GET and POST .../revoke |
Response: 204
Errors: auth.reauth_required, bot.not_allowed, auth.home_session_required, account.suspended
Requires fresh authentication (maxAgeMs 600000, §9). (unless own device).
GET /v1/me/devices/{did}
Returns one device record.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | device ID (§12.4), or the literal 'current' |
Response: 200 with DeviceRecord
Errors: auth.home_session_required, account.suspended
{did} MAY be the literal current.
PATCH /v1/me/devices/{did}
Renames a device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | device ID (§12.4); the spec allows the literal 'current' explicitly only for GET and POST .../revoke |
Request body: inline JSON
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | 1-64 code points, no control characters |
Response: 200 with DeviceRecord
Errors: device.already_revoked, device.name_invalid, auth.home_session_required, account.suspended
Emits device.updated. No fresh authentication.
POST /v1/me/devices/{did}/revoke
Revokes a device (runs §13). For the caller's own device (or 'current') it is a sign-out with reason signed_out and no fresh authentication; for any other active device fresh authentication (600000 ms) is required. Bot tokens may revoke only their own device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | device ID (§12.4), or the literal 'current' |
Request body: RevokeRequest (JSON, all optional)
| 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 |
Response: 200 with RevokeResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
device | DeviceRecord | Yes | |
identityStateVer | integer|null | Yes | ver of the IdentityState published by §13 step 3, or null. |
Errors: auth.reauth_required, bot.not_allowed, device.revocation_invalid, core.invalid_request, auth.home_session_required, account.suspended
Fresh authentication required unless {did} is the current device (reason then signed_out). Bot tokens get bot.not_allowed for other devices.
GET /v1/me/providers
Lists the account's ProviderLinks ordered by linkedAt.
Response: 200 with {items: [ProviderLink], nextCursor: null}
Errors: bot.not_allowed, auth.home_session_required, account.suspended
POST /v1/me/providers
Starts linking a provider: creates a pushed authorization request with intent link and returns the authorize URL.
Request body: LinkProviderRequest (JSON)
| 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 |
Response: 201 with LinkProviderResponse
| 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 |
Errors: auth.reauth_required, auth.too_many_providers, auth.provider_unknown, bot.not_allowed, auth.home_session_required, account.suspended
Requires fresh authentication (maxAgeMs 600000, §9). Linking completes at /v1/auth/token (intent link); the same identity twice is idempotent.
DELETE /v1/me/providers/{linkId}
Unlinks a provider; returns active devices that were signed in through it (no session is revoked).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
linkId | uuidv7 | Yes |
Response: 200 with UnlinkResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
unlinked | uuidv7 | Yes | linkId removed. |
devicesSignedInWithIt | array<string> | Yes | Active dids whose sessions were created through this link. |
Errors: auth.reauth_required, auth.last_provider, bot.not_allowed, auth.home_session_required, account.suspended
Requires fresh authentication (maxAgeMs 600000, §9). Emits auth.provider_unlinked.
GET /v1/users/{local}/profile
Public profile of a local account (no security state, dates, owner, devices or providers). Also fetched by servers for their users (cache >= 300 s, revalidate with If-None-Match, §17.3).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | percent-encoded UTF-8 local part; processed per 01 §9.2 steps 1-5 (minimalPrepare lookup) |
Response: 200, 304 with PublicProfile
| 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 |
Errors: address.invalid_local_part, core.not_found, account.deleted, core.unauthenticated, core.rate_limited
Open CORS. ETag "<profileVersion>", Cache-Control: public, max-age=300; If-None-Match -> 304. Invalid Authorization header -> 401 except an S2S token (which MAY be attached for per-peer limits). Never redirects. 404 also for channels and suspended accounts; 410 during deleted-address quarantine.
GET /v1/users/{local}/profile/avatar
Serves the avatar image bytes with nosniff and CSP default-src 'none'; sandbox. Cache-Control: public, max-age=31536000, immutable when v equals the current profileVersion, else max-age=300; 404 core.not_found when there is no avatar.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | percent-encoded UTF-8 local part; processed per 01 §9.2 steps 1-5 (minimalPrepare lookup) |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | No | Cache-busting profile version, as in Avatar.url. equals current profileVersion for the immutable cache response |
Response: 200 with image bytes
Errors: core.not_found, core.rate_limited
X-Content-Type-Options: nosniff; CSP default-src 'none'; sandbox. v == current -> Cache-Control: public, max-age=31536000, immutable; otherwise max-age=300.
06 Federation
- POST
/v1/federation/assertions - GET
/v1/federation/blocks - DELETE
/v1/federation/blocks/{domain} - PUT
/v1/federation/blocks/{domain} - POST
/v1/federation/events - GET
/v1/federation/policy - PATCH
/v1/federation/policy - POST
/v1/federation/sessions - DELETE
/v1/federation/sessions/current - GET
/v1/federation/sessions/current - POST
/v1/federation/sessions/current/extend
POST /v1/federation/assertions
Ask the home server for a short-lived, single-use HomeAssertion vouching for this account and device to one remote server.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
aud | string | Yes | Domain of the remote server the client wants to use. 1–253 octets; client SHOULD send the canonical domain it resolved; alias, U-label or mixed case accepted and converted |
Response: 200 with inline (AssertionResponse)
| 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 |
Errors: core.unauthenticated, auth.home_session_required, security.upgrade_required, account.suspended, core.invalid_request, federation.audience_is_home, discovery.domain_not_served, discovery.*, federation.blocked, discovery.peer_suspended, core.rate_limited
GET /v1/federation/blocks
List the server's FederationBlocks, cursor-paginated.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Pagination cursor. 00 §7.10 |
limit | integer | No | Page size. 00 §7.10 |
Response: 200 with inline {items: [FederationBlock], nextCursor}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<FederationBlock> | Yes | Blocks. |
nextCursor | string | No | Cursor for the next page. 00 §7.10 |
Errors: core.forbidden
DELETE /v1/federation/blocks/{domain}
Remove a block (alias accepted); restores federation for new requests, nothing is replayed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Blocked peer. Domain or alias |
Response: 204
Errors: core.forbidden, core.not_found
PUT /v1/federation/blocks/{domain}
Create or update a block; {domain} may be an alias and is stored under the resolved canonical domain (or unresolved if resolution fails).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Peer to block. Domain or alias; blocking one of the server's own domains → 400 core.invalid_request |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
includeSubdomains | boolean | No | Also cover every domain ending with "." + domain. Default false |
note | string | No | Private administrator note. ≤ 500 characters; never sent to any peer; not copied into the audit log |
Response: 201, 200 with FederationBlock
Errors: core.forbidden, core.invalid_request
POST /v1/federation/events
Single ingest endpoint for every S2S event: a batch of 1–100 events from one origin to one destination, answered with one EventResult per event.
Request body: EventBatchRequest
| 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 |
Response: 200 with EventBatchResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<EventResult> | Yes | Per-event outcomes. Exactly one per request event, same order |
Errors: federation.batch_invalid, federation.s2s_unauthenticated, federation.blocked, core.too_large, core.rate_limited, discovery.peer_suspended, federation.issuer_unreachable, core.unavailable, federation.event_invalid, federation.event_too_large, federation.event_not_authorized, federation.event_expired, address.non_canonical
GET /v1/federation/policy
Read the server's federation policy (mode, allowlist, block count).
Response: 200 with FederationPolicy
Errors: core.forbidden
PATCH /v1/federation/policy
Change the federation mode and/or allowlist; every allows entry is resolved and stored under its canonical domain.
Request body: inline (partial FederationPolicy)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mode | FederationMode | No | Policy mode.open or allowlist; allowlist → 501 core.unsupported_feature (data.feature "federation_allowlist") where not implemented |
allows | array<string> | No | Allowlist entries. Domains; resolved to canonical; unresolvable entries stored as given (lowercase A-label) and re-resolved at least every 24 h |
Response: 200 with FederationPolicy
Errors: core.forbidden, core.unsupported_feature
POST /v1/federation/sessions
Present a HomeAssertion (plus DeviceProof and DeviceCertificate for enrolled devices) to a remote server to create a new remote session, or renew the current one when the current token is sent.
Request body: inline (SessionRequest)
| 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) |
Response: 201, 200 with RemoteSession
| 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 |
Errors: core.invalid_request, core.too_large, core.token_expired, federation.session_ended, core.unauthenticated, federation.assertion_invalid, address.non_canonical, federation.wrong_audience, federation.assertion_replayed, federation.device_proof_required, federation.device_proof_invalid, federation.identity_mismatch, federation.issuer_unreachable, discovery.peer_suspended, federation.blocked, moderation.banned, core.rate_limited, core.unavailable
DELETE /v1/federation/sessions/current
End the current remote session with reason signed_out; memberships are unchanged.
Response: 204
GET /v1/federation/sessions/current
Return the current RemoteSession object (without token), e.g. to learn expiresAt and state after a restart.
Response: 200 with RemoteSession
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sessionId | uuidv7 | Yes | Session ID assigned by the remote server. Stable across renewals and extensions |
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 |
POST /v1/federation/sessions/current/extend
Ask the remote server to extend a session by up to 1 h (to at most verifiedAt + 24 h) because the home server is unreachable; the remote server probes the home server itself.
Request body: inline (ExtendRequest)
| 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 |
Response: 200 with RemoteSession (without token; the token doesn't change)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sessionId | uuidv7 | Yes | Session ID assigned by the remote server. Stable across renewals and extensions |
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 |
Errors: core.invalid_request, core.token_expired, federation.session_ended, core.conflict, federation.extension_limit, discovery.peer_suspended, federation.home_reachable, core.rate_limited
07 Identity keys, certificates and verification
- GET
/v1/me/identity - PUT
/v1/me/identity - POST
/v1/me/identity/devices - POST
/v1/me/identity/reset - POST
/v1/me/identity/revocations - GET
/v1/users/{local}/identity
GET /v1/me/identity
Returns the caller's own identity plus the calling device's enrolment status.
Response: 200 with IdentityResponse plus `thisDevice`
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | The canonical address canonical address |
state | string (IdentityState JWS) | Yes | The current IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificate JWS of each listed device same order as devices; empty when insecure |
thisDevice | ThisDevice | Yes | The calling device; enrolled is true when did is listed in devices{"did": string, "enrolled": boolean} |
Errors: core.unauthenticated, core.forbidden
PUT /v1/me/identity
Registers a new identity (IdentityCertificate plus the calling device's DeviceCertificate) for an insecure account: first upgrade or re-upgrade after a downgrade.
Request body: inline (TurnOnEncryptionRequest)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
identityCertificate | string (IdentityCertificate JWS) | Yes | New IdentityCertificateigen = expectedIgen + 1 |
deviceCertificate | string (DeviceCertificate JWS) | Yes | DeviceCertificate for the calling device for the calling device, under that certificate |
expectedIgen | integer | Yes | The account's current igen, as the client last saw it |
Response: 200, 400, 403, 409, 429 with IdentityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
state | string | Yes | New IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificates of listed devices |
Errors: auth.reauth_required, identity.already_secure, identity.generation_mismatch, identity.invalid_certificate, address.non_canonical, identity.subject_mismatch, identity.key_reused, identity.device_mismatch, identity.device_revoked, core.rate_limited, backup.required, core.forbidden
POST /v1/me/identity/devices
Registers the calling device's DeviceCertificate under the current identity after pairing or recovery, making the device enrolled.
Request body: inline (RegisterDeviceRequest)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
deviceCertificate | string (DeviceCertificate JWS) | Yes | The calling device's DeviceCertificate |
expectedIgen | integer | Yes | The current igen as the client last saw it |
Response: 201, 200, 400, 403, 409, 429 with IdentityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
state | string | Yes | New IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificates of listed devices |
Errors: identity.not_secure, identity.generation_mismatch, identity.invalid_certificate, identity.device_mismatch, identity.device_revoked, identity.device_conflict, identity.key_reused, identity.too_many_devices, core.rate_limited
POST /v1/me/identity/reset
Replaces the account's identity with a new identity key (mode: "new_key") or turns encryption off (mode: "downgrade"), immediately, even from an unenrolled device.
Request body: inline (ResetRequest)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
mode | ResetMode | Yes | Reset with a new key, or turn encryption offnew_key or downgrade; unknown values 400 core.invalid_request |
expectedIgen | integer | Yes | The current igen as the client last saw it |
identityCertificate | string (IdentityCertificate JWS) | No | New IdentityCertificate required when new_key; igen = expectedIgen + 1 |
deviceCertificate | string (DeviceCertificate JWS) | No | The calling device's DeviceCertificate under the new IdentityCertificate required when new_key |
keyPackages | KeyPackageUpload (13 §9.2) | No | KeyPackages for the calling device under the new certificates; user clients SHOULD send at least lastResortnew_key only; keyPackages at most 10 here, plus lastResort; present with downgrade: 400 core.invalid_request |
Response: 200, 400, 403, 409, 429 with IdentityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
state | string | Yes | New IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificates of listed devices |
Errors: auth.reauth_required, core.invalid_request, identity.not_secure, identity.downgrade_not_allowed, identity.generation_mismatch, identity.invalid_certificate, address.non_canonical, identity.subject_mismatch, identity.key_reused, identity.device_mismatch, identity.device_revoked, mls.keypackage_invalid, core.rate_limited, backup.required
POST /v1/me/identity/revocations
Uploads a DeviceRevocation JWS signed by the identity key; revokes the device if still active, or attaches the rev to its RevokedEntry.
Request body: inline (RevocationUploadRequest)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
revocation | string (DeviceRevocation JWS) | Yes | A DeviceRevocation JWS (§8) ≤ 1,024 bytes |
Response: 200, 400, 403, 404, 409 with IdentityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
state | string | Yes | Current IdentityState JWS |
deviceCertificates | array<string> | Yes | DeviceCertificates of listed devices |
Errors: identity.not_secure, identity.generation_mismatch, identity.invalid_certificate, identity.unknown_device, auth.reauth_required, bot.not_allowed
GET /v1/users/{local}/identity
Returns the public identity (current IdentityState plus the DeviceCertificate of each listed device) of any account homed on this server; also fetched by hosting servers and other home servers.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
local | string | Yes | Local part of the account's address local part as 01 defines it, percent-encoded UTF-8; server looks up minimalPrepare of the decoded segment (01 §9.2); failure 400 address.invalid_local_part |
Response: 200, 304, 400, 404, 410, 429 with IdentityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | The canonical address canonical address |
state | string (IdentityState JWS) | Yes | The current IdentityState JWS compact JWS ≤ 32,768 bytes |
deviceCertificates | array<string> | Yes | The DeviceCertificate JWS of each entry of devicessame order as IdentityState devices; empty when the account is insecure |
Errors: address.invalid_local_part, identity.not_found, identity.account_deleted, core.rate_limited
08 Turning on encryption, pairing, backup and the vault
- GET
/v1/me/backup - PUT
/v1/me/backup - GET
/v1/me/pairing - POST
/v1/me/pairing - GET
/v1/me/pairing/{id} - POST
/v1/me/pairing/{id}/cancel - POST
/v1/me/pairing/{id}/join - GET
/v1/me/pairing/{id}/messages - POST
/v1/me/pairing/{id}/messages - GET
/v1/me/vault - GET
/v1/me/vault/box-keys - PUT
/v1/me/vault/box-keys/{did} - GET
/v1/me/vault/changes - GET
/v1/me/vault/grants - POST
/v1/me/vault/grants - GET
/v1/me/vault/keys - POST
/v1/me/vault/keys - GET
/v1/me/vault/records - PUT
/v1/me/vault/records - DELETE
/v1/me/vault/records/{rid} - GET
/v1/me/vault/records/{rid}
GET /v1/me/backup
Variant 1 of 2
Returns the active KeyBackup without nonce and ct, plus downloadAllowed and phraseChangePending, so a client can plan a restore; not counted against download limits.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
part | string | Yes | Selects the metadata-only response. literal "meta" |
Response: 200, 404 with KeyBackup (without nonce and ct) + BackupMetaExtras
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Format version. 1 |
addr | string | Yes | Account address. canonical address |
igen | integer | Yes | Identity generation whose keys the backup holds. |
ikf | string | Yes | Identity public key thumbprint. RFC 7638 thumbprint, base64url, 43 chars |
vgen | integer | Yes | Newest vault generation in the payload. 1 to 4,294,967,295 |
phraseId | base64url | Yes | Phrase ID of the phrase that opens the backup. 16 bytes |
kdf | Argon2idParams | Yes | Argon2id parameters. 04 §12.2 |
ver | integer | Yes | Backup version. server-assigned, from 1, never reused |
state | enum KeyBackupState | Yes | Backup state. active (staged never returned) |
updatedAt | timestamp | Yes | Time of the write. |
updatedBy | string | Yes | Device whose session wrote it. did |
downloadAllowed | boolean | Yes | Whether a full GET by this session would pass §5.7 now (ignoring rate limits); false means fresh authentication is needed first. |
phraseChangePending | boolean | Yes | Whether a new recovery phrase is required before the KeyBackup may be rewritten under the current one (§10.8). |
Errors: backup.not_found
Variant 2 of 2
Downloads the full active KeyBackup (counted against download limits and logged in the device activity log).
Response: 200, 403, 404, 429 with KeyBackup
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
(all KeyBackup members) | KeyBackup | Yes | Full object including nonce and ct. Response carries Cache-Control: no-store. §5.1 |
Errors: backup.not_found, auth.reauth_required, core.rate_limited
PUT /v1/me/backup
Stages a KeyBackup for an identity about to be registered or reset (stage: true), or atomically replaces the active KeyBackup with compare-and-set on prevVer.
Request body: KeyBackupWrite
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
v | integer | Yes | Format version. must be 1 |
addr | string | Yes | Account address. must equal the account's canonical address |
igen | integer | Yes | Identity generation. staged: current igen + 1; update: current igen |
ikf | string | Yes | Identity key thumbprint. base64url 43 chars; update: equal to current identity's |
vgen | integer | Yes | Newest vault generation in payload. staged: 1; update: not lower than active backup's, not higher than vault's current |
phraseId | base64url | Yes | Phrase ID of the phrase that opens it. 16 bytes |
kdf | Argon2idParams | Yes | KDF parameters. producer values v 19, m 65536, t 3, p 1, 16-byte salt; must be within 04 §12.1 verifier ranges |
nonce | base64url | Yes | AES-GCM nonce. 12 bytes |
ct | base64url | Yes | AES-256-GCM ciphertext with 16-byte tag. decoded length ≤ maxBackupBytes; clients keep ≤ 16 KiB |
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 |
Response: 200, 201, 400, 403, 409, 413, 429 with KeyBackup
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
(stored KeyBackup) | KeyBackup | Yes | The stored KeyBackup object. 201 with state staged for staging; 200 for update |
Errors: backup.invalid, core.too_large, crypto.kdf_params_rejected, crypto.unsupported_algorithm, backup.identity_mismatch, core.rate_limited, security.device_not_enrolled, backup.version_conflict, backup.stale_generation, backup.phrase_change_required
GET /v1/me/pairing
Lists open sessions this device may join or takes part in (at most 3, no pagination).
Response: 200, 403, 409 with inline { items: [PairingSession] }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<PairingSession> | Yes | Enrolled caller: sessions created by a new device with no approver yet, and sessions where it is approver. Unenrolled caller: sessions created by an enrolled device with no new device yet, and sessions where it is the new device. at most 3 |
Errors: pairing.unsupported_client, pairing.account_not_secure
POST /v1/me/pairing
Creates a pairing session in state waiting; if the caller is the new device, prompts every enrolled device via pairing.requested and push.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
displayer | enum Displayer | No | Which device will display the credentials. default new_device when caller unenrolled, enrolled_device when enrolled; enrolled caller may not ask for new_device |
Response: 201, 403, 409, 429 with PairingSession
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
(PairingSession) | PairingSession | Yes | The new session. §6.2 |
Errors: pairing.role_mismatch, core.rate_limited, pairing.unsupported_client, pairing.account_not_secure
GET /v1/me/pairing/{id}
Reads one pairing session (to either participant or any device the list would include it for).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. |
Response: 200, 403, 404, 409 with PairingSession
Errors: pairing.not_found, pairing.unsupported_client, pairing.account_not_secure
POST /v1/me/pairing/{id}/cancel
Cancels a session (participant) or denies a prompt (prompted enrolled device); moves it to cancelled and notifies participants and prompted devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | enum PairingCancelReason | Yes | denied = user answered "No, that's not me"; cancelled = participant cancels. denied | cancelled |
Response: 200, 403, 404, 409 with PairingSession
Errors: pairing.not_found, pairing.ended, pairing.already_joined, pairing.unsupported_client, pairing.account_not_secure
POST /v1/me/pairing/{id}/join
Takes the missing role (approver must be enrolled, new device unenrolled); moves session to joined and notifies participants and prompted devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. |
Request body: inline (empty object {})
Response: 200, 403, 404, 409, 410 with PairingSession
Errors: pairing.not_found, pairing.expired, pairing.already_joined, pairing.ended, pairing.role_mismatch, pairing.unsupported_client, pairing.account_not_secure
GET /v1/me/pairing/{id}/messages
Polls protocol messages addressed to the caller with index above after; used when the WebSocket is down (at most once per second).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
after | integer | No | Return messages with index above n. default 0 |
Response: 200, 403, 404, 409 with inline { items: [PairingMessageItem] }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<PairingMessageItem> | Yes | Each { n, type, from, body, sentAt }; from is the sender's did. |
Errors: pairing.not_found, pairing.unsupported_client, pairing.account_not_secure
POST /v1/me/pairing/{id}/messages
Sends one pairing protocol message (CPace, payload, ack or abort) to the other participant; the server relays it as pairing.message and applies the state transition.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | pairingId. |
Request body: PairingMessageRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | enum PairingMessageType | Yes | Message type. cpace_a | cpace_b | confirm_a | payload | ack | abort |
body | object | Yes | Type-specific body (§6.6.2). ≤ 64 KiB for payload, ≤ 2 KiB otherwise |
Response: 202, 403, 404, 409, 413 with inline { n }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
n | integer | Yes | Index assigned to the stored message. from 1 |
Errors: pairing.not_found, pairing.ended, core.too_large, pairing.out_of_order, pairing.unsupported_client, pairing.account_not_secure
GET /v1/me/vault
Returns the vault summary: igen, current vgen (0 = uninitialized), rotationPending, vseq, counts, quota and retired vaults.
Response: 200, 403 with VaultSummary
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation of the vault. |
vgen | integer | Yes | Current vault generation. 0 while uninitialized |
rotationPending | boolean | Yes | A rotation is needed (§10.4). |
vseq | integer | Yes | Latest change sequence. |
recordCount | integer | Yes | Number of records. |
bytesUsed | integer | Yes | Bytes counted against quota. |
quotaBytes | integer | Yes | Quota (maxVaultBytes). |
retired | array<{igen, expiresAt}> | Yes | Retired vaults readable until expiresAt. |
Errors: security.device_not_enrolled
GET /v1/me/vault/box-keys
Lists BoxKeys of devices listed active in the current IdentityState.
Response: 200, 403 with inline { items: [BoxKey] }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<BoxKey> | Yes | Box keys of active devices. |
Errors: security.device_not_enrolled
PUT /v1/me/vault/box-keys/{did}
Uploads the device's public X25519 box key, bound by its DeviceCertificate (dbk) and a DSK signature.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Device ID. must equal the session's device |
Request body: BoxKey
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
did | string | Yes | Device ID. equal to path and session's device |
igen | integer | Yes | Identity generation. current |
pub | base64url | Yes | X25519 public key. 32 bytes; equal to x of devcert's dbk |
devcert | string | Yes | The device's certificate. DeviceCertificate JWS |
sig | base64url | Yes | Binding signature. labelled signature, label vault-box-key, by DSK over BoxKeyTBS |
Response: 200, 400, 403 with BoxKey
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
createdAt | timestamp | Yes | Storage time. set by server |
GET /v1/me/vault/changes
Change feed: the current version (including tombstones) of every record with vseq above since, in vseq order.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
since | integer | Yes | Return changes after this vseq. a vseq; 0 to start |
limit | integer | No | Max items. 1 to 500, default 200 |
type | string | No | Types whose nonce and ct are wanted; other types returned as headers only. repeatable |
Response: 200, 403, 409, 410 with VaultChangesPage
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<VaultRecord> | Yes | Changed records. headers only for types not requested |
vseq | integer | Yes | Cursor: vseq of last item, or since when no items. |
headVseq | integer | Yes | Vault's newest vseq when built. informative |
hasMore | boolean | Yes | Continue with since = vseq while true. |
Errors: vault.changes_expired, vault.not_initialized, security.device_not_enrolled
GET /v1/me/vault/grants
Returns the newest VaultKeyGrant addressed to the session's device; 404 triggers vault.grant_needed to other devices.
Response: 200, 403, 404, 409 with VaultKeyGrant
Errors: vault.grant_not_found, vault.not_initialized, security.device_not_enrolled
POST /v1/me/vault/grants
Posts VaultKeyGrants of the current generation for devices that lack one.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | Generation granted. MUST be the current generation |
grants | array<{did, enc, ct}> | Yes | Grants per recipient device. enc 32 bytes, ct 48 bytes base64url |
Response: 200, 403, 409 with VaultGrantsPostResponse
| 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 |
Errors: vault.stale_generation, vault.not_initialized, security.device_not_enrolled
GET /v1/me/vault/keys
Returns vault generations with kcv, VaultKeyLinks, generation signatures and rotation/orphan/phrase-change flags.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | No | Read a retired vault's generations. a retired generation |
Response: 200, 403, 410 with VaultKeysState
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. |
vgen | integer | Yes | Current generation. |
rotationPending | boolean | Yes | A delisted device makes a new generation necessary. |
pendingAt | timestamp|null | Yes | Since when rotation is pending. |
phraseChangePending | boolean | Yes | A device was delisted as lost or stolen since the last phrase change. |
orphaned | boolean | Yes | Current generation's creator isn't active and no active device holds a grant for it. |
generations | array<VaultGeneration> | Yes | All generations. |
POST /v1/me/vault/keys
Creates vault generation 1 (initialization) or a new generation (rotation, or recovery of an orphaned generation) with its link, signature and grants.
Request body: VaultGenerationCreate
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | Yes | Identity generation. current igen |
vgen | integer | Yes | New generation number. 1 for init; prevVgen + 1 otherwise |
prevVgen | integer | Yes | Generation being superseded. 0 for generation 1; must be current generation |
kcv | base64url | Yes | kcv(vgen). 8 bytes |
link | VaultKeyLink|null | Yes | { linkedVgen, nonce, ct } wrapping the previous key. null for generation 1 |
grants | array<{did, enc, ct}> | Yes | VaultKeyGrants for every verified other device. [] for generation 1 |
idStateVer | integer | Yes | ver of the IdentityState used (V3). |
createdBy | string | Yes | Creating device. did; must be the session's device |
devcert | string | Yes | Creator's DeviceCertificate. DeviceCertificate JWS |
sig | base64url | Yes | Generation signature over VaultGenerationTBS. labelled signature, label vault-generation |
Response: 200, 201, 400, 403, 409 with keys object (VaultKeysState) on 200 for an idempotent generation 1; 201 on creation (body not stated)
Errors: vault.invalid_generation, vault.generation_conflict, security.device_not_enrolled
GET /v1/me/vault/records
Lists vault records (no tombstones), ordered by rid, optionally filtered by type or bucket, or from a retired vault by igen.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
type | string | No | Filter by type. record type |
bucket | base64url | No | Filter by bucket (lazy per-context download). 16 bytes |
igen | integer | No | Read a retired vault. a retired generation |
cursor | string | No | Collection cursor. opaque |
limit | integer | No | Page size. 1 to 500, default 100 |
Response: 200, 403, 409, 410 with inline { items: [VaultRecord], nextCursor }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<VaultRecord> | Yes | Records ordered by rid. |
nextCursor | string|null | Yes | Next page cursor. null at end |
Errors: security.device_not_enrolled, vault.not_initialized, vault.retired_expired
PUT /v1/me/vault/records
Writes 1 to 100 records, each an independent atomic compare-and-set on ver; returns one result per item.
Request body: inline { records: [VaultRecordWrite] }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
records | array<VaultRecordWrite> | Yes | Records to write. 1 to 100 items |
Response: 200, 400, 403, 409 with VaultWriteResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<VaultWriteResult> | Yes | { rid, ok: true, ver, vseq } or { rid, ok: false, error: problem object }. one per item, in order |
vseq | integer | Yes | Vault vseq after the request. |
Errors: vault.version_conflict, vault.stale_generation, vault.rotation_required, vault.record_too_large, vault.quota_exceeded, core.invalid_request, vault.not_initialized, security.device_not_enrolled
DELETE /v1/me/vault/records/{rid}
Replaces a record with a tombstone (ver n + 1, new vseq, deleted: true, no ct) if its ver is n.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
rid | base64url | Yes | Record ID. 16 bytes |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ifVer | integer | Yes | Compare-and-set version. the current ver |
Response: 200, 403, 404, 409 with VaultRecord (tombstone)
Errors: vault.version_conflict, core.not_found, security.device_not_enrolled, vault.not_initialized
GET /v1/me/vault/records/{rid}
Reads one vault record; tombstones give 404.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
rid | base64url | Yes | Record ID. 16 bytes, 22 chars |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
igen | integer | No | Read from a retired vault. a retired generation |
Response: 200, 403, 404, 409, 410 with VaultRecord
Errors: core.not_found, security.device_not_enrolled, vault.not_initialized, vault.retired_expired
09 Communities, membership, channels and security transitions
- GET
/v1/channels - POST
/v1/channels - DELETE
/v1/channels/{id} - GET
/v1/channels/{id} - PATCH
/v1/channels/{id} - POST
/v1/channels/{id}/join - POST
/v1/channels/{id}/leave - GET
/v1/channels/{id}/members - GET
/v1/channels/{id}/members/{addr} - GET
/v1/community - PATCH
/v1/community - GET
/v1/community/categories - POST
/v1/community/categories - DELETE
/v1/community/categories/{id} - PATCH
/v1/community/categories/{id} - DELETE
/v1/community/icon - GET
/v1/community/icon - PUT
/v1/community/icon - POST
/v1/community/join - PATCH
/v1/community/layout - POST
/v1/community/leave - GET
/v1/community/members - GET
/v1/community/members/{addr} - POST
/v1/community/members/{addr}/approve - POST
/v1/community/members/{addr}/reject - POST
/v1/community/membership-check - GET
/v1/invites - POST
/v1/invites - DELETE
/v1/invites/{code} - GET
/v1/invites/{code} - GET
/v1/me/communities - PATCH
/v1/me/communities - DELETE
/v1/me/communities/{domain} - PUT
/v1/me/communities/{domain}
GET /v1/channels
Every channel the caller can view plus categories; non-members get previewVisible channels; never paginated.
Response: 200 with ChannelList
POST /v1/channels
Create a text or voice channel (manage_channels); secure channels start with no MLS group.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Channel display name display name; local part derived via 01 rules |
kind | ChannelKind | Yes | Immutable kind text|voice |
security | ChannelSecurity | No | Security mode default insecure on insecure server, secure on secure server; insecure on secure server fails security.server_requires_secure |
retentionDays | integer|null | No | Retention 1-36500 or null; default null |
topic | string | No | Topic default ""; Text(1024) |
categoryId | uuidv7|null | No | Category default null; unknown fails channel.category_not_found |
position | integer | No | Position default last in category; later channels move down by one |
Response: 201 with Channel
Errors: core.forbidden, address.*, security.server_requires_secure, channel.category_not_found, channel.limit_reached
DELETE /v1/channels/{id}
Delete a channel: end call, emit channel.deleted, end subscriptions, retire MLS group, release local part, keep 410 tombstone ≥400 days.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Response: 204
Errors: core.not_found, core.forbidden
GET /v1/channels/{id}
One channel; 410 tombstone (channel.deleted) for at least 400 days after deletion.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Response: 200, 410 with Channel
Errors: core.not_found, channel.deleted
PATCH /v1/channels/{id}
Variant 1 of 3
Change channel settings (view, then manage_channels); emits channel.updated with changed member names.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Request body: inline (PATCH)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | Display name same derived local part = display change; different = address change (old address reserved 90 days) |
topic | Text(1024) | No | Topic single line |
retentionDays | integer|null | No | Retention 1-36500 or null |
categoryId | uuidv7|null | No | Category |
position | integer | No | Position |
ifVersion | integer | No | Optimistic concurrency |
Response: 200 with Channel
Errors: core.not_found, core.forbidden, channel.kind_immutable, channel.version_conflict, core.invalid_request, address.display_name_mismatch, address.too_similar, address.*, channel.category_not_found
Variant 2 of 3
Channel upgrade dry run ({security:secure, dryRun:true}); changes nothing; returns an UpgradePlan. Allowed to an insecure admin.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
security | string | Yes | Target secure |
dryRun | boolean | Yes | Dry run true |
ifVersion | integer | No | As §2 |
Response: 200 with UpgradePlan
Errors: core.not_found, core.forbidden, channel.already_secure
Variant 3 of 3
Confirm channel upgrade with planVersion and a one-member GroupBootstrap; server performs atomic switch S1-S8, A1-A4 and returns the updated Channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
security | string | Yes | Target; insecure on secure channel fails security.downgrade_forbidden secure |
dryRun | boolean | No | Dry run default false |
planVersion | string | Yes | Plan version (§10.6) from the confirmed dry run; missing fails core.invalid_request |
deletePreUpgradeHistory | boolean | No | Delete pre-upgrade content default false |
bootstrap | GroupBootstrap | Yes | Caller's one-member group 13 §7.4: generation, groupInfo, ekid; generation 1 for a first upgrade; missing fails channel.bootstrap_required |
ifVersion | integer | No | As §2 |
Response: 200 with Channel
Errors: core.not_found, core.forbidden, channel.already_secure, security.account_required, security.device_not_enrolled, channel.upgrade_in_progress, core.invalid_request, channel.upgrade_plan_stale, channel.bootstrap_required, mls.group_id_mismatch, mls.credential_rejected, mls.policy_violation, security.downgrade_forbidden
POST /v1/channels/{id}/join
Become a channel member (silent, on first open); runs channel access procedure H1-H7, H9.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Request body: empty JSON object {}
Response: 200 with { member: ChannelMember, channel: Channel }
Errors: core.unauthenticated, security.upgrade_required, core.not_found, channel.deleted, member.pending, moderation.banned, member.not_member, security.account_required, security.device_not_enrolled, federation.home_unreachable, moderation.timed_out, core.forbidden, moderation.new_member_restricted
POST /v1/channels/{id}/leave
Leave the channel; 204 also when not a member.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
Response: 204
GET /v1/channels/{id}/members
Collection page of ChannelMember objects for anyone who can view the channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | string | No | State filter subset of active,needs_encryption (default), left needs manage_channels |
q | string | No | Search 1-64 characters |
cursor | string | No | Cursor |
limit | integer | No | Page size |
Response: 200 with collection page of ChannelMember
Errors: core.not_found, core.forbidden
GET /v1/channels/{id}/members/{addr}
One ChannelMember record.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | string | Yes | Channel identifier channel UUIDv7 or full context reference ch:<UUIDv7>; colon may be percent-encoded (ABNF channel-id) |
addr | string | Yes | Member's account address canonical address, percent-encoded UTF-8 (RFC 3986); '@' needn't be encoded; alias of the server's own domains accepted and rewritten |
Response: 200 with ChannelMember
Errors: member.not_found, core.not_found
GET /v1/community
Return the public Community object; CORS-enabled.
Response: 200 with Community
PATCH /v1/community
Variant 1 of 3
Change community settings (needs manage_community); returns updated Community and emits community.updated.
Request body: inline (PATCH)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | Text(64) | No | Community name 1-64 scalar values after trimming, single line |
description | Text(1000) | No | Description multi-line, may be empty |
joinPolicy | JoinPolicy | No | Join policy (§3.3) open|invite|request|closed |
requireRulesAcceptance | boolean | No | Require rules acceptance to join |
rulesText | Text(8000) | No | Community rules multi-line; change increments rulesVersion |
localAccountsAreMembers | boolean | No | D-068 toggle |
defaultChannel | string|null | No | Channel opened after join ch: reference of a previewVisible channel, else 404 core.not_found; null resets |
ifVersion | integer | No | Optimistic concurrency must equal current version else 409 community.version_conflict |
Response: 200 with Community
Errors: core.invalid_request, core.forbidden, community.version_conflict, core.not_found, security.downgrade_forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
Variant 2 of 3
Server upgrade dry run ({secure:true, dryRun:true}); changes nothing and returns a ServerUpgradePlan. Needs 10's admin role and a local account.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
secure | boolean | Yes | Upgrade target true |
dryRun | boolean | Yes | Dry run true for dry run |
ifVersion | integer | No | As §2 |
Response: 200 with ServerUpgradePlan
Errors: core.forbidden (data.missingRole: "admin"), community.local_admin_required
Variant 3 of 3
Confirm the irreversible server upgrade; server applies T1-T7 and U1-U3 atomically before answering with the Community.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
secure | boolean | Yes | false on a secure server fails security.downgrade_forbidden true |
dryRun | boolean | No | Dry run flag default false |
planVersion | string | Yes | From the dry run the admin confirmed required when dryRun is false; 22-char base64url (§10.6) |
confirmDomain | string | Yes | Domain typed/confirmed in W5 required when dryRun is false; must equal canonical domain |
deletePreUpgradeHistory | boolean | No | Delete pre-upgrade messages of every channel default false |
ifVersion | integer | No | As §2 |
Response: 200 with Community
Errors: core.invalid_request, core.forbidden (data.missingRole: "admin"), community.local_admin_required, security.account_required, security.device_not_enrolled, community.confirmation_mismatch, community.upgrade_in_progress, community.upgrade_plan_stale, security.downgrade_forbidden
GET /v1/community/categories
List categories as { items, nextCursor: null }.
Response: 200 with { items: [Category], nextCursor: null }
Errors: security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/categories
Create a category (manage_channels); emits community.layout_changed.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | Text(100) | Yes | Category name 1-100 scalar values, single line |
position | integer | No | Order among categories default last |
Response: 201 with Category
Errors: channel.limit_reached, core.forbidden, core.invalid_request, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
DELETE /v1/community/categories/{id}
Delete a category; its channels become uncategorized, appended in old order after existing uncategorized channels.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Category ID |
Response: 204
Errors: core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
PATCH /v1/community/categories/{id}
Rename or reposition a category (manage_channels); emits community.layout_changed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Category ID |
Request body: inline (PATCH)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | Text(100) | No | Name 1-100 |
position | integer | No | Position |
ifVersion | integer | No | As §2 |
Response: 200 with Category
Errors: core.forbidden, core.invalid_request, core.not_found, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
DELETE /v1/community/icon
Set icon to null (needs manage_community) and emit community.updated.
Errors: core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
GET /v1/community/icon
Return the community icon image bytes with its media type; Cache-Control: public, max-age=86400; CORS.
Response: 200 with binary image (image/png|image/jpeg|image/webp)
PUT /v1/community/icon
Upload a new community icon (raw image body with Content-Type); needs manage_community; returns the updated Community.
Request body: raw image bytes (Content-Type image/png|image/jpeg|image/webp), at most maxCommunityIconBytes
Response: 200 with Community
Errors: community.icon_invalid, core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/join
Join the community (local or remote account) through the join-gate procedure C1-C10; also records rules acceptance for existing members.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
invite | string | No | Invite code any accepted input form (§8.2) |
acceptRules | integer | No | rulesVersion the person accepted required when requireRulesAcceptance is true; must equal current rulesVersion |
Response: 200, 202 with JoinCommunityResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | CommunityMember | Yes | The record |
community | Community | Yes | Full Community object |
openChannel | string|null | Yes | Invite's channel if viewable, else defaultChannel ch: reference |
inviteIgnored | string|null | Yes | Code of an invalid invite that was ignored (C8) error code |
Errors: core.unauthenticated, security.upgrade_required, moderation.banned, federation errors (06), security.account_required, community.closed, community.invite_required, invite.not_found, invite.expired, invite.used_up, invite.revoked, community.rules_acceptance_required, core.rate_limited
PATCH /v1/community/layout
Replace category and channel order in one step; needs manage_channels over every channel.
Request body: LayoutChange
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
categories | array<uuidv7> | Yes | Category order every category exactly once |
channels | array<{ctx, categoryId}> | Yes | Channel placement every channel exactly once; order within each category becomes position 0,1,2… |
Response: 200
Errors: core.invalid_request, core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/leave
Leave the community or withdraw a pending request; channel memberships go left (community_left) and calls end.
Request body: empty
Response: 204
GET /v1/community/members
Collection page of CommunityMember objects ordered by addr byte-wise; caller must be a community member.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | string | No | State filter comma-separated subset of active,needs_encryption,pending,banned,left; default active,needs_encryption; pending needs manage_invites, banned needs ban_members, left needs view_audit_log |
q | string | No | Search 1-64 characters; minimalPrepare prefix match on local part and display-name words |
cursor | string | No | Pagination cursor (00 §7.10) |
limit | integer | No | Page size (00 §7.10) |
Response: 200 with collection page of CommunityMember
Errors: member.not_member, core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
GET /v1/community/members/{addr}
One CommunityMember record (caller must be a community member or the account itself).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Member's account address canonical address, percent-encoded UTF-8 (RFC 3986); '@' needn't be encoded; alias of the server's own domains accepted and rewritten |
Response: 200 with CommunityMember
Errors: member.not_found, address.non_canonical, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/members/{addr}/approve
Approve a pending join request (manage_invites; for a bot also manage_bots); record becomes active.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Member's account address canonical address, percent-encoded UTF-8 (RFC 3986); '@' needn't be encoded; alias of the server's own domains accepted and rewritten |
Response: 200 with CommunityMember
Errors: member.not_pending, core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/members/{addr}/reject
Reject a pending join request; deletes the record and sends member.rejected (reason rejected) to the requester.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Member's account address canonical address, percent-encoded UTF-8 (RFC 3986); '@' needn't be encoded; alias of the server's own domains accepted and rewritten |
Response: 204
Errors: member.not_pending, core.forbidden, security.upgrade_required (every /v1/community… endpoint for an upgrade_required account except POST /v1/community/leave)
POST /v1/community/membership-check
Server-to-server check whether addresses are community members, on behalf of one of the caller's own member accounts (used by 12 auto-accept).
Request body: MembershipCheckRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
onBehalfOf | string | Yes | Asking account canonical address; its domain must equal the token's iss; must be a community member |
onBehalfOfInc | string | Yes | Asking account's incarnation must equal the member record's inc |
addrs | array<string> | Yes | Addresses to check 1-20 canonical addresses |
Response: 200 with MembershipCheckResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<MembershipCheckResult> | Yes | One result per address in request order |
Errors: member.not_member, core.rate_limited
GET /v1/invites
Collection page of invites: all for manage_invites holders, otherwise the caller's own (needs community-level create_invites).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | string | No | Invite state filter (values not specified) |
cursor | string | No | Cursor |
limit | integer | No | Page size |
Response: 200 with collection page of Invite
Errors: core.forbidden
POST /v1/invites
Create an invite (create_invites in the target channel, defaultChannel, or community level); emits invite.created.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
channel | string|null | No | Channel to open after join default null; must be viewable by creator else 404 core.not_found |
maxAgeMs | integer|null | No | Lifetime default 604800000 (7 d); 300000-31536000000, or null (never; needs manage_invites) |
maxUses | integer|null | No | Use limit default null; 1-10000 |
allowSignUp | boolean | No | Can be used for sign-up default true; false needs manage_invites |
Response: 201 with Invite
Errors: invite.not_allowed, invite.limit_reached, core.not_found, core.forbidden
DELETE /v1/invites/{code}
Revoke an invite (creator or manage_invites); returns the Invite with state revoked.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
code | string | Yes | Invite code any accepted input form; normalized per §8.2 |
Response: 200 with Invite
Errors: core.forbidden, invite.not_found
GET /v1/invites/{code}
Unauthenticated public preview of an invite: community public data, one channel's name and security, creator.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
code | string | Yes | Invite code any accepted input form; normalized per §8.2 |
Response: 200 with InvitePreview
Errors: invite.not_found, invite.expired, invite.used_up, invite.revoked, core.rate_limited
GET /v1/me/communities
The account's community list at its home server, ordered by position.
Response: 200 with { items: [CommunityListEntry], nextCursor: null }
PATCH /v1/me/communities
Reorder the community list; order lists every domain once.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
order | array<string> | Yes | New order every domain exactly once |
Response: 200 with { items: [CommunityListEntry], nextCursor: null }
DELETE /v1/me/communities/{domain}
Remove a community list entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Community list entry key canonical domain; non-canonical may fail with address.non_canonical |
Response: 204
Errors: core.invalid_request (on the local:true entry), address.non_canonical
PUT /v1/me/communities/{domain}
Add or update a community list entry; client MUST call after a join returning 200 or 202.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
domain | string | Yes | Community list entry key canonical domain; non-canonical may fail with address.non_canonical |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Cached name at most 64 scalar values |
iconUrl | string|null | Yes | Cached icon URL |
secure | boolean | Yes | Cached secure flag |
state | string | Yes | Cached membership state active|pending|needs_encryption |
position | integer | No | Sidebar position default last |
Response: 200 with CommunityListEntry
Errors: core.invalid_request (on the local:true entry), address.non_canonical, community.list_full
10 Roles, permissions, moderation and reports
- GET
/v1/audit-log - GET
/v1/bans - POST
/v1/bans - DELETE
/v1/bans/{banId} - GET
/v1/bans/{banId} - PATCH
/v1/bans/{banId} - POST
/v1/moderation/kicks - GET
/v1/moderation/members/{address} - POST
/v1/moderation/message-deletions - GET
/v1/moderation/policy - PATCH
/v1/moderation/policy - GET
/v1/moderation/server-mutes - POST
/v1/moderation/server-mutes - DELETE
/v1/moderation/server-mutes/{address} - GET
/v1/moderation/server-mutes/{address} - GET
/v1/moderation/timeouts - POST
/v1/moderation/timeouts - DELETE
/v1/moderation/timeouts/{address} - GET
/v1/moderation/timeouts/{address} - GET
/v1/reports - POST
/v1/reports - DELETE
/v1/reports/{id} - GET
/v1/reports/{id} - PATCH
/v1/reports/{id} - GET
/v1/reports/{id}/attachments/{attachmentId} - GET
/v1/reports/{id}/evidence/{mid} - GET
/v1/reports/{id}/evidence/{mid}/attachments/{attachmentId} - POST
/v1/reports/{id}/forward - GET
/v1/roles - POST
/v1/roles - DELETE
/v1/roles/{roleId} - GET
/v1/roles/{roleId} - PATCH
/v1/roles/{roleId} - GET
/v1/roles/{roleId}/members - DELETE
/v1/roles/{roleId}/members/{address} - PUT
/v1/roles/{roleId}/members/{address} - GET
/v1/roles/members/{address} - GET
/v1/roles/overwrites/{ctx} - DELETE
/v1/roles/overwrites/{ctx}/member/{address} - PUT
/v1/roles/overwrites/{ctx}/member/{address} - DELETE
/v1/roles/overwrites/{ctx}/role/{roleId} - PUT
/v1/roles/overwrites/{ctx}/role/{roleId} - POST
/v1/roles/reorder
GET /v1/audit-log
Read the audit log, newest first by seq.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size 1–100, default 50 |
action | string | No | Filter |
actor | string | No | Filter |
targetAddress | string | No | Filter |
targetType | string | No | Filter |
ctx | string | No | Filter |
reportId | string | No | Filter |
since | timestamp | No | Filter |
until | timestamp | No | Filter |
Response: 200 with {items: [AuditLogEntry], nextCursor, retentionDays}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<AuditLogEntry> | Yes | Entries |
nextCursor | string|null | Yes | Cursor |
retentionDays | integer | Yes | Retention |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
GET /v1/bans
List bans, newest first (server-scope only for admins).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size |
targetType | enum BanTargetType | No | Filter |
scope | enum BanScope | No | Filter |
address | string | No | Filter |
domain | string | No | Filter |
Response: 200 with {items: [Ban], nextCursor}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
POST /v1/bans
Ban an address or domain (scope community or server).
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | No | Address target exactly one of address/domain; any form canonicalize() accepts |
domain | string | No | Domain target exactly one of address/domain; not the server's own domains |
scope | enum BanScope | No | Scope default community; server only for address and admins |
durationMs | integer | No | Duration ≥ 3,600,000; absent = permanent |
deleteMessagesWithinMs | integer | No | Delete recent messages in every channel absent or 0 = none; else 60,000–604,800,000 |
reason | string | No | Stored in the audit log; shown to the target only if showReason is true 0–512 Unicode scalar values |
showReason | boolean | No | Whether the target sees reason default false |
reportId | uuidv7 | No | Links the audit entry to a report; added to report.actions if the report is open or in_review |
Response: 201, 200 with Ban
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, moderation.self_target, moderation.invalid_target, moderation.invalid_duration, core.invalid_request, core.rate_limited
DELETE /v1/bans/{banId}
Lift a ban early (membership becomes left, reason unbanned).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
banId | uuidv7 | Yes | Ban ID |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.ban_not_found, core.rate_limited
GET /v1/bans/{banId}
Read one ban.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
banId | uuidv7 | Yes | Ban ID |
Response: 200 with Ban
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden, moderation.ban_not_found
PATCH /v1/bans/{banId}
Change a ban's reason, showReason or expiresAt.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
banId | uuidv7 | Yes | Ban ID |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | string | No | Reason 0–512 |
showReason | boolean | No | Show reason to target |
expiresAt | timestamp|null | No | New end ≥ 1 h after createdAt; null = permanent |
Response: with Ban (not stated)
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.ban_not_found, core.rate_limited
POST /v1/moderation/kicks
Kick a member (membership becomes left, reason kicked), optionally deleting recent messages.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | string | Yes | Target canonical address |
deleteMessagesWithinMs | integer | No | Also delete recent messages absent or 0 = none; else 60,000–604,800,000 |
reason | string | No | Stored in the audit log; shown to the target only if showReason is true 0–512 Unicode scalar values |
showReason | boolean | No | Whether the target sees reason default false |
reportId | uuidv7 | No | Links the audit entry to a report; added to report.actions if the report is open or in_review |
Response: 200 with {auditId}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
auditId | uuidv7 | Yes | Primary audit entry |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, moderation.self_target, moderation.not_member, moderation.invalid_duration, core.rate_limited
GET /v1/moderation/members/{address}
One member's moderation status, filtered by the caller's permissions.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 200 with ModerationStatus (unnamed in spec)
| 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 |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
POST /v1/moderation/message-deletions
Moderator-delete messages by ID, or a member's recent messages (optionally across all channels).
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | No | Context Required unless author is given with allChannels: true; DM/group DM needs admin |
mids | array<uuidv7> | No | Message IDs in ctx 1–100; one of mids or author |
author | string | No | Author whose recent messages are deleted canonical address; one of mids or author |
withinMs | integer | No | Window before now With author; 60,000–604,800,000 |
allChannels | boolean | No | Every channel the actor has manage_messages in With author; default false |
reason | string | No | Stored in the audit log; shown to the target only if showReason is true 0–512 Unicode scalar values |
showReason | boolean | No | Whether the target sees reason default false |
reportId | uuidv7 | No | Links the audit entry to a report; added to report.actions if the report is open or in_review |
Response: 200 with inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
deleted | array<uuidv7> | Yes | Deleted mids |
notFound | array<uuidv7> | Yes | Unknown mids |
protected | array<uuidv7> | Yes | Skipped because author top ≥ actor top |
more | boolean | Yes | Repeat the request if true author mode processes at most 10,000 per request |
auditId | uuidv7 | Yes | Primary audit entry |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, moderation.timed_out, core.forbidden, moderation.target_protected, moderation.self_target, moderation.invalid_duration, core.invalid_request, core.rate_limited
GET /v1/moderation/policy
Read the AntiSpamPolicy, slowMode filtered to channels the caller can view.
Response: 200 with AntiSpamPolicy
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned
PATCH /v1/moderation/policy
JSON Merge Patch the AntiSpamPolicy.
Request body: JSON Merge Patch of AntiSpamPolicy (application/merge-patch+json or application/json)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ifVersion | integer | No | Conditional; mismatch gives 409 moderation.version_conflict |
Response: 200 with AntiSpamPolicy
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.version_conflict, core.invalid_request, core.rate_limited
GET /v1/moderation/server-mutes
List current server mutes; any member may list them (reason filtered).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size |
Response: 200 with {items: [ServerMute], nextCursor}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned
POST /v1/moderation/server-mutes
Apply or replace a community-wide server mute (audio only).
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | string | Yes | Target canonical address |
durationMs | integer | No | Duration 60,000–2,419,200,000; absent = until lifted |
reason | string | No | Stored in the audit log; shown to the target only if showReason is true 0–512 Unicode scalar values |
showReason | boolean | No | Whether the target sees reason default false |
reportId | uuidv7 | No | Links the audit entry to a report; added to report.actions if the report is open or in_review |
Response: with ServerMute (status not stated)
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, moderation.self_target, moderation.not_member, moderation.invalid_duration, core.rate_limited
DELETE /v1/moderation/server-mutes/{address}
Lift a server mute.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, core.rate_limited
GET /v1/moderation/server-mutes/{address}
Read one server mute.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 200 with ServerMute
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned
GET /v1/moderation/timeouts
List active timeouts.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size |
Response: 200 with {items: [Timeout], nextCursor}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
POST /v1/moderation/timeouts
Apply or replace a member's timeout.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
member | string | Yes | Target canonical address |
durationMs | integer | Yes | Duration 60,000–2,419,200,000 (1 min–28 days) |
reason | string | No | Stored in the audit log; shown to the target only if showReason is true 0–512 Unicode scalar values |
showReason | boolean | No | Whether the target sees reason default false |
reportId | uuidv7 | No | Links the audit entry to a report; added to report.actions if the report is open or in_review |
Response: with Timeout (status not stated; 200 with existing object on retry)
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, moderation.self_target, moderation.not_member, moderation.invalid_duration, core.rate_limited
DELETE /v1/moderation/timeouts/{address}
Lift a timeout early.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, moderation.target_protected, core.rate_limited
GET /v1/moderation/timeouts/{address}
Read one timeout (the target may read their own).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 200 with Timeout
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
GET /v1/reports
Variant 1 of 2
Report queue: reports the caller can see, oldest open first.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size |
status | enum ReportStatus | No | Filter |
ctx | string | No | Filter |
target | string | No | Filter |
category | enum ReportCategory | No | Filter |
origin | enum ReportOrigin | No | Filter |
assignee | string | No | Filter |
Response: 200 with {items: [Report], nextCursor}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.forbidden
Variant 2 of 2
The caller's own reports (reporter view), newest first; spec writes it as GET /v1/reports?mine=true.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
mine | boolean | Yes | Select own reports must be true |
limit | integer | No | Page size |
Response: 200 with {items: [ReporterView], nextCursor}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required
POST /v1/reports
File a report at the hosting server (or at the reporter's home server for §10.10 cases).
Request body: ReportRequest (inline)
| 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 |
Response: 201 with Report (reporter view)
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, core.forbidden, core.invalid_request, report.invalid_items, report.too_many_items, report.duplicate, report.unverifiable, core.rate_limited
DELETE /v1/reports/{id}
Withdraw one's own open report with no linked actions.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
Errors: core.unauthenticated, core.token_expired, report.not_found, report.status_conflict
GET /v1/reports/{id}
Moderator view (evidence withheld unless secure account on enrolled device for secure contexts), or reporter view for the reporter.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
Response: 200 with Report | ReporterView
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, report.not_found
PATCH /v1/reports/{id}
Change status, resolution, resolutionNote, assignee, and (admins) preserveEvidence.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
status | enum ReportStatus | No | New status transitions per §10.6 |
resolution | enum ReportResolution | No | Resolution with resolved |
resolutionNote | string|null | No | Internal note 0–2,000 characters |
assignee | string|null | No | Moderator |
preserveEvidence | boolean | No | Legal hold admins only |
ifVersion | integer | No | Mismatch: 409 report.version_conflict |
Response: with Report (not stated)
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, report.not_found, report.status_conflict, report.version_conflict, core.forbidden, moderation.timed_out
GET /v1/reports/{id}/attachments/{attachmentId}
Download an evidence attachment blob (encrypted in secure contexts; decrypt with the item's fileKey).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
attachmentId | string | Yes | Attachment ID |
Response: 200 with binary blob
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, report.not_found, security.account_required, security.device_not_enrolled
GET /v1/reports/{id}/evidence/{mid}
S2S: one reported item's full evidence for a forwarded report. Allowed only for an S2S token whose iss is in the report's forwardedTo, for 30 days after forwarding.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
mid | uuidv7 | Yes | Message ID of a reported item |
Response: 200 with ReportItem
GET /v1/reports/{id}/evidence/{mid}/attachments/{attachmentId}
S2S: evidence attachment blob of a reported item, as stored. Allowed only for an S2S token whose iss is in the report's forwardedTo, for 30 days after forwarding.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
mid | uuidv7 | Yes | Message ID of a reported item |
attachmentId | string | Yes | Attachment ID |
Response: 200 with binary blob
POST /v1/reports/{id}/forward
Admin forwards a report to the target's home server (empty body).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Report ID |
Response: 202 with {forwardedTo: [domain]}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
forwardedTo | array<string> | Yes | Domains forwarded to |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, report.not_found, report.not_forwardable, core.forbidden
GET /v1/roles
List the community's roles, ordered by position ascending.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size; one page normally holds every role 1–250, default 250 |
Response: 200 with {items: [Role], nextCursor}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<Role> | Yes | Roles |
nextCursor | string|null | Yes | null at end |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned
POST /v1/roles
Create an ordinary role below the actor's top position.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Role name 1–40 Unicode scalar values after NFC; see Role.name |
permissions | array<Permission> | No | Permission names; each must be held by the actor (§4.3 rule 2) |
color | string|null | No | Colour #rrggbb lowercase |
showSeparately | boolean | No | Group holders under own heading default false |
position | integer | No | Position default 1; MUST be below top(actor) |
Response: 201 with Role
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, role.hierarchy, permission.not_held, permission.unknown, role.name_invalid, role.name_taken, role.limit_reached, core.rate_limited
DELETE /v1/roles/{roleId}
Delete an ordinary role; holders lose it, its overwrites are deleted, positions renumbered.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
Response: 204
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found, moderation.timed_out, core.forbidden, role.hierarchy, role.system_role, core.rate_limited
GET /v1/roles/{roleId}
Get one role.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
Response: 200 with Role
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found
PATCH /v1/roles/{roleId}
Edit a role's name, colour, showSeparately or permissions (replace or add/remove form), optionally conditional on version.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | No | New name Role.name rules |
color | string|null | No | New colour #rrggbb lowercase |
showSeparately | boolean | No | New value |
permissions | array<Permission> | No | Replace the whole list MUST NOT be combined with addPermissions/removePermissions; every name added or removed must satisfy §4.3 rule 2 |
addPermissions | array<Permission> | No | Add these (preferred form; preserves unknown names) No name in both add and remove |
removePermissions | array<Permission> | No | Remove these No name in both add and remove |
ifVersion | integer | No | Conditional edit; mismatch gives 409 role.version_conflict |
Response: 200 with Role
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found, moderation.timed_out, core.forbidden, role.hierarchy, permission.not_held, permission.unknown, role.system_role, role.version_conflict, role.name_invalid, role.name_taken, core.invalid_request, core.rate_limited
GET /v1/roles/{roleId}/members
List a role's holders (cursor-paged).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor from nextCursor (00 §7.10) opaque |
limit | integer | No | Page size (range not stated in 10) |
Response: 200
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found
DELETE /v1/roles/{roleId}/members/{address}
Remove a role from a member, or step down from one's own role.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 204
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found, moderation.timed_out, core.forbidden, role.hierarchy, role.last_admin, role.system_role, core.rate_limited
PUT /v1/roles/{roleId}/members/{address}
Grant a role to a member (empty body); idempotent.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 200 with {address, roleIds}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Canonical address |
roleIds | array<uuidv7> | Yes | Roles held position descending |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, role.not_found, moderation.timed_out, core.forbidden, role.hierarchy, permission.not_held, moderation.not_member, role.limit_reached, role.system_role, address.non_canonical, core.rate_limited
GET /v1/roles/members/{address}
A member's roles, top position and effective permissions (optionally in one channel).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | No | Also return channelPermissions for this channel ch:… |
Response: 200 with MemberRoles (unnamed in spec)
| 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 |
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, address.non_canonical
GET /v1/roles/overwrites/{ctx}
List a channel's permission overwrites (not paged).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Channel Channel context reference ch:…; colon may be percent-encoded |
Response: 200 with {items: [PermissionOverwrite]}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found
DELETE /v1/roles/overwrites/{ctx}/member/{address}
Remove a member overwrite (mute_members suffices if only speak_and_share differs).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Channel Channel context reference ch:…; colon may be percent-encoded |
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Response: 204
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, moderation.timed_out, core.forbidden, role.hierarchy, core.rate_limited
PUT /v1/roles/overwrites/{ctx}/member/{address}
Set (replace) a member's overwrite in a channel; mute_members suffices for a speak_and_share-only change.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Channel Channel context reference ch:…; colon may be percent-encoded |
address | string | Yes | Member address Canonical address, non-ASCII percent-encoded as UTF-8 (RFC 3986); server rewrites its own alias domains, other non-canonical forms fail address.non_canonical; me means the caller |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
allow | array<Permission> | Yes | Granted channel-scoped only; disjoint from deny |
deny | array<Permission> | Yes | Removed channel-scoped only; disjoint from allow |
Response: 200, 204 with PermissionOverwrite
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, moderation.timed_out, core.forbidden, permission.not_overwritable, permission.unknown, permission.not_held, role.hierarchy, permission.overwrite_limit, core.invalid_request, address.non_canonical, core.rate_limited
DELETE /v1/roles/overwrites/{ctx}/role/{roleId}
Remove a role overwrite.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Channel Channel context reference ch:…; colon may be percent-encoded |
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
Response: 204
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, moderation.timed_out, core.forbidden, role.hierarchy, core.rate_limited
PUT /v1/roles/overwrites/{ctx}/role/{roleId}
Set (replace) a role's overwrite in a channel; empty lists delete it.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Channel Channel context reference ch:…; colon may be percent-encoded |
roleId | uuidv7 | Yes | Role ID UUIDv7; literal segments reorder/members/overwrites can't collide |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
allow | array<Permission> | Yes | Granted channel-scoped only; disjoint from deny |
deny | array<Permission> | Yes | Removed channel-scoped only; disjoint from allow |
Response: 200, 204 with PermissionOverwrite
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, core.not_found, moderation.timed_out, core.forbidden, permission.not_overwritable, permission.unknown, permission.not_held, role.hierarchy, permission.overwrite_limit, core.invalid_request, core.rate_limited
POST /v1/roles/reorder
Reorder all ordinary roles (lowest to highest).
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
order | array<uuidv7> | Yes | New order Every ordinary role exactly once, lowest to highest |
Response: 200 with {items: [Role]}
Errors: core.unauthenticated, core.token_expired, security.upgrade_required, moderation.banned, moderation.timed_out, core.forbidden, core.conflict, role.hierarchy, core.rate_limited
11 Messages, attachments, read state and presence
- POST
/v1/contexts/{ctx}/attachments - DELETE
/v1/contexts/{ctx}/attachments/{id} - GET
/v1/contexts/{ctx}/attachments/{id} - POST
/v1/contexts/{ctx}/attachments/{id}/complete - GET
/v1/contexts/{ctx}/attachments/{id}/content - PUT
/v1/contexts/{ctx}/attachments/{id}/content - GET
/v1/contexts/{ctx}/messages - POST
/v1/contexts/{ctx}/messages - GET
/v1/contexts/{ctx}/messages/{mid} - GET
/v1/contexts/{ctx}/messages/{mid}/reactions - GET
/v1/contexts/{ctx}/read - PUT
/v1/contexts/{ctx}/read - POST
/v1/contexts/{ctx}/typing - GET
/v1/contexts/{ctx}/webhooks - POST
/v1/contexts/{ctx}/webhooks - DELETE
/v1/contexts/{ctx}/webhooks/{id} - GET
/v1/contexts/{ctx}/webhooks/{id} - PATCH
/v1/contexts/{ctx}/webhooks/{id} - POST
/v1/contexts/{ctx}/webhooks/{id}/messages - POST
/v1/contexts/{ctx}/webhooks/{id}/token - GET
/v1/me/presence - PUT
/v1/me/presence - GET
/v1/me/read-states
POST /v1/contexts/{ctx}/attachments
Create a pending upload and get upload instructions; requires attach_files and posting access.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Request body: AttachmentCreateRequest
| 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. |
Response: 201 with AttachmentCreateResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
attachment | Attachment | Yes | The new object. state pending |
upload | UploadInstructions | Yes | Where and how to send the bytes. |
Errors: core.invalid_request, core.not_found, core.forbidden, attachment.too_large, crypto.malformed, attachment.quota_exceeded, core.rate_limited, member.not_member, member.pending, moderation.banned, moderation.timed_out, moderation.new_member_restricted, security.account_required, security.device_not_enrolled, channel.join_required, dm.closed, dm.encryption_pending, dm.upgrade_in_progress, core.unauthenticated, core.token_expired, security.upgrade_required, dm.not_participant
DELETE /v1/contexts/{ctx}/attachments/{id}
Uploader cancels a pending or uploaded attachment; bound attachments can't be deleted this way.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Attachment ID. server-generated Attachment ID |
Response: 204
GET /v1/contexts/{ctx}/attachments/{id}
Return the Attachment object (bound: anyone who can see the message; pending/uploaded: uploader only).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Attachment ID. server-generated Attachment ID |
Response: 200 with Attachment
| 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 |
Errors: attachment.not_found
POST /v1/contexts/{ctx}/attachments/{id}/complete
Verify stored blob length and SHA-256; state becomes uploaded and the Attachment is returned; repeat on uploaded returns it unchanged.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Attachment ID. server-generated Attachment ID |
Response: with Attachment
| 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 |
Errors: attachment.size_mismatch, attachment.hash_mismatch, crypto.malformed, attachment.blocked, attachment.not_found
GET /v1/contexts/{ctx}/attachments/{id}/content
Download the blob: 200 with the bytes (single-range Range supported, ETag = quoted sha256 SHOULD) or 302/307 to a short-lived capability URL needing no Authorization.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Attachment ID. server-generated Attachment ID |
Response: 200, 302, 307 with binary blob
Errors: attachment.not_found
PUT /v1/contexts/{ctx}/attachments/{id}/content
Upload the blob bytes (Content-Type application/octet-stream, Content-Length blobBytes, plus upload.headers). Not resumable. The server's own endpoint accepts only the uploader's session and answers 204; the refusal code is not stated.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Attachment ID. server-generated Attachment ID |
Request body: binary blob
Response: 204
GET /v1/contexts/{ctx}/messages
Page the timeline by seq (before/after/around/newest) or read the changes feed (changedAfter/through).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
before | integer | No | Newest limit items with seq < before. >= 1; mutually exclusive with after/around/changedAfter |
after | integer | No | Oldest limit items with seq > after. >= 0 |
around | integer | No | Up to floor(limit/2) items before, the item at around, rest after. >= 1 |
changedAfter | integer | No | Changes feed: items with updatedSeq > changedAfter (§7.4). >= 0 |
through | integer | No | Restrict changes feed to items with seq <= through. >= 0; only with changedAfter |
limit | integer | No | Page size. 1-100, default 50 |
Response: 200 with MessagePage
| 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 |
Errors: core.invalid_request, core.not_found, message.changes_expired
POST /v1/contexts/{ctx}/messages
Post any timeline entry (message, edit, reaction, delete) in either mode; sender taken from the session.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Request body: PostEntry
| 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 |
Response: 201 with EntryAck
| 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 |
Errors: core.unauthenticated, core.token_expired, core.invalid_request, sealed.kind_unsupported, core.idempotency_conflict, core.not_found, member.not_member, member.pending, moderation.banned, dm.not_participant, security.account_required, security.device_not_enrolled, security.upgrade_required, channel.join_required, dm.closed, dm.encryption_pending, dm.upgrade_in_progress, sealed.not_secure, channel.plaintext_rejected, sealed.required, moderation.timed_out, core.forbidden, moderation.new_member_restricted, moderation.slow_mode, message.too_large, message.invalid_content, sealed.header_mismatch, sealed.ref_invalid, mls.commit_required, message.target_not_found, message.target_deleted, message.not_author, message.not_editable, reaction.too_many, reaction.invalid_key, reaction.already_exists, message.too_many_mentions, address.non_canonical, attachment.not_found, attachment.not_uploaded, attachment.already_bound, attachment.expired, core.rate_limited, sealed.wrong_epoch, sealed.not_in_group, mls.group_not_found, mls.generation_retired, mls.fork_detected, mls.not_member
GET /v1/contexts/{ctx}/messages/{mid}
Fetch one root message (or its tombstone); used for reply parents and jump-to-message.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
mid | uuidv7 | Yes | mid of a root message in the context. lowercase hyphenated UUIDv7 (§2.4) |
Response: 200 with Message
| 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). |
Errors: message.target_not_found, core.not_found
GET /v1/contexts/{ctx}/messages/{mid}/reactions
Collection of ReactionEntry objects for a root message, oldest first; key filter returns only plain entries.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
mid | uuidv7 | Yes | mid of a root message in the context. lowercase hyphenated UUIDv7 (§2.4) |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Next page cursor. opaque nextCursor |
limit | integer | No | Page size. 1-100, default 50 |
key | string | No | Filter by reaction key. URL-encoded; normalized key filter; plain entries only |
Response: 200 with collection of ReactionEntry
| 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 |
Errors: core.not_found, core.invalid_request
GET /v1/contexts/{ctx}/read
Caller's ReadState for one context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Response: 200 with ReadState
| 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 |
Errors: core.not_found
PUT /v1/contexts/{ctx}/read
Advance (or with markUnread, lower) the caller's read position; emits read.updated when changed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Request body: ReadStateUpdate
| 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 |
Response: 200 with ReadState
| 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 |
Errors: core.invalid_request, core.not_found, core.rate_limited
POST /v1/contexts/{ctx}/typing
Signal typing started/stopped; typing:true needs what posting a message needs; excess true requests answered 204 without emitting.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Request body: TypingRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
typing | boolean | Yes | true: typing; false: stopped without sending. |
Response: 204
Errors: core.unauthenticated, core.token_expired, core.not_found, member.not_member, member.pending, moderation.banned, dm.not_participant, security.account_required, security.device_not_enrolled, security.upgrade_required, channel.join_required, dm.closed, dm.encryption_pending, dm.upgrade_in_progress, moderation.timed_out, core.forbidden, moderation.new_member_restricted, moderation.slow_mode
GET /v1/contexts/{ctx}/webhooks
List the channel's webhooks (manage_channels); works in secure channels too.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Next page cursor. opaque |
limit | integer | No | Page size (not specified by 11). |
Response: 200 with collection of Webhook
| 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 |
Errors: core.not_found, core.unsupported_feature, core.forbidden
POST /v1/contexts/{ctx}/webhooks
Create an incoming webhook (manage_channels); returns the token once.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
Request body: WebhookCreateRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string | Yes | Name. as Webhook.name |
allowMentionAll | boolean | No | Allow <@everyone>. default false |
Response: 201 with Webhook
| 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 |
Errors: core.not_found, core.unsupported_feature, core.forbidden, message.webhook_limit, security.context_secure_unsupported, core.invalid_request
DELETE /v1/contexts/{ctx}/webhooks/{id}
Delete a webhook (manage_channels); messages already posted stay.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Webhook ID. server-generated Webhook ID |
Response: 204
Errors: core.not_found, core.unsupported_feature, core.forbidden
GET /v1/contexts/{ctx}/webhooks/{id}
Read one webhook (manage_channels).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Webhook ID. server-generated Webhook ID |
Response: 200 with Webhook
| 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 |
Errors: core.not_found, core.unsupported_feature, core.forbidden
PATCH /v1/contexts/{ctx}/webhooks/{id}
Rename, enable or disable (manage_channels); can't enable one disabled for secure_context; rename allowed in secure channels.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Webhook ID. server-generated Webhook ID |
Request body: WebhookPatchRequest
| 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>. |
Response: 200 with Webhook
| 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 |
Errors: core.not_found, core.unsupported_feature, core.forbidden, security.context_secure_unsupported, core.invalid_request
POST /v1/contexts/{ctx}/webhooks/{id}/messages
An outside service (not an account) posts a root message into an insecure channel; answered with an EntryAck.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Webhook ID. server-generated Webhook ID |
Request body: WebhookExecuteRequest
| 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 |
Response: 201 with EntryAck
| 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 |
Errors: core.not_found, core.unsupported_feature, security.context_secure_unsupported, core.unauthenticated, message.invalid_content, message.too_large, message.too_many_mentions, address.non_canonical, core.rate_limited
POST /v1/contexts/{ctx}/webhooks/{id}/token
Rotate the token; the old one stops working at once (manage_channels).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference (channel, DM or group DM). e.g. ch:<uuidv7>; must exist and be visible to the caller |
id | uuidv7 | Yes | Webhook ID. server-generated Webhook ID |
Response: 200 with Webhook
| 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 |
Errors: core.not_found, core.unsupported_feature, core.forbidden, security.context_secure_unsupported
GET /v1/me/presence
Read own chosen status, custom status, session idle flag and effective status on this server.
Response: 200 with OwnPresence
| 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. |
Errors: core.unauthenticated
PUT /v1/me/presence
Set chosen status/custom status (all four together, last-write-wins) and/or the calling session's idle flag.
Request body: OwnPresenceUpdate
| 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 |
Response: 200 with OwnPresence
| 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. |
Errors: core.invalid_request, core.rate_limited
GET /v1/me/read-states
All of the caller's ReadStates on this server for contexts it can currently see; ordered by ctx, stable.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Next page cursor. opaque nextCursor |
limit | integer | No | Page size. 1-1000, default 200 |
Response: 200 with collection of ReadState
| 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 |
Errors: core.invalid_request
12 Direct messages and group DMs
- POST
/v1/dms - GET
/v1/dms/{ctx} - PATCH
/v1/dms/{ctx} - POST
/v1/dms/{ctx}/participants - DELETE
/v1/dms/{ctx}/participants/{addr} - GET
/v1/me/dm-requests - GET
/v1/me/dm-requests/{id} - POST
/v1/me/dm-requests/{id}/accept - POST
/v1/me/dm-requests/{id}/block - POST
/v1/me/dm-requests/{id}/decline - GET
/v1/me/dms - POST
/v1/me/dms - DELETE
/v1/me/dms/{id} - GET
/v1/me/dms/{id} - PATCH
/v1/me/dms/{id} - GET
/v1/me/dms/blocks - DELETE
/v1/me/dms/blocks/{addr} - PUT
/v1/me/dms/blocks/{addr} - GET
/v1/me/dms/settings - PUT
/v1/me/dms/settings
POST /v1/dms
Create (or return/reopen) a 1:1 or group DM at the hosting server selected by the hosting rule.
Request body: inline (POST /v1/dms request body)
| 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 |
Response: 201, 200 with Dm
Errors: address.non_canonical, dm.invalid_participants, dm.too_many_participants, core.invalid_request, federation.blocked, dm.closed, dm.recipient_not_found, dm.wrong_host, dm.security_mismatch, security.device_not_enrolled, dm.encryption_pending, mls.*, core.rate_limited
GET /v1/dms/{ctx}
Return the Dm object, filtered per §6.5.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference.dm: (b64u-128) or gdm: (uuid7); colon MAY be percent-encoded |
Response: 200 with Dm
Errors: core.not_found
PATCH /v1/dms/{ctx}
Set or clear a group DM's name.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference.dm: (b64u-128) or gdm: (uuid7); colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
name | string|null | Yes | Group name. constraints as §6.1; null clears |
Response: 200 with Dm
Errors: dm.not_group, dm.not_participant, dm.closed, dm.upgrade_in_progress, dm.encryption_pending
POST /v1/dms/{ctx}/participants
Add 1-10 people to a group DM; insecure groups add immediately, secure groups reserve for 60 s pending the MLS commit. A late secure-add commit (submitted through 13) is refused with 409 dm.reservation_expired.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference.dm: (b64u-128) or gdm: (uuid7); colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
participants | array<string> | Yes | People to add. 1 to 10 canonical addresses |
communityHints | array<string> | No | Copied into dm.request batch 1 of each new invitation. up to 10 community domains |
Response: 200, 202 with Dm
Errors: dm.not_group, dm.closed, dm.upgrade_in_progress, dm.encryption_pending, dm.not_participant, dm.not_accepted, dm.recipient_not_found, dm.invalid_participants, moderation.banned, federation.blocked, core.rate_limited, dm.too_many_participants, security.would_downgrade, security.device_not_enrolled
DELETE /v1/dms/{ctx}/participants/{addr}
Leave a group DM (addr = caller) or remove another participant (owner only while the group has an owner; any active participant afterwards).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference.dm: (b64u-128) or gdm: (uuid7); colon MAY be percent-encoded |
addr | string | Yes | Address. canonical address, percent-encoded |
Response: 204
Errors: dm.not_group, dm.not_owner, dm.not_participant, dm.not_accepted
GET /v1/me/dm-requests
List message requests, newest first; list items omit events and welcome and carry preview.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | enum DmRequestState | No | Filter. default pending |
cursor | string | No | Cursor. |
limit | integer | No | Page size. |
Response: 200 with collection of DmRequest (list form)
GET /v1/me/dm-requests/{id}
Get the full DmRequest.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmRequest id. |
Response: 200 with DmRequest
POST /v1/me/dm-requests/{id}/accept
Accept a message request; the entry becomes active and the home sends dm.response accept.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmRequest id. |
Response: 200 with DmIndexEntry
Errors: dm.request_not_pending
POST /v1/me/dm-requests/{id}/block
Decline the request and block inviter.addr (block half of Report and block).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmRequest id. |
Response: 204
Errors: dm.request_not_pending
POST /v1/me/dm-requests/{id}/decline
Decline a message request; entry declined with declinedAt now; home sends dm.response decline.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmRequest id. |
Response: 204
Errors: dm.request_not_pending
GET /v1/me/dms
List the account's DM index entries, ordered by lastActivityAt descending then id.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | string | No | Entry states. comma-separated; default active,requested |
kind | enum DmKind | No | Filter by kind. |
includeHidden | boolean | No | Include hidden entries. default false |
cursor | string | No | Pagination cursor (00 §7.10). |
limit | integer | No | Page size. 1–100, default 50 |
Response: 200 with collection of DmIndexEntry
POST /v1/me/dms
Register an outgoing DM in the home index (or activate an existing entry, accepting any pending request). Checks only syntax (ctx per §5.1, host a valid domain); never contacts the hosting server.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string | Yes | Hosting server. valid domain |
ctx | string | Yes | Context reference. matches §5.1 |
kind | enum DmKind | Yes | direct or group. |
Response: 201, 200 with DmIndexEntry
Errors: core.invalid_request
DELETE /v1/me/dms/{id}
Delete an entry in state declined, left or closed, or an outgoing entry whose lastSeq is 0.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmIndexEntry id. |
Response: 204
Errors: dm.entry_active
GET /v1/me/dms/{id}
Get one DM index entry, including pendingEvents.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmIndexEntry id. |
Response: 200 with DmIndexEntry
PATCH /v1/me/dms/{id}
Hide or unhide a DM index entry.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | DmIndexEntry id. |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
hidden | boolean | Yes | Hide from DM list. |
GET /v1/me/dms/blocks
List DM blocks.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Cursor. |
limit | integer | No | Page size. |
Response: 200 with collection of DmBlock
DELETE /v1/me/dms/blocks/{addr}
Unblock an address.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Address. canonical address, percent-encoded |
Response: 204
PUT /v1/me/dms/blocks/{addr}
Block an address for DMs.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
addr | string | Yes | Address. canonical address, percent-encoded |
Response: 200 with DmBlock
GET /v1/me/dms/settings
Return the account's DmSettings.
Response: 200 with DmSettings
PUT /v1/me/dms/settings
Replace the account's DmSettings.
Request body: DmSettings
| 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 |
13 MLS profile
- GET
/v1/contexts/{ctx}/mls - POST
/v1/contexts/{ctx}/mls/bootstrap - POST
/v1/contexts/{ctx}/mls/commits - POST
/v1/contexts/{ctx}/mls/epoch-ack - GET
/v1/contexts/{ctx}/mls/groupinfo - GET
/v1/contexts/{ctx}/mls/handshakes - GET
/v1/contexts/{ctx}/mls/proposals - POST
/v1/contexts/{ctx}/mls/reports - GET
/v1/contexts/{ctx}/mls/welcome - POST
/v1/federation/keypackages/claim - POST
/v1/keypackages/claim - DELETE
/v1/me/keypackages - GET
/v1/me/keypackages - POST
/v1/me/keypackages
GET /v1/contexts/{ctx}/mls
Return the cheap MlsGroupStatus so a client can decide whether to bootstrap, join, catch up or resync; no leaf required.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Response: 200, 403, 409 with MlsGroupStatus
| 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 |
Errors: mls.context_not_secure, security.account_required, security.device_not_enrolled
POST /v1/contexts/{ctx}/mls/bootstrap
Create the context's MLS group for the current generation from a GroupBootstrap (epoch-0 GroupInfo); for DMs optionally with the first CommitSubmission in the same transaction.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Request body: GroupBootstrap (+ optional commit: CommitSubmission for DMs/group 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 |
commit | CommitSubmission | No | First commit adding claimed devices, with Welcome DMs/group DMs only; epoch 0 -> 1; REQUIRED if the creator claimed any KeyPackage; not part of GroupBootstrap |
Response: 201, 400, 403, 409, 410, 425, 503 with BootstrapResponse (unnamed in spec)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Group ID |
generation | integer | Yes | Generation |
epoch | integer | Yes | Epoch 0 |
ekid | base64url | Yes | ekid(0) |
seq | integer | Yes | Context seq (example matches the mls.group_created seq; not stated normatively) |
commit | CommitResult | No | CommitResult of the first commit only when a first commit was sent |
Errors: mls.group_exists, mls.generation_retired, mls.group_id_mismatch, mls.credential_rejected, mls.policy_violation, mls.bootstrap_not_allowed, mls.verification_failed, mls.epoch_conflict, mls.proposals_changed, mls.commit_busy, mls.group_full, core.too_large, mls.context_not_secure, security.account_required, security.device_not_enrolled, federation.home_unreachable
POST /v1/contexts/{ctx}/mls/commits
Submit a member or external commit with its new-epoch GroupInfo and ekid; sequenced by compare-and-set on the epoch.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Request body: CommitSubmission
| 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 |
Response: 200, 400, 403, 404, 409, 410, 425, 503 with CommitResult
| 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 |
Errors: mls.epoch_conflict, mls.proposals_changed, mls.commit_busy, mls.credential_rejected, mls.verification_failed, mls.policy_violation, mls.not_member, mls.group_not_found, mls.generation_retired, mls.group_id_mismatch, mls.group_full, core.too_large, core.unavailable, mls.context_not_secure, security.account_required, security.device_not_enrolled, federation.home_unreachable, federation.blocked
POST /v1/contexts/{ctx}/mls/epoch-ack
Post an EpochAck (the message other docs call mls.epoch_ack) carrying the device's (ekid, extPub) pair for fork detection, lastSeenAt, commit duty and Welcome cleanup.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Request body: EpochAck
| 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 |
Response: 200, 202, 403, 409 with EpochAckResponse (unnamed in spec): {epoch, status}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
epoch | integer | Yes | Epoch |
status | EpochAckStatus | Yes | Result match (200) | pending (202) | ignored (200); unknown: treat as match |
Errors: mls.fork_detected, mls.not_member, core.conflict, mls.context_not_secure, security.account_required, security.device_not_enrolled
GET /v1/contexts/{ctx}/mls/groupinfo
Return the current GroupInfo (full ratchet tree and external_pub) plus pending ServerProposals; used to build an external commit; no leaf required.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
include | string | No | Add cached IdentityState of every roster address identityStates; channels only, ignored for DMs |
intent | string | No | Marks a fetch made to build an external commit; paced by the join queue (§11.5) join |
Response: 200, 304, 403, 404, 409, 410, 425, 503 with GroupInfoResponse
| 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) |
Errors: mls.group_not_found, mls.generation_retired, mls.commit_busy, core.unavailable, mls.context_not_secure, security.account_required, security.device_not_enrolled
GET /v1/contexts/{ctx}/mls/handshakes
Return accepted commits of the current generation with commit epoch >= fromEpoch, in epoch order, as HandshakeRecords; no leaf required.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
fromEpoch | integer | Yes | First commit epoch to return >= 0 |
limit | integer | No | Page size 1-100, default 50 |
Response: 200, 403, 409, 410 with {items: [HandshakeRecord], hasMore: boolean}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<HandshakeRecord> | Yes | Records in epoch order |
hasMore | boolean | Yes | More records exist |
Errors: mls.log_truncated, mls.context_not_secure, security.account_required, security.device_not_enrolled
GET /v1/contexts/{ctx}/mls/proposals
Return the pending server proposals of the current epoch; no leaf required.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Response: 200, 403, 409 with {epoch, items: [ServerProposal]}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
epoch | integer | Yes | Current epoch |
items | array<ServerProposal> | Yes | Pending proposals |
Errors: mls.context_not_secure, security.account_required, security.device_not_enrolled
POST /v1/contexts/{ctx}/mls/reports
Post an MlsReport client diagnostic (verification failure, unprocessable commit, suspected fork, invalid GroupInfo).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Request body: MlsReport
| 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 |
Response: 202, 403, 409, 429
Errors: core.rate_limited, mls.not_member, mls.context_not_secure, security.account_required, security.device_not_enrolled
GET /v1/contexts/{ctx}/mls/welcome
Fetch the pending Welcome that added the calling device under its current identity generation; no leaf required.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context a ch:, dm: or gdm: context reference; the colon MAY be percent-encoded |
Response: 200, 403, 404, 409 with PendingWelcome (unnamed in spec)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
groupId | string | Yes | Group ID |
generation | integer | Yes | Generation |
epoch | integer | Yes | Epoch the device joins at |
welcome | base64url | Yes | The Welcome MLSMessage mls_welcome, always with ratchet_tree |
addedBy | object | Yes | Committer that added the device {addr, did} |
Errors: mls.welcome_not_found, mls.context_not_secure, security.account_required, security.device_not_enrolled
POST /v1/federation/keypackages/claim
S2S claim of KeyPackages from the targets' home server on behalf of a claimant user.
Request body: FederationKeyPackageClaim (unnamed in spec)
| 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 |
Response: 200, 403 with KeyPackageClaimResult (without status 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 |
Errors: federation.not_authorized
POST /v1/keypackages/claim
Claim KeyPackages for DM targets through the caller's own home server, which claims locally or via S2S per remote domain.
Request body: KeyPackageClaim
| 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 |
Response: 200, 400, 403, 429 with KeyPackageClaimResult
| 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 |
Errors: security.account_required, security.device_not_enrolled, core.invalid_request, address.non_canonical, core.rate_limited
DELETE /v1/me/keypackages
Delete every KeyPackage of the calling device, including the last-resort one (used when the client discards its MLS key store).
Response: 200, 403 with KeyPackageStatus
| 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 |
Errors: security.account_required, security.device_not_enrolled
GET /v1/me/keypackages
Return the calling device's KeyPackageStatus.
Response: 200, 403 with KeyPackageStatus
| 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 |
Errors: security.account_required, security.device_not_enrolled
POST /v1/me/keypackages
Upload regular KeyPackages and/or replace the last-resort KeyPackage for the calling device at its home server; atomic validation.
Request body: KeyPackageUpload
| 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 |
Response: 200, 400, 403, 409 with KeyPackageStatus
| 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 |
Errors: mls.keypackage_invalid, mls.keypackage_limit, security.account_required, security.device_not_enrolled
14 Sealed messages, history visibility and sharing
- GET
/v1/contexts/{ctx}/history - POST
/v1/contexts/{ctx}/history/credentials/lookup - GET
/v1/contexts/{ctx}/history/shares - POST
/v1/contexts/{ctx}/history/shares
GET /v1/contexts/{ctx}/history
Returns a HistoryState object describing the caller account's visibility (visibleFromSeq, earlierWithheld, VisibilityGrants) in a secure context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context. context reference (00 §7.6); the colon MAY be percent-encoded (00 §7.3) |
Response: 200 with HistoryState
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The context reference. context reference |
visibleFromSeq | integer | Yes | The account's visibleFromSeq (§10.2): the seq at which its current membership began. |
earlierWithheld | boolean | Yes | Whether the context holds content items below visibleFromSeq that §10.2 withholds from this account, grants aside. Membership and other system events alone don't count. Used to place K6. true exactly when the MessagePage's withheldBeforeSeq (11 §7.1) is non-null; false after a 1:1 DM reopening (12 §6.4) |
grants | array<VisibilityGrantSummary> | Yes | The account's VisibilityGrants in this context: {shareId, sharer, fromSeq, toSeq, createdAt}. oldest first; empty when none |
Errors: history.disabled, history.not_member, security.account_required, security.device_not_enrolled, mls.not_member
POST /v1/contexts/{ctx}/history/credentials/lookup
Fetches the hosting server's credential records (IdentityCertificate and DeviceCertificate) for devices that sent sealed content or created a HistoryShare in the context.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The secure context. context reference |
Request body: CredentialLookupRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
devices | array<{addr, did}> | Yes | The (address, device) pairs to look up. 1 to 100 entries; addr canonical address, did device ID |
Response: 200 with CredentialLookupResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<CredentialRecord> | Yes | Matching credential records. several records may come back for one (addr, did) |
missing | array<{addr, did}> | Yes | Requested pairs with no record. |
Errors: history.disabled, history.not_member, security.account_required, security.device_not_enrolled, mls.not_member
15 Calls: control, leases, routing and continuity
- POST
{relayUrl}/connect - GET
/v1/contexts/{ctx}/call - POST
/v1/contexts/{ctx}/call/decline - POST
/v1/contexts/{ctx}/call/epoch-ready - POST
/v1/contexts/{ctx}/call/join - POST
/v1/contexts/{ctx}/call/leave - GET
/v1/contexts/{ctx}/call/mutes - DELETE
/v1/contexts/{ctx}/call/mutes/{addr} - GET
/v1/contexts/{ctx}/call/mutes/{addr} - PUT
/v1/contexts/{ctx}/call/mutes/{addr} - PATCH
/v1/contexts/{ctx}/call/participants/{pid} - POST
/v1/contexts/{ctx}/call/ring - POST
/v1/contexts/{ctx}/call/sfu/session - DELETE
/v1/contexts/{ctx}/call/sfu/session/{sfuSessionId} - POST
/v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/answer - POST
/v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/offer - PUT
/v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/subscriptions - POST
/v1/diagnostics
POST {relayUrl}/connect
Open the participation's WebRTC data-channel session at the relay with a one-shot SDP offer (WHIP-like).
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
offer | string | Yes | SDP offer. SDP with one m=application section, three negotiated data channels; sent without waiting for ICE gathering |
Response: 201 with inline {answer, relaySessionId}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
answer | string | Yes | SDP answer. contains all of the relay's ICE candidates |
relaySessionId | string | Yes | Diagnostic session ID. opaque, at most 64 characters |
Errors: relay.ticket_invalid, relay.ticket_expired, relay.ticket_replayed, relay.call_unknown, relay.wrong_relay, relay.bad_offer, relay.overloaded
GET /v1/contexts/{ctx}/call
Return the context's current call or null; readable by any member who passes §2.2 rows 2, 3 and 5, including needs_encryption members of a secure channel.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Response: 200 with {"call": Call | null}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
call | Call or null | Yes | The current call, or null. |
Errors: core.unauthenticated, security.upgrade_required, core.not_found, channel.deleted, call.unsupported_context, member.not_member, member.pending, moderation.banned, dm.not_participant, channel.join_required
POST /v1/contexts/{ctx}/call/decline
Decline a ring from any device of a target account; the ring ends on all the account's devices.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
Response: 204
Errors: call.ring_not_allowed
POST /v1/contexts/{ctx}/call/epoch-ready
call.epoch_ready: tell call control this device has installed SFrame send and receive keys for an MLS epoch.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
epoch | integer | Yes | MLS epoch whose SFrame keys are installed. > group's current epoch gives 409 call.epoch_unknown; ≤ call.mediaEpoch accepted and ignored |
Response: 204
Errors: call.not_participant, call.not_permitted, call.epoch_unknown, core.rate_limited
POST /v1/contexts/{ctx}/call/join
Join, rejoin (with rejoinToken), switch or Move voice here (takeOver); creates the call if none is active and create is true.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: JoinRequest
| 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 |
Response: 200 with JoinResponse
| 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} |
Errors: core.unauthenticated, security.upgrade_required, core.not_found, channel.deleted, call.unsupported_context, member.not_member, member.pending, moderation.banned, dm.not_participant, security.account_required, security.device_not_enrolled, channel.join_required, call.mls_join_required, call.already_in_call, call.full, call.relay_unavailable, call.not_active, call.rejoin_expired, call.moved, call.ended, call.rejoin_invalid, core.rate_limited, dm.upgrade_in_progress, dm.closed, dm.encryption_pending
POST /v1/contexts/{ctx}/call/leave
Remove the device's seat in the named call with reason left; idempotent.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call to leave. |
Response: 204
GET /v1/contexts/{ctx}/call/mutes
List current Mute for everyone entries; any member who may read the call (§3.2) may list them.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Page cursor. 00 §7.10 |
limit | integer | No | Page size. 00 §7.10 |
Response: 200 with {"items": [Mute], "nextCursor": …}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<Mute> | Yes | Current mutes. |
nextCursor | string or null | Yes | Cursor for the next page. |
DELETE /v1/contexts/{ctx}/call/mutes/{addr}
Remove a Mute for everyone.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
addr | string | Yes | The muted account. canonical address; aliases of this server's own domains are rewritten, other non-canonical addresses give 400 address.non_canonical; percent-encode chars outside RFC 3986 pchar as UTF-8; @ needs no encoding |
Response: 204
Errors: core.forbidden, moderation.self_target, moderation.target_protected, call.not_permitted, address.non_canonical
GET /v1/contexts/{ctx}/call/mutes/{addr}
Read one Mute for everyone.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
addr | string | Yes | The muted account. canonical address; aliases of this server's own domains are rewritten, other non-canonical addresses give 400 address.non_canonical; percent-encode chars outside RFC 3986 pchar as UTF-8; @ needs no encoding |
Response: 200, 404 with Mute
Errors: core.not_found, address.non_canonical
PUT /v1/contexts/{ctx}/call/mutes/{addr}
Mute for everyone: mute an account's audio in this voice channel's calls until removed; replaces reason/showReason/reportId of an existing mute.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
addr | string | Yes | The muted account. canonical address; aliases of this server's own domains are rewritten, other non-canonical addresses give 400 address.non_canonical; percent-encode chars outside RFC 3986 pchar as UTF-8; @ needs no encoding |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reason | string | No | Moderator's reason. 0–512 Unicode scalar values (10 §8.2 rule 2) |
showReason | boolean | No | Whether the muted account is shown reason. default false |
reportId | string | No | Linked report. as 10 §8.2 rule 3 |
Response: 200 with Mute
Errors: core.forbidden, moderation.self_target, moderation.target_protected, call.not_permitted, address.non_canonical
PATCH /v1/contexts/{ctx}/call/participants/{pid}
Update the device's own selfMuted, selfDeafened or sources; returns the updated Participant and emits call.participant_updated.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
pid | integer | Yes | Participant index. 0–65535; MUST be the device's own pid |
Request body: inline (any subset)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
selfMuted | boolean | No | Own microphone muted. |
selfDeafened | boolean | No | Own playback off (a client that deafens also mutes; not enforced). |
sources | object | No | What the device is starting or stopping to send. any of screen, screenAudio, webcam (booleans); screen/webcam true needs video in the lease, screenAudio needs audio |
Response: 200 with Participant
Errors: call.not_participant, call.not_permitted, core.rate_limited
POST /v1/contexts/{ctx}/call/ring
Start a new 45 s ring (or restart one) for DM participants not in the call.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
targets | array<string> | No | Canonical addresses to ring. default: every account §13.1 item 1 allows to be rung that isn't in the call; excluded targets silently skipped |
Response: 202
Errors: call.ring_not_allowed, core.rate_limited
POST /v1/contexts/{ctx}/call/sfu/session
Create the device's SFU session (one per call) by sending an SDP offer and publish list.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
callId | uuidv7 | Yes | The call. |
offer | string | Yes | SDP offer. SDP, at most 16 KiB |
publish | array<SfuPublish> | Yes | Published sources. must match the offer's transceivers |
Response: 201 with inline {sfuSessionId, answer, tracks}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
sfuSessionId | uuidv7 | Yes | Assigned by call control. |
answer | string | Yes | SDP answer. SDP |
tracks | array<Track> | Yes | Transceivers of the session. |
Errors: call.not_participant, sfu.not_active, core.unsupported_feature, sfu.bad_sdp, sfu.unavailable, call.not_permitted
DELETE /v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}
Close the device's SFU session.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
sfuSessionId | uuidv7 | Yes | The SFU session. assigned by call control |
Response: 204
Errors: call.not_participant, sfu.not_active, core.unsupported_feature, sfu.session_unknown
POST /v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/answer
Answer a server offer (sfu.offer).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
sfuSessionId | uuidv7 | Yes | The SFU session. assigned by call control |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
negotiationId | uuidv7 | Yes | From sfu.offer. |
answer | string | Yes | SDP answer. SDP, at most 16 KiB |
Response: 204
Errors: call.not_participant, sfu.not_active, core.unsupported_feature, sfu.bad_sdp, sfu.session_unknown
POST /v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/offer
Client-initiated renegotiation (e.g. start or stop the webcam).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
sfuSessionId | uuidv7 | Yes | The SFU session. assigned by call control |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
offer | string | Yes | SDP offer. SDP, at most 16 KiB |
publish | array<SfuPublish> | Yes | Published sources. |
Response: 200 with inline {answer, tracks}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
answer | string | Yes | SDP answer. |
tracks | array<Track> | Yes | Transceivers. |
Errors: call.not_participant, sfu.not_active, core.unsupported_feature, sfu.bad_sdp, sfu.unavailable, sfu.negotiation_conflict, sfu.session_unknown, call.not_permitted
PUT /v1/contexts/{ctx}/call/sfu/session/{sfuSessionId}/subscriptions
Replace the set of SFU tracks and layers this subscriber wants; server follows with sfu.offer if transceivers must change.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | The call-capable context (voice channel, 1:1 DM or group DM). context reference ch:…, dm:… or gdm:…; one path segment; the colon MAY be percent-encoded |
sfuSessionId | uuidv7 | Yes | The SFU session. assigned by call control |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
want | array<SfuWant> | Yes | Wanted tracks. each request replaces the previous set |
Response: 202
Errors: call.not_participant, sfu.not_active, core.unsupported_feature, sfu.session_unknown
POST /v1/diagnostics
Upload a diagnostic report (call_failure, call_summary, or kinds owned by other documents) subject to the user's diagnostics setting.
Request body: DiagnosticReport
| 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 |
Response: 202 with inline {reportId}
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
reportId | uuidv7 | Yes | Echo of the report ID. |
Errors: core.too_large, core.rate_limited
19 Notifications and push
- POST
{gatewayUrl}/v1/push - POST
{gatewayUrl}/v1/register - DELETE
/v1/contexts/{ctx}/notification-settings - GET
/v1/contexts/{ctx}/notification-settings - PUT
/v1/contexts/{ctx}/notification-settings - GET
/v1/me/notifications - GET
/v1/me/notifications/{id} - GET
/v1/me/notifications/events - POST
/v1/me/notifications/read - GET
/v1/me/notifications/settings - PUT
/v1/me/notifications/settings - GET
/v1/me/notifications/settings/communities - DELETE
/v1/me/notifications/settings/communities/{host} - GET
/v1/me/notifications/settings/communities/{host} - PUT
/v1/me/notifications/settings/communities/{host} - GET
/v1/me/notifications/settings/contexts - GET
/v1/me/push-registrations - POST
/v1/me/push-registrations - DELETE
/v1/me/push-registrations/{id} - GET
/v1/me/push-registrations/{id} - PUT
/v1/me/push-registrations/{id} - POST
/v1/me/push-registrations/{id}/test - POST
<endpoint>
POST {gatewayUrl}/v1/push
Home server hands a batch of opaque pushes to a gateway, which forwards each to APNs or FCM and returns per-push results.
Request body: GatewayPushRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pushes | array<PushRequest> | Yes | Pushes. 1-100; body <= 256 KiB |
Response: 200, 400, 401, 403, 413, 429, 503 with GatewayPushResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
results | array<PushResult> | Yes | Per-push outcomes. one per push in request order |
Errors: core.invalid_request, push.unauthenticated, push.home_blocked, core.too_large, core.rate_limited, core.unavailable, push.key_invalid, push.home_mismatch, push.type_unsupported, push.token_gone, push.upstream_unavailable
POST {gatewayUrl}/v1/register
App sends its platform token to its own gateway and receives an opaque push key bound to one home server.
Request body: GatewayRegisterRequest
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
platform | enum GatewayPlatform | Yes | Platform channel. apns | apns_voip | fcm |
appId | string | Yes | Bundle ID or package name. 1-255 characters |
environment | enum | No | APNs environment. required for apns and apns_voip; production | development |
token | string | Yes | Platform token. APNs token lowercase hex or FCM token; at most 4,096 chars |
home | string | Yes | Account's home server. canonical domain |
Response: 200 with GatewayRegisterResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
pushKey | string | Yes | Opaque push key. 1-1,024 chars of ALPHA / DIGIT / - . _ ~ |
Errors: core.invalid_request, push.app_unknown, push.platform_unsupported, core.rate_limited, core.forbidden
DELETE /v1/contexts/{ctx}/notification-settings
Restores per-context defaults.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference. 03 §8.3 grammar |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | No | The hosting server. defaults to home server's canonical domain |
Response: 204
Errors: core.forbidden, push.home_only
GET /v1/contexts/{ctx}/notification-settings
Returns the per-context settings for (host, ctx), served by the home server for contexts on any hosting server; missing entry returns defaults with 200.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference. 03 §8.3 grammar; colon MAY be percent-encoded; existence not checked |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | No | The hosting server. defaults to the home server's own canonical domain; canonicalized as §7.2 |
Response: 200 with ContextNotificationSettings
Errors: core.invalid_request, core.forbidden, push.home_only
PUT /v1/contexts/{ctx}/notification-settings
Sets per-context notification settings at the home server; emits notification.settings_changed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string (context reference) | Yes | Context reference. 03 §8.3 grammar |
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | No | The hosting server. defaults to home server's canonical domain |
Request body: ContextNotificationSettings (writable members)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
level | enum Level | Yes | Context level. default | all | mentions | nothing; all only for dm: and gdm: (ch: -> 400 notification.level_unsupported) |
muteUntil | timestamp | null | Yes | Mute expiry. at most 366 days ahead |
everyone | boolean | null | Yes | Overrides everyone. null inherits |
calls | boolean | null | Yes | Overrides calls. DMs only; MUST be null for channels (non-null for ch: -> 400 core.invalid_request) |
Response: 200 with ContextNotificationSettings
Errors: notification.level_unsupported, core.invalid_request, core.conflict, core.forbidden, push.home_only
GET /v1/me/notifications
Lists notification records visible to the calling device (targets null or containing it), newest createdAt first, with the device's badge.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
state | string | No | State filter. comma-separated RecordState values; default unread |
host | string | No | Filter by hosting server. |
ctx | string | No | Filter by context. requires host |
kind | string | No | Kind filter. comma-separated NotificationKind values |
cursor | string | No | Page cursor. |
limit | integer | No | Page size. 1-100, default 50 |
Response: 200 with NotificationListResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<NotificationRecord> | Yes | Records. |
nextCursor | string | null | Yes | Next page. |
badge | integer | Yes | Badge for the calling device. capped at 9,999 |
Errors: push.home_only, core.forbidden
GET /v1/me/notifications/{id}
Fetches one notification record plus the device's badge and the user's current previews setting; the first call a notification extension makes after a push.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | NotificationRecord id. the push payload h |
Response: 200 with NotificationFetchResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
record | NotificationRecord | Yes | The record. |
badge | integer | Yes | Badge for the calling device (§15.1). capped at 9,999 |
display | object | Yes | User's current global previews setting. { previews: full | sender_only | none }; unknown -> sender_only |
Errors: core.not_found, core.unauthenticated, core.forbidden, push.home_only
GET /v1/me/notifications/events
Served by every server in its hosting role: returns exactly the events named by an event ticket, in current form, plus the recipient's readSeq; ciphertext only in secure contexts.
Response: 200 with NotifiedEventsResponse
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ctx | string | Yes | Context reference. |
items | array<event envelope> | Yes | The notified events. seq order; current form (edits applied, deletions as tombstones); invisible events omitted |
readSeq | integer | Yes | Recipient's current readSeq in the context (11 §9.1). |
Errors: notify.ticket_invalid, notify.access_ended, core.rate_limited
POST /v1/me/notifications/read
Moves unread records to read or dismissed using exactly one selector (ids, host/ctx[/throughSeq], or all); emits notification.state_changed and background pushes to other devices.
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
ids | array<uuidv7> | No | Record IDs. 1-100; one selector required |
host | string | No | Hosting server of the context selector. with ctx; one selector required |
ctx | string | No | Context of the selector. with host |
throughSeq | integer | No | Read-through position. optional within host group; selects unread records with items whose latest item seq <= throughSeq; never selects records without items |
all | boolean | No | Every unread record visible to the device. true; one selector required |
state | enum | No | Target state. read (default) | dismissed |
Response: 200 with inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
updated | integer | Yes | Records changed. |
badge | integer | Yes | New badge. |
Errors: core.invalid_request, core.forbidden, core.unauthenticated, push.home_only
GET /v1/me/notifications/settings
Returns the account's global NotificationSettings.
Response: 200 with NotificationSettings
Errors: core.forbidden, push.home_only
PUT /v1/me/notifications/settings
Replaces the global NotificationSettings (every writable member required), with optional optimistic concurrency via ifVersion; emits notification.settings_changed.
Request body: inline (NotificationSettings writable members + ifVersion)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
enabled | boolean | Yes | Master switch. |
previews | enum Previews | Yes | What notifications show. full | sender_only | none |
channels | enum Level | Yes | Default level for channels. mentions | nothing |
dms | enum Level | Yes | Default level for 1:1 DMs. all | mentions | nothing |
groupDms | enum Level | Yes | Default level for group DMs. all | mentions | nothing |
everyone | boolean | Yes | Whether everyone mentions notify. |
calls | boolean | Yes | Whether DM calls ring. |
ifVersion | integer | No | Optimistic concurrency guard. if present and != stored version -> 409 core.conflict, nothing changed |
Response: 200 with NotificationSettings
Errors: core.conflict, notification.level_unsupported, core.forbidden, push.home_only
GET /v1/me/notifications/settings/communities
Lists the account's CommunityNotificationSettings entries.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
cursor | string | No | Page cursor. cursor pagination per 00 §7.10 (parameters not named in 19) |
Response: 200 with collection of CommunityNotificationSettings
Errors: core.forbidden, push.home_only
DELETE /v1/me/notifications/settings/communities/{host}
Restores the community defaults.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | Yes | Community server's canonical domain. canonical domain |
Response: 204
Errors: core.invalid_request, core.forbidden, push.home_only
GET /v1/me/notifications/settings/communities/{host}
Returns the CommunityNotificationSettings for one hosting server; a missing entry returns the defaults (level default, others null) with 200.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | Yes | Community server's canonical domain. client MUST send canonical domain; invalid domain -> 400 core.invalid_request |
Response: 200 with CommunityNotificationSettings
Errors: core.invalid_request, core.forbidden, push.home_only
PUT /v1/me/notifications/settings/communities/{host}
Sets the per-community notification settings; server canonicalizes host via discovery but MUST NOT refuse an unreachable host; emits notification.settings_changed.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | Yes | Community server's canonical domain. canonical domain; stored provisionally as lowercase A-label if unresolvable |
Request body: CommunityNotificationSettings (writable members)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
level | enum Level | Yes | Community level. default | mentions | nothing |
muteUntil | timestamp | null | Yes | While in the future the community's channels don't notify. at most 366 days ahead; null for none |
everyone | boolean | null | Yes | Overrides global everyone. null inherits |
Response: 200 with CommunityNotificationSettings
Errors: core.invalid_request, core.conflict, notification.level_unsupported, core.forbidden, push.home_only
GET /v1/me/notifications/settings/contexts
Lists the account's ContextNotificationSettings entries (used e.g. to show muted icons on every device).
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
host | string (domain) | No | Filter by hosting server. |
cursor | string | No | Page cursor. cursor pagination per 00 §7.10 (parameters not named in 19) |
Response: 200 with collection of ContextNotificationSettings
Errors: core.forbidden, push.home_only
GET /v1/me/push-registrations
Lists the calling device's registrations (never includes fetchToken).
Response: 200 with { items: [PushRegistration], nextCursor: null }
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
items | array<PushRegistration> | Yes | Registrations. |
nextCursor | null | Yes | No pagination. always null |
Errors: push.home_only
POST /v1/me/push-registrations
Creates a push registration for the calling device (gateway or webpush) and issues a fetch token; matching existing registration is updated (200) instead.
Request body: inline (PushRegistration writable members)
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
transport | enum Transport | Yes | Push channel kind. gateway | webpush |
types | array<PushType> | Yes | Push types accepted. non-empty subset of alert, call, background; webpush MUST NOT include background |
gatewayUrl | string (base-url) | No | Gateway base URL. gateway only; https, domain host, public unicast addresses only; no trailing slash; normalized |
pushKey | string | No | Push key from {gatewayUrl}/v1/register. gateway only; 1-1,024 chars of ALPHA / DIGIT / - . _ ~ |
webPush | WebPushSubscription | No | {endpoint, p256dh, auth}. webpush only |
vapidKey | string | No | The applicationServerKey used to subscribe. webpush only; must equal current or retained webPushKey |
Response: 201, 200 with PushRegistration (with fetchToken)
Errors: push.device_not_eligible, push.registration_invalid, push.gateway_not_allowed, core.unsupported_feature, push.too_many_registrations, push.home_only
DELETE /v1/me/push-registrations/{id}
Deletes the registration and its fetch token.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Registration id. |
Response: 204
Errors: push.home_only
GET /v1/me/push-registrations/{id}
Returns one registration of the calling device.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Registration id (r). |
Response: 200 with PushRegistration
Errors: core.not_found, push.home_only
PUT /v1/me/push-registrations/{id}
Replaces types and transport data (pushKey, or webPush and vapidKey); optional fetch-token rotation; id stays the same.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Registration id. |
Request body: inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
types | array<PushType> | Yes | Push types. as POST |
pushKey | string | No | New push key. gateway |
webPush | WebPushSubscription | No | New subscription. webpush |
vapidKey | string | No | applicationServerKey used. webpush |
rotateFetchToken | boolean | No | Issue new fetch token; old stops at once. default false; periodic 30-day re-registration MUST set true |
Response: 200 with PushRegistration (fetchToken only when rotated)
Errors: push.registration_invalid, push.gateway_not_allowed, push.device_not_eligible, core.not_found, push.home_only, core.unsupported_feature
POST /v1/me/push-registrations/{id}/test
Creates a test record targeted at the calling device and pushes it to this registration only, ignoring every setting.
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
id | uuidv7 | Yes | Registration id. |
Response: 202 with inline
| Name | Type | Required | Meaning and constraints |
|---|---|---|---|
recordId | uuidv7 | Yes | The test record's id. |
Errors: core.rate_limited, core.not_found, push.home_only
POST <endpoint>
Home server, as RFC 8030 application server, sends the encrypted 93-octet payload (196-octet aes128gcm body) to a browser or UnifiedPush endpoint.
Request body: WebPushMessage (binary, aes128gcm)
Response: 201, 403, 404, 410, 400, 413, 429
20 Client behaviour and user experience
GET /sloppyv-release.json
Web release manifest a web client publisher SHOULD publish on the web client's own origin for every release (PD-20-6); not a server API endpoint. The method is implied (a published static file); the spec only says 'publish ... at /sloppyv-release.json on the client's origin'.
Response: with WebReleaseManifest
21 Deployment and operations
GET {controlUrl} (operator-configured absolute wss: URL, or ws: URL on a loopback host, or a Unix domain socket; MUST NOT be under {base}/v1/)
WebSocket upgrade (RFC 6455) opened by a relay node to the issuer's call control, with subprotocol sloppyv-relay-control.v1; carries relayctl.* JSON messages. Not a protocol endpoint of the server, not advertised in ServerMetadata, and SHOULD NOT be reachable from the public Internet except by relays.
Response: 400, 401 with problem object (00 §7.9) on failure; otherwise a WebSocket carrying RelayControlMessage frames