Skip to content

HTTP and XRPC API

This is what the host answers over HTTP, at PUBLIC_URL (config). Each org.atgrp.* method has its lexicon under lexicons/org/atgrp, which says what it takes and answers, and the docs site shows it under the method. The org.atgrp.internal.* methods, under lexicons/org/atgrp/internal, are this host’s own, for its console, its command and its operators. They aren’t part of the Atmosphere Groups spec, and may change. The design pages say why each part works the way it does.

An XRPC error is JSON, the same as atproto’s servers send: an HTTP status and {"error", "message"}. Besides the names a method’s lexicon lists, any method may answer these:

InvalidRequest

a parameter is missing or bad, or a method is asked with the wrong HTTP method. The host checks a org.atgrp.* method’s parameters and JSON input against its lexicon before anything else, as atproto’s reference server does, and says where and what is wrong (Input/roles/2/role must not be longer than 64 bytes)

PayloadTooLargeError

a JSON input is over 2 MiB

AuthMissing

the method needs a caller and there isn’t one

BadJwt, BadJwtAudience, BadJwtIss, BadJwtLexiconMethod

service auth doesn’t hold up: a bad token, a token for another service, a signer whose key can’t be found, or a token for another method

Forbidden

the caller’s roles lack the action (missing <action>)

GroupNotFound

the DID isn’t a group here

RepoDeactivated

the group is switched off

RateLimitExceeded

a 429: the caller has asked more than a limit allows in its window. Retry-After says in how many seconds to ask again, and RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and RateLimit-Policy say which limit

InternalServerError

the host’s database, or a server it asked, failed; the message says no more than Internal Server Error, and the host’s log says what

The atproto methods answer with atproto’s own names (RepoNotFound, BlobNotFound, InvalidSwap, CredentialRevoked, …). When an app writes a record as a group in one of our own org.atgrp.* collections, the host checks it against its lexicon and answers validationStatus: "valid". It keeps a record of any other collection without reading it and answers unknown. A GET or POST under /xrpc/ that no route answers gets 501 MethodNotImplemented, unless it carries atproto-proxy and a group’s token: then the host sends it on (signing in).

The host’s own methods know their caller in one of two ways:

  • Service auth. That’s Authorization: Bearer <jwt>, from the caller’s own PDS (com.atproto.server.getServiceAuth), with the host’s SERVICE_DID as aud (or SERVICE_DID#<service>, the way a PDS proxying to the host’s #atgrp service names it) and the method’s NSID as lxm. An app, or the atgrp command, calls as a person this way.
  • The console’s cookie, __Host-group_host_session (group_host_session where the console isn’t on https). The host signs it once someone signs in to the console (signing in). The host uses it only when no Authorization is sent, and only from the console’s own pages. A request with another Origin counts as coming from nobody.

What a caller may then do in a group is what their roles there allow (membership), and a method’s lexicon names the permission it needs. An app signed in as a group, with the host’s OAuth (signing in), writes to the group’s repo and spaces through the atproto methods below.

POST org.atgrp.internal.createGroup

starts a group, with the caller as its founder and first admin. metaPublicRead: false keeps its meta space from anyone but its members. joinPolicy is open, approval or invite (approval unless given). A handle already held here fails HandleTaken

Lexicon

Host-level: create a new group on this host. Authenticated as the founder (service auth from their PDS). The founder and any listed stewards become its first admins. Mints the group DID, creates the meta and members spaces, writes the bootstrap records and, for a discoverable group, a declaration. Modality spaces are left to the apps that use them (createSpace).

Input

handlestring (handle)
stewardsarray of defs#accountRef, optionalAccounts that run the group alongside the founder, as admins from the start.
displayNamestring, at most 640 bytes
descriptionstring, at most 20000 bytes, optional
joinPolicydefs#joinPolicy, optionalDefaults to approval.
metaPublicReadboolean, default true, optionalWhether anyone may read its meta space (its policy's publicRead). Members read it either way.

Output

didstring (did)
metastring (space-ref)
membersstring (space-ref)

Errors

InvalidHandle, HandleTaken, AccountCreationFailed, NotAllowed

org.atgrp.internal.createGroup.json

GET org.atgrp.internal.getGroup

shows a group as the caller may see it. Someone signed in who may read meta gets its about record (displayName, description, avatar, website) and its config’s joinPolicy. One who may read members also gets its rules, its labels, its member count, roles and spaces. Spaces come meta and members first, then the index’s in its order, then the group’s others, with an unlisted one only for someone who reads it. A member is told, as grantable, which actions’ permissions and permission sets they hold enough of to give a role, as labelSpaces the spaces where their roles write labels, and as accepted whether their own repo in members holds any record. One holding admit gets up to 100 waiting joinRequests, and someone waiting to join gets their own as viewer.request. While the group is switched off, someone signed in gets only its DID, handle, address and two spaces’ URIs, deactivated: true and viewer.steward. Someone not signed in gets only its DID and handle

Lexicon

Get a detailed view of a group: its profile and rules, and — for a viewer who may read the members space — how many are in it (listMembers names them), its roles, spaces and their read gates, plus the join queue for a viewer holding admit. Without auth, only the group's did and handle; with it, the viewer's standing and what their roles let them read. Every gate is the decision a space credential is minted on.

Parameters

groupstring (did)The group DID.

Output

groupdefs#groupViewDetailed
rolesarray of defs#roleView, optional
bindingsarray of defs#roleBinding, optional
spacesarray of defs#spaceView, optional
joinRequestsarray of defs#joinRequest, optionalPending requests, newest first. Present only for a viewer holding admit.

Errors

GroupNotFound

org.atgrp.internal.getGroup.json

GET org.atgrp.internal.checkAddress

says whether an address (one label under HANDLE_DOMAIN) is free for a new group. Anyone may ask

Lexicon

Whether an address under this host's domain is free for a new group: no account's handle here, nor kept by a group as its address after it took a handle of its own. Anyone may ask, as anyone may resolve a handle.

Parameters

addressstring, at most 253 bytesOne label under this host's domain, as describeServer names it: riders.groups.test.

Output

addressstring, at most 253 bytesThe address, lowercased.
availablebooleanWhether a new group may take it.

org.atgrp.internal.checkAddress.json

GET org.atgrp.internal.checkGroupHandle

says whether a domain names the group yet, so it can be its handle

Lexicon

Whether a domain is ready to be the group's handle: what its _atproto DNS record, or its /.well-known/atproto-did, names now. Changes nothing. Requires group.configure.

Parameters

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
handlestringThe domain to check, such as riders.org.

Output

handlestring (handle)The domain, as the host reads it: lower case, with no @.
readybooleanWhether updateGroupHandle would take it now: the domain names this group, or it is the group's own address.
didstring (did), optionalThe DID the domain names now, if any: another one means its record is wrong.

Errors

InvalidHandle, UnsupportedDomain, HandleNotAvailable

org.atgrp.internal.checkGroupHandle.json

POST org.atgrp.internal.updateGroupHandle

gives the group a handle on its own domain, or gives its address back. It refuses a bad handle (InvalidHandle), a name under HANDLE_DOMAIN but its own address (UnsupportedDomain), another account’s handle (HandleNotAvailable), a domain that doesn’t name the group yet (NotPointing), and a DID the host’s key no longer controls (NotController)

Lexicon

Give the group a handle on a domain it owns, once that domain names the group by its _atproto DNS record or its /.well-known/atproto-did; or give it back its own address as its handle. Updates the group's did:plc and tells the network. Its address stays reserved for it. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
handlestring (handle)The new handle: a domain that names the group, or the group's own address.

Output

handlestring (handle)

Errors

InvalidHandle, UnsupportedDomain, HandleNotAvailable, NotPointing, NotController, InvalidOperation

org.atgrp.internal.updateGroupHandle.json

POST org.atgrp.internal.putGroupDomain

serves the group at its handle’s own domain once that domain answers as this host. Its address and www. under the domain redirect there (NoOwnDomain, NotReaching) (its own domain)

Lexicon

Serve the group at the domain of its handle, once the group has a handle on a domain of its own and that domain reaches this host: the domain answers the host's /.well-known/ and /xrpc/, its / leads to the group's page in the console, and the group's address and www. under the domain redirect to it. Until the handle changes or deleteGroupDomain. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Output

domainstringThe domain the group is served at: its handle, a domain of its own.

Errors

NoOwnDomain, NotReaching

org.atgrp.internal.putGroupDomain.json

POST org.atgrp.internal.deleteGroupDomain

stops serving the group at its own domain

Lexicon

Serve the group at its address alone again, not at the domain of its handle (undoing putGroupDomain). Requires group.configure. A group served at its address already is left as it is.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

org.atgrp.internal.deleteGroupDomain.json

POST org.atgrp.internal.deactivateGroup

switches a group off until activateGroup

Lexicon

Switch the group off: its account is deactivated on this host, so nothing can read its spaces or write as it. Reversible with activateGroup. Requires group.configure. The host remembers who held group.configure at this moment, because while the group is off its membership cannot be read.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Errors

AlreadyDeactivated

org.atgrp.internal.deactivateGroup.json

POST org.atgrp.internal.activateGroup

switches a deactivated group back on

Lexicon

Switch a deactivated group back on. Allowed to anyone who held group.configure when it was switched off.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Errors

NotDeactivated

org.atgrp.internal.activateGroup.json

POST org.atgrp.internal.deleteGroup

deletes a group for good (groups). It answers tombstoned, which is false when a steward’s recovery key is on the DID, since the host leaves the DID to them

Lexicon

Delete the group: its account, its repo and its spaces on this host, and the host's own state about it. Irreversible. Requires group.configure, or, for a deactivated group, having held it when the group was switched off. Records members wrote into its spaces live on their own PDSes and are not touched. If no steward holds a recovery key, the group's did:plc is tombstoned too, since nobody could ever use it again; with one, the DID is left for its holders.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Output

tombstonedboolean, optionalWhether the group's DID was ended in the directory.

org.atgrp.internal.deleteGroup.json

A group’s address, and its own domain once it’s served there, answer these too. A request to the host’s own name never does:

GET, HEAD https://<address>/

redirects to the group’s page in the console while the group is on. Any other path, besides /.well-known/ and /xrpc/, which the host keeps for itself there, is a plain 404

https://<address>/<path>, https://www.<domain>/<path>

while the group is served at its own domain, redirect (301) to the same path and query there

GET /tls/ask?domain=<domain>

answers 200 if the proxy in front may get a certificate for domain, and 404 otherwise. A domain qualifies if it’s a group’s own domain, or www. under it, while the group is on, whether or not the group is served there yet

GET org.atgrp.internal.listMembers

lists the group’s members and their roles, a page at a time in DID order (limit, cursor), filtered to those whose handle or DID contains q, ignoring case. It’s for a caller who may read the members space. A page is 50 by default, 100 at most

Lexicon

A group's members, each with their roles, a page at a time in the order of their DIDs, for a caller who may read its members space. With q, only those whose handle or DID holds it.

Parameters

groupstring (did)The group DID.
qstring, at most 256 bytes, optionalPart of a member's handle or DID, in any case.
limitinteger, 1 to 100, default 50, optional
cursorstring, at most 2048 bytes, optional

Output

cursorstring, optionalPresent while there are more.
membersarray of defs#memberView

Errors

GroupNotFound

org.atgrp.internal.listMembers.json

POST org.atgrp.leaveGroup

leaves a group (GroupNotFound, NotAMember), unless the caller is its only admin (LastConfigurer)

Lexicon

Leave a group, deleting the caller's membership, which the group authored. The caller should also delete their confirmation. Requires service auth.

Input

groupstring (did)

Errors

GroupNotFound, NotAMember, LastConfigurer

org.atgrp.leaveGroup.json

POST org.atgrp.requestJoin

asks to join, or redeems an invite in the caller’s inbox. It answers status admitted with the membership, or pending with the request. A named invite must be the caller’s waiting invite from this group (InvalidInvite), and a waiting invite admits them whatever the policy. Under open, the caller is let in, even with a request left waiting from before. Under approval or invite, a caller who already asked gets their waiting request back, with its first message and time. Under invite, one who hasn’t asked is refused (JoinClosed). A member gets their membership. A message is 2,000 graphemes at most. A group not here fails GroupNotFound, and a switched-off one RepoDeactivated

Lexicon

Request to join a group, optionally redeeming an invite. Admits the caller right away when the join policy is open or with a valid invite, and otherwise queues a request. Returns the caller's existing request or membership if they have one. Requires service auth.

Input

groupstring (did)
invitestring (at-uri), optionalAn invite in the caller's inbox space.
messagestring, at most 20000 bytes, optionalShown to the group with the request.

Output

statusstring, pending, admitted
requestdefs#joinRequest, optionalPresent when pending.
membershipcom.atproto.repo.strongRef#main, optionalPresent when admitted.

Errors

GroupNotFound, InvalidInvite, JoinClosed

org.atgrp.requestJoin.json

GET org.atgrp.internal.getJoinRequest

shows the caller’s own request to join while it waits

Lexicon

The caller's own pending request to join, if they have one. Requires no action: listJoinRequests is the moderator's queue and needs admit, which leaves a requester unable to see the request they themselves made. Returns nothing once a request has been decided, so a denial is not disclosed.

Parameters

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Output

requestdefs#joinRequest, optional

org.atgrp.internal.getJoinRequest.json

POST org.atgrp.cancelJoinRequest

withdraws that request (GroupNotFound, JoinRequestNotFound)

Lexicon

Withdraw the caller's pending join request. Requires service auth.

Input

groupstring (did)

Errors

GroupNotFound, JoinRequestNotFound

org.atgrp.cancelJoinRequest.json

GET org.atgrp.listJoinRequests

lists the waiting requests, newest first, for those who admit people. A page is 50 by default, 100 at most (InvalidCursor)

Lexicon

List pending join requests, which the host stores privately. Approve one by writing the requester's membership record. Deny requests with 'denyJoinRequest'. Requires auth as the group.

Parameters

groupstring (did), optionalThe group's DID. A group account session names its own; a member's service auth names it here.
limitinteger, 1 to 100, default 50, optional
cursorstring, optional

Output

cursorstring, optional
requestsarray of defs#joinRequest

Errors

InvalidCursor

org.atgrp.listJoinRequests.json

POST org.atgrp.denyJoinRequest

turns a request down, for the same (JoinRequestNotFound)

Lexicon

Deny a pending join request, deleting it. To approve one, write the requester's membership instead. Requires auth as the group.

Input

groupstring (did), optionalThe group's DID. A group account session names its own; a member's service auth names it here.
memberstring (did)

Errors

JoinRequestNotFound

org.atgrp.denyJoinRequest.json

GET org.atgrp.internal.listInvites

lists the group’s invites that are still waiting and unexpired, newest first, each with the invitee’s handle, for those who may invite. A page is 50 by default, 100 at most

Lexicon

Outstanding invites. Requires invite.

Parameters

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
limitinteger, default 50, optional
cursorstring, optional

Output

cursorstring, optional
invitesarray of defs#inviteView

org.atgrp.internal.listInvites.json

GET org.atgrp.internal.getActorInvites

lists the caller’s own invites from groups here

Lexicon

The caller's own invites still waiting, from the groups on this host, newest first: for an app, which can't read the caller's inbox. With group, that group's only.

Parameters

groupstring (did), optional

Output

invitesarray of actorInvite

org.atgrp.internal.getActorInvites.json

POST org.atgrp.internal.declineInvite

turns an invite down, taking it out of the caller’s inbox and the host’s list, so the group may invite again (InviteNotFound)

Lexicon

Turn down the group's invite to the caller: it goes from the group's list and the caller's inbox. The group may invite them again.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Errors

InviteNotFound

org.atgrp.internal.declineInvite.json

A group’s roles, what each may do, and who holds them are records in its members space: org.atgrp.role, each with its permissions and the roles it may assign (canAssign, * for every role), and org.atgrp.membership. A role’s ID is lowercase letters and -, 3 to 64 of them. A role also holds an optional display name (64 graphemes) and description (2,000), and its default and bot flags. Its permissions and canAssign hold 100 entries each at most. A membership’s key is the member’s DID, and its roles (100 at most) name only roles the group defines (InvalidRequest otherwise). They’re written as the group with the com.atproto.space.* writes below. Writing a membership for someone waiting to join lets them in. Writing one for a member changes their roles, and deleting one puts the member out (membership).

RefusalWhy
LastConfigurernobody would be left holding a role that configures the group
RoleInUsea deleted role is still held
NotAssignablethe writer may not assign a role being given or taken, or one whose grant is changing, or may not give every role (*)
ScopeNotHeldthe writer’s roles don’t hold a permission being given
MemberRolea membership leaves out member
JoinRequestNotFounda membership is made for someone who isn’t waiting to join

The host’s methods ask about eleven actions. A role holds one when its permissions include the one below, or another that covers it:

group.configure

include:org.atgrp.authManageAdmin

space.create, space.configure, space.delete

space:*?manage=create, space:*?manage=update, space:*?manage=delete

admit, role.assign, eject

space:org.atgrp.members?skey=self&collection=org.atgrp.membership&action=create, with action=update or action=delete in its place

invite

space:org.atgrp.inbox?authority=*&skey=self&collection=org.atgrp.invite&action=read_self&action=create&action=update&action=delete

mod.read

rpc:org.atgrp.mod.querySubjects?aud=*

mod.resolve

rpc:org.atgrp.mod.updateSubject?aud=*

label

space:*?collection=com.atproto.label.record

The group’s permission sets give these, with what else each writes:

SetActionsAlso
org.atgrp.authManageBasicnonethe about record and rules
org.atgrp.authManageMembersinvite, admit, role.assign, ejectlistJoinRequests, denyJoinRequest, listInvites
org.atgrp.authModeratemod.read, mod.resolve, ejectlabels in meta and members only, so no label · the moderation queue and getModSubjectBlob
org.atgrp.authManageAdminall of the above, and group.configurethe config, labeler and roles · manage=update on meta and members

A new group has two roles. member is everyone’s. The founder’s admin holds include:org.atgrp.authManageAdmin, space:*?collection=com.atproto.label.record, space:*?manage=update, space:*?manage=create&manage=delete, space:*?collection=* and repo:*, and may assign every role (*).

org.atgrp.authParticipate is for a person’s own session at their PDS, never a group’s. It reads meta, writes the person’s own confirmation in members, makes their inbox, and calls the methods a person calls about their own place in a group (requestJoin, leaveGroup, declineInvite, submitReport, submitAppeal and the rest).

A group invites someone by writing an org.atgrp.invite record in their inbox as the group. It takes the invite back by deleting it, with the same writes (membership). An inbox, at self, takes org.atgrp.invite records alone, and one write at a time (InvalidRequest). An invite’s message is 2,000 graphemes at most, and its expiresAt must be a time to come (InvalidRequest).

GET org.atgrp.internal.getViewer

says who’s asking, by the console’s cookie or service auth. It also lists the other accounts the browser is signed in to (accounts), and where someone without an account makes one (signUpAt, SIGNUP_PDS)

Lexicon

Who is asking: by the console's session cookie, or their service auth. Nothing, for no one. For the console to show who is signed in, and the other accounts it can switch to.

Output

actordefs#actorView, optionalWho is asking, with the handle their DID document names and canCreateGroup; absent when no one is.
accountsarray of defs#actorView, optionalThe other accounts this browser is signed in to, by the console's cookies, the one used last first, which it can switch to; absent when there are none.
signUpAtstring (uri), optionalThe PDS this host signs someone with no account up at (SIGNUP_PDS), as the console's sign-in offers it.

org.atgrp.internal.getViewer.json

GET org.atgrp.internal.getActor

gives a person’s DID and handle to someone signed in, about themselves or anyone the host shows (a member of a group here, or someone asking to join one). Asked about themselves, it also says whether they may start a group

Lexicon

Get a person as a view names them. Requires auth. Answers for the caller themselves, or for anyone the host shows — a member of a group it runs, or someone asking to join one.

Parameters

actorstring (did)DID of the person.

Output

defs#actorView

Errors

ActorNotFound

org.atgrp.internal.getActor.json

GET org.atgrp.internal.getActorGroups

lists the groups here a person is in, as far as the caller shares them

Lexicon

Get the groups on this host the actor is in. For the caller, all of theirs; for anyone else, only those the caller is in too, since a group's members are only its members' to know.

Parameters

actorstring (at-identifier)
limitinteger, 1 to 100, default 50, optional
cursorstring, optional

Output

cursorstring, optional
groupsarray of defs#groupViewBasic

org.atgrp.internal.getActorGroups.json

GET org.atgrp.internal.searchActors

finds accounts whose handle matches what’s typed, from the source ACTOR_SEARCH names. Anyone may ask

Lexicon

Accounts whose handle matches what is typed, best first, for a field where a handle is typed. Where the host looks is its ACTOR_SEARCH: a typeahead service that knows the whole network, or, on a network of its own, the handles its PLC directory names. Anyone may ask. Under two letters, or when the host cannot look, none.

Parameters

qstring, at most 256 bytesWhat has been typed of a handle, a leading @ let go.
limitinteger, 1 to 25, default 6, optional

Output

actorsarray of actor

org.atgrp.internal.searchActors.json

GET /img/<did>/<cid>

serves a group’s or a person’s image to anyone who may see it. That’s anyone for an image in a public repo, and otherwise only someone signed in to the console. One the group has taken down in a space, by its writer or a record holding it, it serves to nobody. A moderator reads it through getModSubjectBlob

A group’s spaces, and the records in them (spaces).

GET org.atgrp.internal.listSpaceRecords

lists the records in a space from the host’s index of it, for someone signed in who may read it, but none the group has taken down with a !takedown label, for a moderator as for anyone. It brings the index up to date first, waiting 5 seconds at most, then answers newest first, by when the index first saw that version of a record. It filters by collection, by field and equals, or to one uri. A page is 50 by default, 100 at most

Lexicon

Records in one of a group's content spaces, from the host's index of it: one collection or every collection, newest first, a page at a time. Only for someone signed in whom the space's policy lets read, checked on every call, a space open to anyone included.

Parameters

groupstring (did)
spacestringThe space's URI.
collectionstring (nsid), optional
limitinteger, 1 to 100, default 50, optional
cursorstring, optionalFrom the last page: continues with older records.
fieldstring, at most 128 bytes, optionalOnly records whose field (a name or a dotted path, like subject.uri) equals equals.
equalsstring, at most 2048 bytes, optional
uristring (at-uri), optionalOne record in the space, by its URI.

Output

recordsarray of spaceRecord
cursorstring, optional

Errors

NotFound, NotAuthorized

org.atgrp.internal.listSpaceRecords.json

GET org.atgrp.internal.getSpaceBlob

serves a file in a space, read from the repo of whoever wrote it, unless the group has taken down its writer or a record holding it. It reads only from a writer the space still lets write, up to 5 MiB, and checks the bytes against the CID. It’s served with nosniff, a sandboxing CSP and a private cache of an hour

Lexicon

A picture or file in one of the group's spaces, for a caller the space lets read it: the host reads it from whoever wrote it, as the space's authority, so a page never reaches anyone's own server.

Parameters

groupstring (did)
spacestringThe space, by its URI.
repostring (did)Who wrote it.
cidstring (cid)

Errors

NotFound, NotAuthorized

org.atgrp.internal.getSpaceBlob.json

The host is the spaces’ authority and the PDS of the group’s own repo in each, so it answers the space alpha’s methods:

POST com.atproto.space.authorizeSpaceSync

gives a credential to read a space, bound to credentialKey, with the space’s revision (spaceRev). It gives one to a user it lets in (delegationToken), or to anyone for a space open to all. With notify, it registers an endpoint, once the endpoint confirms, to hear of changes until the credential lapses. A refusal also withdraws any registration of the notify it names. The endpoint is https (http while the host is), its token 512 bytes at most, and its confirmation is read to 4 KiB within 10 seconds (SpaceDeleted, RepoDeactivated, InvalidDelegationToken, RegistrationNotConfirmed)

POST com.atproto.space.notifyRepoUpdate

hears about a member’s write in a space, by service auth from the writer. A repoRev more than 5 minutes ahead fails FutureRev

GET com.atproto.space.listWriters

lists the space’s writer set in the order of its revisions, each a repoWrite or a repoRemoved. A page holds up to 1000 (100 by default), and cursor is the last one’s spaceRev

POST com.atproto.space.notifyCredentialsRevoked

hears from a space’s authority that credentials no longer hold, from that authority alone, for a repo here, 1 to 100 at a time

GET com.atproto.space.getRecord
GET com.atproto.space.listRecords
GET com.atproto.space.getRepo
GET com.atproto.space.getLatestCommit
GET com.atproto.space.listRepoOps
GET com.atproto.space.getBlob
GET com.atproto.space.listBlobs

serve the group’s own repo in a space, for a credential that may read it. getRecord, getRepo (a STAR archive, application/vnd.dasl.star), getLatestCommit and listRepoOps (its commit on every page) need a MAC asked for in Accept-Signature (InvalidSpaceMac). A malformed cursor fails with InvalidCursor. A page of listRecords is 50 by default, of listRepoOps 100, and of listBlobs 500, each 1000 at most. Answers are Cache-Control: private and vary with authorization and accept-signature. A credential that doesn’t hold up fails MissingJwt, BadJwtSub, BadJwtIss, BadSpaceSignature, CredentialRevoked, BadSpaceAudience or InvalidCredential

The host sends com.atproto.space.notifySpaceUpdate to the endpoint of a service registered for a space. It sends one for each change to the writer set, for a lapsed registration, and when the space is deleted (spaces). A change goes to 50 registrations at a time, once. It tells a lapsed registration at the next change after it lapsed, in that change’s place. A lapse or deletion notice is retried after 1 minute, 10 minutes, an hour and 6 hours, then every 12 hours, for three days. A syncer that refuses its lapse notice, or never gets it, is unregistered.

When the group writes in a space whose authority is elsewhere, the host tells that authority with notifyRepoUpdate. It keeps only the newest notice owed for each repo and space, and retries it with waits doubling from 10 seconds up to an hour, for a day. An answer of 4xx, other than 408, 425 or 429, drops it.

To keep its index, the host reads a writer’s repo in a group space with listRepoOps, 500 a page, or whole with getRepo, up to 64 MiB.

The host is each group’s OAuth server (signing in):

GET /.well-known/oauth-authorization-server
GET /.well-known/oauth-protected-resource

its metadata

POST /oauth/par
GET /oauth/authorize
POST /oauth/token
POST /oauth/revoke

atproto OAuth’s endpoints. par takes only scopes the client’s metadata declares, atproto among them, and all it declares when scope is left out. authorize sends the browser to the console to approve, and answers a plain 400 page for a request that’s unknown, lapsed or another client’s. token answers the approving member’s DID as member beside the group’s as sub. A refresh token works once, and using it again fails invalid_grant while the grant goes on. revoke ends the grant of either token, and what it bought of the group’s spaces, and answers the same whether it found one or not

GET /img/app?id=<client_id>

serves an app’s logo, the logo_uri of its client metadata, so a reader’s browser never asks the app’s server. It serves one only on the client id’s own origin, over https, and only a PNG, JPEG, GIF or WebP image of at most 256 KiB, by its bytes, never SVG. It keeps each for 10 minutes, 100 apps’ at most, and answers 404 for anything else

The host takes a client by its metadata:

  • A native app on the same machine may use the loopback client id http://localhost. An http redirect to 127.0.0.1 or [::1] may be registered without its port, and then matches whatever port the app listens on.
  • A native app is a public client (token_endpoint_auth_method: none).
  • A confidential client signs its client assertion with a key from its metadata’s jwks or its jwks_uri. A key not among the kept set has the set fetched once more.
  • A client keeps authenticating the same way, with the same key, for the grant’s life.
  • A DPoP proof is ES256 or ES256K and carries the host’s nonce (use_dpop_nonce otherwise). A proof to a resource carries ath, the hash of its access token, and one to the OAuth endpoints carries none. A proof is good once.
POST org.atgrp.internal.provisionGroup

lets an app that PROVISIONING_CLIENTS names start a group for a person, and signs the app in to it. It takes metaPublicRead as createGroup does. The app sends its clientId, a client assertion if it’s confidential, a DPoP proof and a scope, which must hold atproto and only scopes its metadata declares (UntrustedApp, InvalidScope). It answers did, meta, members and session, a token response narrowed to the founder’s roles. The session is an ordinary grant: it refreshes at /oauth/token, lasts as an OAuth grant does, and shows in listGroupTokens. An OAuth failure comes back named by its OAuth code (invalid_client, invalid_dpop_proof, use_dpop_nonce, …)

Lexicon

Host-level: an app creates a group for a person and gets its own OAuth session on it. Authenticated twice: the person asking, by service auth from their PDS (they become the founder), and the app, by OAuth client authentication in the body (a client assertion for a confidential client) with a DPoP proof in the DPoP header, exactly as at the token endpoint. The app must be one this host provisions for. Returns the group and a token response bound to the proof's key, issued to the app's client id: refreshed, listed and revoked like any other session on the group.

Input

handlestring (handle)
displayNamestring, at most 640 bytes
descriptionstring, at most 3000 bytes, optional
joinPolicydefs#joinPolicy, optional
metaPublicReadboolean, default true, optionalWhether anyone may read its meta space (its policy's publicRead). Members read it either way.
stewardsarray of defs#accountRef, optionalAccounts that run the group alongside the founder.
scopestring, at most 2048 bytesThe OAuth scope the app wants on the group. Must include atproto, and every entry must be one the app's client metadata declares.
clientIdstring, at most 2048 bytesThe app's OAuth client id, its client metadata's URL.
clientAssertionTypestring, at most 256 bytes, optional
clientAssertionstring, at most 8192 bytes, optional

Output

didstring (did)
metastring (space-ref)
membersstring (space-ref)
sessionunknownAn OAuth token response (access_token, token_type, refresh_token, expires_in, scope, sub), as /oauth/token returns it.

Errors

UntrustedApp, InvalidScope, use_dpop_nonce, HandleTaken

org.atgrp.internal.provisionGroup.json

POST org.atgrp.internal.getGroupAuth

gives a member with a DPoP proof a 15-minute token to act as the group. In one of the group’s spaces, it’s scoped to what their roles may write there as the group, and to the manage= operations they may use on it. For a space not made yet, that’s manage=create, if their roles hold space.create. In someone’s inbox, it lets a member who may invite write invites there. It answers Forbidden if that’s nothing. It answers did, accessJwt (an opaque token, not a JWT), pds, collections, repoCollections, scope and expiresAt. The token is never refreshed

Lexicon

Obtain a DPoP-bound OAuth access token to act as the group DID. The host is the group's PDS and authorization server: the caller authenticates with their personal account (service auth) and presents a DPoP proof; the host issues a short-lived token for the group DID whose space: scopes are exactly what the caller's roles grant them there, across the group and in the space's policy. No group password is involved. The same token may write those kinds of record in the group's public repo too (repoCollections): publishing them, as the group. For someone's inbox (org.atgrp.invites), a caller whose roles may invite gets a token to write the group's invite there, and nothing in the group's repo.

Input

groupstring (did)
spacestring (space-ref)The space the caller intends to write into: one of the group's, where the scopes the caller's roles hold there bound the grant, or someone's inbox, to invite them.

Output

didstring (did)
accessJwtstring
pdsstring (uri)Where to use it: the group's PDS (this host).
collectionsarray of defs#collectionRefCollections the caller's roles may write as the group in that space ('*' for any).
expiresAtstring (datetime)
scopestring, optionalThe token's OAuth scope string; the PDS enforces it.
repoCollectionsarray of defs#collectionRef, optionalPublic-repo collections this token may also write.

Errors

Forbidden

org.atgrp.internal.getGroupAuth.json

GET org.atgrp.internal.getAuthorization

shows an app’s request to sign in as a group, as the caller would approve it. It names the app by its client metadata, giving its home page and logo only where /img/app would show them. It offers the switched-on group a login_hint names, if it’s here, or else every switched-on group where the caller holds a role, each with what the app would get and what it wouldn’t (granted, withheld), and the group’s display name and avatar where the caller reads its meta

Lexicon

An app's pending request to sign in as a group, as the caller would approve it: the app, the groups the caller may act for, and for each one what the caller's roles let the app do. Called by the console's approval page, with service auth from the caller's own PDS.

Parameters

requestUristringThe request_uri the app received from this host's pushed authorization request endpoint.

Output

clientclient
requestedarray of defs#scopeRefThe scope values the app asked for.
labelsarray of label, optionalWhat each permission set the app asked for, and each a group would give in place of one, is called, and says it is for, in its own words.
loginHintstring, optionalThe group the app named, if it named one.
groupsarray of groupThe groups the caller may sign in as: the one the app named, or every group on this host where the caller holds a role.
mcpboolean, optionalWhether the app is an MCP client, an AI app, asking to act as the caller in a group through the host's MCP tools rather than to sign in as one. It asks for no scope: it may do what the caller's roles in the group allow.

Errors

ExpiredRequest

org.atgrp.internal.getAuthorization.json

POST org.atgrp.internal.approveAuthorization

approves the request with what the caller’s roles allow, for a switched-on group here where the caller holds a role, and the one the app named, if it named one (Forbidden). It answers the redirect, with a code good for 60 seconds. A request no longer waiting fails ExpiredRequest

Lexicon

Approve an app's pending request to sign in as a group. The app gets what the caller's roles in the group allow and nothing more, and every token it obtains is recorded as the caller's. Returns the URL to send the browser back to the app with.

Input

requestUristring, at most 512 bytes
groupstring (did)

Output

redirectUrlstring (uri)

Errors

ExpiredRequest, Forbidden

org.atgrp.internal.approveAuthorization.json

POST org.atgrp.internal.declineAuthorization

declines the request, redirecting the app with access_denied

Lexicon

Decline an app's pending request to sign in as a group. Returns the URL to send the browser back to the app with, carrying access_denied.

Input

requestUristring, at most 512 bytes

Output

redirectUrlstring (uri)

Errors

ExpiredRequest

org.atgrp.internal.declineAuthorization.json

GET org.atgrp.internal.listGroupTokens

lists the grants in force, for a member with group.configure, and the latest 20 entries of the group’s activity log, each with the handle of whoever let it in or acted. Each app comes as its client metadata names it, where that can be read (client: name, home page, logo). A write also comes in its parts (write: operation, collection, key, space), with what its kind of record is when that’s another app’s lexicon the host can read (write.description), and with whom it’s about (subject). Making, changing or ending a space comes as space: the space, the operation, and publicRead when the change opened it to anyone (true) or closed it to those its policy names (false)

Lexicon

The OAuth sessions issued by this host for the group DID (apps acting as the group), plus recent activity. Requires group.configure.

Parameters

groupstring (did)

Output

sessionsarray of sessionView
activityarray of activityView

org.atgrp.internal.listGroupTokens.json

POST org.atgrp.internal.revokeGroupToken

signs one app out, for a member with group.configure (NotFound for another group’s grant or an unknown one)

Lexicon

Revoke one act-as session for the group DID. Requires group.configure.

Input

groupstring (did)
tokenIdstring, at most 128 bytes

Errors

NotFound

org.atgrp.internal.revokeGroupToken.json

POST org.atgrp.internal.createAppPassword

makes an app password for the group, for an app that signs in with one (app passwords)

Lexicon

Make an app password for the group: what an app that signs in with a handle and a password, such as the Bluesky app, signs in to the group with (com.atproto.server.createSession). It stays the caller's: it stops working once they could no longer make it, and its sessions are listed as theirs among the group's connected apps. Its sessions may use the group's public repo, its blobs and other services, never its spaces, nor get service tokens for the account's own methods or this host's. Requires a role that may write every collection as the group.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
namestring, at most 64 bytesWhat it's for, such as the device or app it signs in: unique in the group.
privilegedboolean, optionalWhether its sessions may also use Bluesky's chat (DMs) as the group.

Output

namestring
passwordstringThe password, shown this once: the host keeps only its hash.
privilegedboolean
createdAtstring (datetime)

Errors

Forbidden, InvalidName, DuplicateName, TooManyAppPasswords

org.atgrp.internal.createAppPassword.json

GET org.atgrp.internal.listAppPasswords

lists the group’s app passwords, each with its owner’s handle and when it was last used. A member with group.configure sees every one. Anyone else sees their own, if their roles hold repo:* (Forbidden otherwise). It never shows the passwords

Lexicon

The group's app passwords, never the passwords themselves: every one for whoever has group.configure, and their own for whoever may make them.

Parameters

groupstring (did)

Output

passwordsarray of appPassword

Errors

Forbidden

org.atgrp.internal.listAppPasswords.json

POST org.atgrp.internal.revokeAppPassword

revokes one, and signs out its apps, for its maker or a member with group.configure (NotFound)

Lexicon

Revoke one of the group's app passwords, and sign out every app signed in with it. Its maker may revoke their own; anyone else needs group.configure.

Input

groupstring (did)
namestring, at most 64 bytes

Errors

NotFound, Forbidden

org.atgrp.internal.revokeAppPassword.json

An app signed in this way, or with an app password, uses these as the group:

MethodWhat it does
GET com.atproto.server.getSessiondescribes the group a token acts as: its DID, its handle, and whether it’s switched on
POST com.atproto.server.createSession, POST com.atproto.server.refreshSession, POST com.atproto.server.deleteSessionhandle an app password’s sessions (app passwords). createSession answers as a PDS does, with emailConfirmed: false, active, status and didDoc
POST com.atproto.repo.createRecord, POST com.atproto.repo.putRecord, POST com.atproto.repo.deleteRecord, POST com.atproto.repo.applyWrites, POST com.atproto.repo.uploadBlobwrite to the group’s public repo. applyWrites takes 200 writes at most. putRecord and deleteRecord honour swapRecord and swapCommit, and createRecord and applyWrites honour swapCommit. uploadBlob needs the group switched on, a member whose roles still let them write something as the group, and a scope that takes the file’s type (ScopeMissing). A file no record takes within a day is swept
POST com.atproto.space.createRecord, POST com.atproto.space.putRecord, POST com.atproto.space.deleteRecord, POST com.atproto.space.applyWriteswrite to the group’s repo in a space. That’s one of its own spaces, or someone’s inbox, where it writes and deletes its invites to them (InviteNotFound, and InvalidRequest for an invite to a member). A label (com.atproto.label.record) is written and deleted in any of the group’s spaces, beside its subject. A label on a member’s record in their public repo goes in the members space (moderation)
POST com.atproto.space.createSpacemakes a space of spaceType (and skey, or a new one) under policy, an org.atgrp.policy. It publishes the policy and lists the space in the index unless the policy sets unlisted, and answers the space. It needs manage=create in the scope (ScopeMissing) and a role holding space.create (NotAuthorized). It refuses another policy type (UnsupportedPolicy), the meta and members types, a grant of a role the group lacks, two grants of one role, and a grant whose permissions include one that’s no space permission (InvalidRequest). A space already at that address fails SpaceAlreadyExists (spaces)
POST com.atproto.space.updateSpaceputs the group’s space under a new policy, published, and listed or unlisted as it says. It needs manage=update in the scope (ScopeMissing), and a role holding space.configure or a manage=update permission in the space’s own policy (NotAuthorized). It refuses changing the grant of a role the caller may not assign, adding a permission their roles don’t hold, and granting read or write, or turning on publicRead, where they don’t have it (NotAuthorized). On the members space, it refuses a policy that takes read or write from member or turns on publicRead (MembersSpaceFixed). It refuses a policy as createSpace does, and a space the group doesn’t have (SpaceNotFound)
POST com.atproto.space.deleteSpaceends the group’s space: out of the index, its syncers told, and the group’s repo in it gone. It needs manage=delete in the scope (ScopeMissing), and a role holding space.delete or a manage=delete permission in the space’s policy (NotAuthorized). The meta and members spaces are never deleted (NotAuthorized), and a space the group doesn’t have fails SpaceNotFound
GET com.atproto.space.getSpaceanswers the group’s space and its policy, for a scope that reads it (ScopeMissing) and a member who reads it or may change it (NotAuthorized, SpaceNotFound)
GET com.atproto.space.getDelegationTokenanswers a delegation token the group signs for its space, which buys a credential from authorizeSpaceSync to read the space as any reader does: the group’s repo there, here, and its members’ repos at their PDSes. It’s for a scope that reads the space (ScopeMissing) and a member who reads it themselves at that moment (NotAuthorized), in one of the group’s own spaces (SpaceNotFound)
GET com.atproto.server.getServiceAuthanswers a token, service auth the group signs with its key, for aud (a DID, or did#service), lxm if given, lapsing at exp (a minute from now unless asked; within an hour for one method, a minute for any: BadExpiration). A token’s scope must hold calling lxm (or any method) at aud (ScopeMissingError), and its member still hold repo:* (Forbidden). An app password’s session gets one for anything but chat and createAccount, unless it may use chat. Never for a method managing an account directly (InvalidRequest)
any other method, with atproto-proxy: <did>#<service>sent on to that service, signed as the group (aud the service’s DID, lxm the method, a minute), and its answer streamed back, as an account’s PDS does. Refused as getServiceAuth refuses, and with InvalidToken for a method managing an account directly or, for an app password that may not, chat. It’s InvalidRequest for a header that doesn’t parse, a service its document doesn’t name, or this host itself, and UpstreamFailure for a service that isn’t at a public address or doesn’t answer. Proxying has what it sends and passes back

A group’s about record and config, in meta, and its rules and roles, in members, change only this way. An app writes the records as the group, and the host checks each one beyond its lexicon:

  • meta takes only org.atgrp.about, org.atgrp.config and labels, and members only org.atgrp.rule, org.atgrp.labeler, org.atgrp.role, org.atgrp.membership and labels. Any other collection there is Forbidden.
  • The about record, config and labeler are kept at self and never deleted (InvalidRequest).
  • The about record’s displayName is more than spaces, and its website an http or https address. Its avatar must be one of the group’s own uploads, a PNG, JPEG or WebP image, with the mimeType and size the host kept at upload.
  • The config names a join policy the host knows.
  • A rule is kept at a TID, so a label citing it keeps its URI, and has a title that’s more than spaces.

Rules are shown by order, lowest first, then by when they were written. A file is removed once no record in the group’s repos references it.

A call sent on with atproto-proxy carries accept-encoding (identity if there’s none), accept-language, atproto-accept-labelers, x-bsky-topics and every x-atproto-* header. A POST also carries its body, up to BLOB_UPLOAD_LIMIT, with its content-type and content-encoding. The host asks only a public address, over https unless PUBLIC_URL is http, and waits 60 seconds.

The answer passes back atproto-repo-rev, atproto-content-labelers and retry-after, and a success streams back with its content’s headers. A failure comes back as {error, message} with the service’s own names, or the name atproto gives its status if it gave none. A service’s 500 comes back as a 502, still with the service’s name (InternalServerError if it gave none). So UpstreamFailure means the host couldn’t reach the service, or the service answered 502 with no name of its own. It logs each call’s method, service and status, never its token or body.

An app password is for an app that signs in with a handle and password through createSession. A member whose roles hold repo:* makes one with createAppPassword, and it stays theirs. It’s shown once, as xxxx-xxxx-xxxx-xxxx.

LimitWhat it is
name1 to 64 characters (InvalidName), unique in the group (DuplicateName)
how many25 in a group at most (TooManyAppPasswords)
scopeatproto transition:generic: the group’s public repo and files, and calls to other services, never a space. privileged: true adds transition:chat.bsky
tokensBearer JWTs, not bound to a DPoP key. An access token lasts 2 hours, and a session 90 days unless refreshed. A refresh rotates both, and deleteSession takes the refresh token
an expired access token400 ExpiredToken, an app’s cue to refresh. Any other bad token is 401 InvalidToken
its makermust still hold repo:* at each sign-in, use and refresh. Once they don’t, every app password of theirs in the group goes, with its sessions, for good

Each session is a grant, with source appPassword and client app-password:<name>. Sign-ins are limited per handle and address.

Each grant records its member, its client, its source (oauth, getGroupAuth, appPassword or provisionGroup), its scope, when it was made and when it was last used. The host marks a grant used at most once a minute.

The group’s activity log records, with the member, the client and the time:

  • a sign-in with OAuth, provisionGroup or an app password
  • a group token taken (took a token for <space>)
  • each write made with a token, invites, labels and MCP’s writes among them
  • a space made, changed, opened, closed or ended
  • an app password made or revoked
  • a grant ended with revokeGroupToken
  • an account moved here as a group, and the group moved away
  • a recovery key added or removed

It doesn’t record refreshes, or grants that end at /oauth/revoke, at deleteSession or when their member is put out. The host keeps the log until the group is deleted, and listGroupTokens answers its latest 20 entries.

WhatHow long
a pushed request (/oauth/par)5 minutes
an authorization code60 seconds, and good once
an OAuth access token1 hour
an OAuth grant14 days for a public client and 90 days for a confidential one, unless refreshed. Each refresh starts it again
a group token (getGroupAuth)15 minutes, never refreshed
an app password’s access token, and its session2 hours, and 90 days unless refreshed
a console sign-in under way15 minutes
the console’s cookie30 days
an account’s session while it moves here24 hours at most
a DPoP proof60 seconds old at most, with 10 seconds’ skew. The nonce changes every 3 minutes, and the one either side is taken too
a client assertionits iat within 300 seconds
a client’s metadata, its key set, another app’s permission set, an app’s logokept 10 minutes. Metadata is read to 64 KiB, and kept for 1000 clients at most
a proxied call60 seconds, and its service auth a minute
getServiceAuth’s tokena minute unless asked. An hour at most for one method, and a minute for any
an MCP client’s request, access token and refresh token10 minutes, 1 hour, and 30 days unused
an MCP client registered and never used24 hours
migratePrepare’s export token1 hour

An MCP client (an AI app) connects to a group over MCP (MCP). Its tools are in MCP tools.

POST /mcp

the MCP server, which answers each JSON-RPC message as the member who connected the client

GET /.well-known/oauth-protected-resource/mcp
GET /.well-known/oauth-authorization-server/mcp

its metadata

POST /mcp/register
GET /mcp/authorize
POST /mcp/token

its own OAuth server

GET org.atgrp.internal.listConnectedApps

lists the MCP clients the caller connected to a group

Lexicon

The AI apps, MCP clients, you've connected to the group to act as you there, the most lately used first: each by the name it gave, to disconnect with revokeConnectedApp.

Parameters

groupstring (did)

Output

appsarray of appView

org.atgrp.internal.listConnectedApps.json

POST org.atgrp.internal.revokeConnectedApp

disconnects one

Lexicon

Disconnect an AI app you connected to the group (listConnectedApps): its tokens end, and it acts as you there no more.

Input

groupstring (did)
clientIdstring, at most 2048 bytesThe app's client ID, as listConnectedApps gives it.

org.atgrp.internal.revokeConnectedApp.json

POST org.atgrp.mod.submitReport

reports a member, a record in one of the group’s spaces here, or a member’s record in their public repo: subject is an account’s DID or a record’s URI, with an optional cid. The reporter must be able to read its space (the members space for a member or their public record), and the group’s labeler must take reports of its kind and reason. reasonType is one of the org.atgrp.mod.defs#reason* tokens (reasonSpam, reasonViolation, reasonMisleading, reasonNsfw, reasonRude, reasonOther), and a rule it cites is a rule in the members space. A reason the labeler doesn’t take is InvalidRequest. The host doesn’t check that a reported record exists or that its cid matches. It answers the report’s eventId and createdAt (GroupNotFound, InvalidSubject)

POST org.atgrp.mod.submitAppeal

appeals a label or an ejection on the caller’s own account or record, with an optional note, and reopens the subject. It takes an appeal from someone who has left the group too. It answers the appeal’s eventId and createdAt (GroupNotFound, InvalidSubject for a subject that isn’t the caller’s, NotAppealable for one with no live label or ejection)

GET org.atgrp.mod.querySelfHistory

lists what the group did to the caller’s account and records, or to one subject of theirs, newest first unless sort is oldest. It leaves out reports, tags, notes and who acted, and works for former members (GroupNotFound, InvalidSubject, InvalidCursor)

GET org.atgrp.mod.querySubjects

lists the moderation queue: every status unless status is open or resolved, and only subjects with any of tags when given. sort is oldest (the default) or newest by when the subject entered the queue, or updated, the latest changed first (InvalidCursor). Each subject comes with its account as actor and its reportCount

GET org.atgrp.mod.querySubjectHistory

lists a subject’s events (reportEvent, appealEvent, statusEvent, tagEvent, labelEvent, ejectEvent), newest first unless sort is oldest, a page at a time. Each event names the version it’s about (cid), and who acted as createdBy (a DID) and creator. With a cid, it lists those about that version. For a record in one of the group’s spaces that the caller may read, it also answers the record as the host’s index holds it, with takenDown true if the group has taken that version down (InvalidSubject, InvalidCursor)

GET org.atgrp.internal.getModSubjectBlob

serves a file the record subject holds, by its cid, to someone with mod.read whom the record’s space lets read it, even if the group has taken the record down. A file the record doesn’t hold, or a record the caller can’t read there, fails with NotFound

Lexicon

A picture or file a record subject holds, for a moderator reviewing it, even when the group has taken the record down: the record as getModSubjectHistory gives it, in one of the group's spaces the caller's roles let them read, read from whoever wrote it. Requires mod.read.

Parameters

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
subjectstring (uri)The record, by its URI in one of the group's spaces.
cidstring (cid)The file, one the record holds as the host's index has it.

Errors

InvalidSubject, NotFound

org.atgrp.internal.getModSubjectBlob.json

POST org.atgrp.mod.updateSubject

changes a subject in the queue: its status (open or resolved), a note, and its tags (addTags, removeTags, lowercase letters and -, 128 characters at most, 25 at most each). What it leaves out stays as it is. It answers the subject (InvalidSubject, SubjectNotFound)

POST org.atgrp.internal.putLabelDefinition

defines or changes one of the group’s own labels (lowercase letters and hyphens) in its labeler, for someone with group.configure. Its name (64 graphemes at most) and description (2,000) are in lang (en unless given), and replace only those in that language. The label is 100 characters at most. Unless asked, severity is inform, blurs is none and defaultSetting is warn, and adultOnly is set only when true. It answers the definition, and getGroup answers them as labels

Lexicon

Define one of the group's own labels, or change one it defines: what it means and how apps should show it, in its labeler, with the label among the values it applies. Changing one replaces how apps show it, and its name and description only in the given language: those in other languages stay. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
labelstring, at most 100 bytesThe label's value, as it is applied: lowercase letters and hyphens.
namestring, at most 640 bytesWhat people see it called, in its lang.
descriptionstring, at most 20000 bytesWhat it means, for people deciding how to see what wears it, in its lang.
langstring (language), optionalThe language of its name and description, which replace any it has in that language and leave the others. en unless given.
severitystring, inform, alert, none, optionalHow apps should convey it: inform, alert, or none. inform unless given.
blursstring, content, media, none, optionalWhat apps should hide behind it: content, media, or none. none unless given.
defaultSettingstring, ignore, warn, hide, optionalHow apps should show it to someone who has not chosen: ignore, warn, or hide. warn unless given.
adultOnlyboolean, optionalWhether only those who show adult content may choose to see what wears it.

Output

com.atproto.label.defs#labelValueDefinition

org.atgrp.internal.putLabelDefinition.json

POST org.atgrp.internal.deleteLabelDefinition

stops defining one. Labels already applied stay

Lexicon

Stop defining one of the group's own labels: its definition, and the value among those its labeler applies. Labels already applied stay. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
labelstring, at most 100 bytesThe label's value.

org.atgrp.internal.deleteLabelDefinition.json

A report’s reason, and an appeal’s or update’s note, is 2,000 characters at most (20,000 bytes). Reports and appeals share a limit of 10 in 5 minutes and 100 a day for each caller (limits). The queue’s lists answer 50 a page by default and 100 at most, and an unknown sort is InvalidRequest.

The group’s labeler decides what reports it takes. Its reasonTypes lists the reasons, its subjectTypes account or record, and its subjectCollections the collections of records. A field left out takes anything. A member’s record in their public repo counts as a record of its collection.

A label is a com.atproto.label.record with uri, val (128 bytes at most) and cts, and an optional cid and exp. The host checks only the shape of its uri. It doesn’t check that the subject exists, or that its cid matches.

mod.querySubjects, mod.querySubjectHistory and mod.updateSubject, like listJoinRequests and denyJoinRequest, answer a member by service auth or the console’s cookie, who names the group as group (InvalidRequest without it). They also answer an app signed in as the group (a DPoP token) whose scope names the method (rpc:, or a set listing it), as its member, while their roles hold the method’s action (signing in). That app leaves group out, since its session names it, and one naming another group gets Forbidden.

These are for its operators, the accounts HOST_ADMINS names (config), by service auth or the console’s cookie. The host refuses anyone else with Forbidden.

GET org.atgrp.internal.getLogs

returns the lines the host logged, oldest first, each as it wrote it. It returns one request’s lines by its trace, or the last lines of a message, at a level and above, or that took minMs or longer. It returns 100 unless limit asks for up to 500, and 500 for a trace. The read itself is logged as logs read, with who asked and for what

Lexicon

Get the lines this host logged, oldest first, as it wrote them to its output: one request's by its trace, or the last of a message, a level or a duration. Only the accounts the host names as its operators may ask, by service auth.

Parameters

tracestring, at most 64 bytes, optionalEvery line logged while answering one request: the x-trace-id it was answered with.
messagestring, at most 200 bytes, optionalOnly lines with this message, such as request or mcp tool.
levelstring, at most 16 bytes, error, warn, info, debug, trace, optionalOnly lines at this level or above.
minMsinteger, optionalOnly lines that took this many milliseconds or more.
limitinteger, 1 to 500, optionalHow many lines, the last of them: 100 unless asked, or for a trace, 500.

Output

linesarray of line

org.atgrp.internal.getLogs.json

GET org.atgrp.internal.getStats

shows how the host was used over the last days (7 by default, 400 at most), day by day in UTC, and what it holds. It counts requests by route and by status class, slow ones, MCP tools called by name, and groups and spaces made. Nothing in it names who asked

Lexicon

Get how this host is used, day by day, and what it holds. Nothing in it names who asked anything. Only the accounts the host names as its operators may ask, by service auth.

Parameters

daysinteger, 1 to 400, default 7, optionalHow many days, today the last (UTC).

Output

hostheld
daysarray of dayEach day asked for, oldest first, with none left out.
routesarray of routeEach route asked over the days, the most asked first.
toolsarray of toolEach MCP tool called over the days, the most called first.

org.atgrp.internal.getStats.json

The host logs every request as a request line, with its method, route, path (never its query), status and duration_ms. When it refuses or fails a request, the line also has the error and error_message it answered. Each response carries x-trace-id, the trace that every line logged while answering it carries. The trace is the host’s own, or the one a W3C traceparent header names. Since the caller names that one, a trace read may hold the lines of another request that named it too. A method other than HTTP’s own seven is counted as OTHER.

When the host calls another server others’ data names (resolving an identity, checking a token, signing someone in, reading a client’s metadata, sending a call on, telling a PDS or a syncer), it logs each attempt of each call it makes as a call line, with the server’s host, the path, the status or error, resend (0 for the first attempt, then 1 for a retry after a broken connection or a fresh DPoP nonce) and duration_ms. A call made while answering a request is logged in that request’s trace and sends a traceparent header naming it. A refusal an XRPC call gets back is logged as refused, with the server’s origin, the status and the error.

GET org.atgrp.internal.listRecoveryKeys

lists the rotation keys on the group’s did:plc that matter (recovery)

Lexicon

The rotation keys on the group's did:plc that matter: stewards' recovery keys and this host's own, highest priority first. A recovery key outranks the host's, so its holder can undo what the host does to the identity and move the group without it. Requires group.configure.

Parameters

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.

Output

keysarray of key
hostHoldsbooleanWhether this host still holds a rotation key, and so can change them.
maxintegerHow many recovery keys a group can have.

Errors

NotController

org.atgrp.internal.listRecoveryKeys.json

POST org.atgrp.internal.addRecoveryKey

adds a steward’s key, ahead of the host’s

Lexicon

Add a steward's recovery key to the group's did:plc, ahead of this host's own key. Only the public did:key is sent; the private half stays with the steward. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
keystring (did)A did:key (secp256k1 or P-256). Only the public key: the host never sees the private half.

Errors

InvalidKey, AlreadyAdded, TooManyKeys, NotController, InvalidOperation

org.atgrp.internal.addRecoveryKey.json

POST org.atgrp.internal.removeRecoveryKey

takes one off

Lexicon

Take a recovery key off the group's did:plc. This host's own key cannot be removed this way. Requires group.configure.

Input

groupstring (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
keystring (did)A did:key (secp256k1 or P-256). Only the public key: the host never sees the private half.

Errors

HostKey, UnknownKey, NotController, InvalidOperation

org.atgrp.internal.removeRecoveryKey.json

Moving groups between hosts, and accounts here to become groups (moving).

POST org.atgrp.internal.migratePrepare

on the host a group leaves, starts the move, while the directory’s last operation for the group lists this host’s rotation key (NotController). It answers service auth the group signs for destDid to call migrateReceive, good for an hour, the group’s handle, address and spaces, and an export token good for an hour. Preparing again replaces the token

Lexicon

On the source host: start moving the group to another host. Answers with a service token signed by the group, for the destination's migrateReceive; the group's handle, address and spaces; and a token, good for an hour, with which the destination pulls the group from here (migrateExport). Requires group.configure.

Input

groupstring (did)
destDidstring (did)The destination host's service DID.

Output

serviceJwtstring
snapshotunknown{handle, address, spaces: [uri]}: the group's handle and address, and every space the group holds, each by its URI, as a string. For migrateReceive, as it is.
exportTokenstringFor migrateExport, for an hour.

Errors

NotController

org.atgrp.internal.migratePrepare.json

GET org.atgrp.internal.migrateExport

on that host, serves what the destination pulls of the group: the list of its files, one file, and a space’s state and repo (InvalidToken, BlobNotFound)

Lexicon

On the source host, for the destination of a move migratePrepare started: a part of the group nothing public serves whole. meta is what this host keeps of a space as its authority, as a space meta archive (atproto-space-meta): its policy, an org.atgrp.policy; each account's grant beside the policy, as com.atproto.memberspace.member/<did>; and its writers, repo the group's own repo in a space (as com.atproto.space.getRepo does), blobs the list of its files and blob one of them. Authorized by migratePrepare's token, for an hour.

Parameters

groupstring (did)
tokenstring
partstring, meta, repo, blobs, blob
spacestring (space-ref), optional
cidstring (cid), optional

Errors

InvalidToken, BlobNotFound

org.atgrp.internal.migrateExport.json

POST org.atgrp.internal.migrateReceive

on the destination, takes the group in, switched off, for a founder here (NotAllowed), who must hold group.configure in the records it brings (Forbidden). It pulls from the PDS the group’s DID document names, reading a file to BLOB_UPLOAD_LIMIT, a repo or space to 256 MiB, and any other answer to 16 MiB. The group’s handle here is its old address’s first label under HANDLE_DOMAIN. A handle on its own domain comes along only while that domain still names the group. It answers what it took and recommendedCreds. It refuses a group already here (AlreadyHere), service auth that isn’t the group’s (BadServiceJwt), an address or handle that’s taken (HandleNotAvailable), and a source that answers with a failure (SourceUnreadable)

Lexicon

On the destination host: take the group in. Pulls it from the host it's leaving with migratePrepare's token (its public repo, what the host it leaves keeps of each space as its authority and the group's repo there, its files), checked against the group's current key, and keeps it switched off. The caller must hold group.configure by the group's own records as they arrive. Answers with what the PLC operation should name.

Input

didstring (did)
serviceJwtstring, at most 8192 bytes
snapshotunknown
exportTokenstring, at most 8192 bytes

Output

recommendedCredsunknown
recordsinteger, optional
blobsinteger, optional
spacesinteger, optional

Errors

NotAllowed, AlreadyHere, BadServiceJwt, HandleNotAvailable, SourceUnreadable

org.atgrp.internal.migrateReceive.json

POST org.atgrp.internal.migrateComplete

on the host it leaves, points its DID at the destination, then switches the group off there and answers movedTo. It refuses an ended DID, or one that no longer lists this host’s key (NotController), and says the directory’s words when it refuses the operation (InvalidOperation)

Lexicon

Source host: sign and submit the PLC operation repointing the group's DID document at the destination, and relinquish the group. Requires group.configure.

Input

groupstring (did)
recommendedCredsunknown

Output

movedTostring, optional

Errors

NotController, InvalidOperation

org.atgrp.internal.migrateComplete.json

POST org.atgrp.internal.migrateActivate

on the destination, switches it on and answers how many spaces it has. Until the DID document names this host and the signing key made here, it fails NotYet, so ask again once the directory catches up. A DID document it can’t read is SourceUnreadable

Lexicon

Destination host: activate the migrated account once the PLC operation is live.

Input

didstring (did)

Output

spacesintegerSpaces whose members' records are being read afresh.

Errors

NotYet, SourceUnreadable

org.atgrp.internal.migrateActivate.json

GET org.atgrp.internal.checkImport

shows what moving an account here would make of it: its handle, address, label, whether it keeps its handle, its pds, and a refused reason. The account keeps its handle only if it isn’t handle.invalid, isn’t under HANDLE_DOMAIN or a domain its old server gives out (availableUserDomains), and still names the account. To whoever is moving the account, it answers recommendedCreds too (NotPlc)

Lexicon

What moving an account here would make of it, before anything moves (importAccount moves it so): its handle here, whether that's the one it has, and its address, this host's own name for it. A handle on a domain of the account's own that still names it comes along; one its old server gives out becomes the address. refused says why it can't have that address, as importAccount would. While the caller's own move of it is pending, recommendedCreds says again what the operation should name, as importAccount did.

Parameters

didstring (did)
addressstring, optionalThe label of its address here, if not its handle's first label.

Output

didstring (did)
handlestring (handle)Its handle once moved.
addressstringIts address here: one label under this host's handle domain.
labelstring
keepsbooleanWhether that's the handle it has now.
fromstring, optionalThe handle it has now.
refusedunknown, optional{error, message}: InvalidHandle or HandleNotAvailable.
pdsstring (uri), optionalThe server it lives on now, as its DID document names it.
recommendedCredsunknown, optionalWhile the caller's own move of it is pending: rotationKeys, alsoKnownAs, verificationMethods and services, as importAccount answered, for the account's server to sign (com.atproto.identity.signPlcOperation).

Errors

NotPlc

org.atgrp.internal.checkImport.json

POST org.atgrp.internal.importAccount

starts moving an account here, for a founder (NotAllowed), never their own account (SameAccount), and only a did:plc (NotPlc). Its address is the label asked for, or else its handle’s first label, either made lowercase, each run of other characters a dash, and cut to 63 characters (InvalidHandle, HandleNotAvailable). The group’s about record takes its name and description from the account’s app.bsky.actor.profile, with the label as the name if it has none. It refuses an account someone else is moving (AlreadyHere)

Lexicon

Start moving an account that already exists on the network, on any server, here to become a group: check the account's proof that it hands its DID to this host, make it here switched off with new keys, and copy its whole repo and its files from its server. Answers with the credentials the account's PLC operation should name; once its server has signed one, completeImport finishes the move. The caller becomes the group's admin. Only a did:plc account, and never the caller's own. Starting again for an account the caller started on discards what the first start copied.

Input

serviceJwtstring, at most 8192 bytesA service token from the account's own server (com.atproto.server.getServiceAuth), with this host's DID as aud and com.atproto.server.createAccount as lxm.
addressstring, at most 253 bytes, optionalThe label of its address on this host; by default its handle's first label.

Output

didstring (did)
handlestring (handle)Its handle once moved: its own domain if it has one that still names it, otherwise its address.
addressstringIts address here: one label under this host's handle domain.
displayNamestring
recordsintegerRecords copied.
blobsintegerFiles copied.
recommendedCredsunknownrotationKeys, alsoKnownAs, verificationMethods and services, as com.atproto.identity.getRecommendedDidCredentials answers: what the account's server signs into its PLC operation (com.atproto.identity.signPlcOperation).

Errors

NotAllowed, InvalidToken, NotPlc, SameAccount, AlreadyHere, InvalidHandle, HandleNotAvailable, InvalidRepo, UpstreamFailure

org.atgrp.internal.importAccount.json

POST org.atgrp.internal.importAccountSpace

brings over one of its spaces while the move waits, a part at a time: meta, then each blob, then repo. An archive is 100 MiB at most, and a file BLOB_UPLOAD_LIMIT (TooLarge). It refuses the group’s own meta and members spaces (SpaceReserved), a space it doesn’t own (NotSpaceOwner), a bad archive (InvalidArchive), and a repo before its space’s meta (NotFound)

Lexicon

While an account's move here is pending (importAccount), bring one of its spaces, as its own server serves it: meta, a space it governs (com.atproto.space.exportSpaceMeta's archive), before any repo in it; repo, its own repo in a space it wrote in (com.atproto.space.getRepo's archive); or blob, one of its files in a space, before the repos that hold it. Only for whoever started the move, and only the account's own. A personalspace or memberspace policy is kept as this host's grants; one this host would not keep as it says is refused.

Parameters

didstring (did)
partstring, meta, repo, blob

Output

spacestring, optionalThe space a meta archive or repo was for.
recordsinteger, optionalHow many of a repo's records were kept: one this host would not keep, not of its collection's type, is left out.
cidstring, optionalA file's CID.

Errors

NotFound, NotSpaceOwner, InvalidArchive, UnsupportedPolicy, SpaceReserved, TooLarge

org.atgrp.internal.importAccountSpace.json

POST org.atgrp.internal.completeImport

finishes the move with the operation the account’s server signed. It must name this host as PDS, the keys made here, this host’s rotation key and the handle here (InvalidOperation)

Lexicon

Finish moving an account here: send the PLC operation its old server signed, which must give it to this host as importAccount said, switch it on and tell the network, and make the group's spaces with the caller as its admin. Only for whoever started the move.

Input

didstring (did)
operationunknownThe signed PLC operation, as com.atproto.identity.signPlcOperation answers it.

Output

didstring (did)
handlestring (handle)
addressstringIts address here: one label under this host's handle domain.
metastring
membersstring

Errors

NotFound, InvalidOperation

org.atgrp.internal.completeImport.json

GET org.atgrp.internal.getAccountMove

shows the account the caller signed in to from the console to move

Lexicon

The account the caller signed in to move here from the console (/console/move/login), if any: the host keeps its tokens at its server for them until the move is finished or cancelled, for a day at most. Empty when there is none.

Output

didstring (did), optional
handlestring (handle), optionalIts handle now, as its DID document names it.
pdsstring (uri), optionalThe server it lives on.
startedboolean, optionalWhether the caller's move of it is started (startAccountMove) and not finished.

org.atgrp.internal.getAccountMove.json

POST org.atgrp.internal.startAccountMove

starts that move. An account server whose describeServer can’t be read stops it

Lexicon

Start moving the account the caller signed in to move (getAccountMove) here, to become a group they run: the host asks its server for its token for this host, copies it as importAccount does, brings its spaces as importAccountSpace takes them, and asks its server to email the code that lets its identity move (finishAccountMove). Started again, it starts over.

Input

addressstring, at most 63 bytes, optionalThe label of its address here, if not its handle's first label.

Output

didstring (did)
handlestring (handle)Its handle once moved: its own domain if it has one that still names it, otherwise its address.
addressstringIts address here: one label under this host's handle domain.
displayNamestring
recordsintegerRecords copied.
blobsintegerFiles copied.
recommendedCredsunknownrotationKeys, alsoKnownAs, verificationMethods and services, as com.atproto.identity.getRecommendedDidCredentials answers: what the account's server signs into its PLC operation (com.atproto.identity.signPlcOperation).
spacesspacesBrought, optional

Errors

NotFound, UpstreamFailure, SignInAgain

org.atgrp.internal.startAccountMove.json

POST org.atgrp.internal.finishAccountMove

finishes it with the code the account’s server emailed (NotStarted)

Lexicon

Finish moving the account the caller signed in to move: with the code its server emailed, the host has its server sign the operation that gives its identity to this host, then finishes as completeImport does, and gives its tokens back.

Input

codestring, at most 64 bytesThe code the account's server emailed.

Output

didstring (did)
handlestring (handle)
addressstringIts address here: one label under this host's handle domain.
metastring
membersstring

Errors

NotFound, NotStarted, UpstreamFailure, SignInAgain

org.atgrp.internal.finishAccountMove.json

POST org.atgrp.internal.cancelAccountMove

stops it

Lexicon

Stop moving the account the caller signed in to move: its tokens are given back to its server and forgotten here, and a copy of it not yet finished is discarded.

Errors

NotFound

org.atgrp.internal.cancelAccountMove.json

migratePrepare, migrateComplete and migrateActivate need group.configure in the group (Forbidden).

GET /console/login
GET /console/callback
POST /console/logout

sign in to the console as yourself (?handle=), sign up at SIGNUP_PDS (?create), and sign out. Signing in again keeps the earlier account beside the new one, up to 4 others, and signing out switches to the one used last. The session’s cookie lasts 30 days, and signing out ends every cookie signed before it for that account, in any browser. A sign-in comes back only to the browser that started it

POST /console/switch

switches to another account the browser is signed in to (did), and goes back to the page back, a path on the console (/ otherwise). It and logout answer 403 to a page at another Origin

GET /console/move/login
GET /console/move/callback

signs in to an account to move here

GET /console/client-metadata.json

the host’s metadata as the console’s OAuth client, a confidential web client’s as atproto’s profile has one; 500 where CONSOLE_URL cannot be one (not https at a public name)

GET org.atgrp.internal.getBrand

how the host shows itself, as its operator names it (config): its name, its logo, links to its operator’s home page, privacy policy, terms of service and support, the backgrounds of the page an app’s request is approved on, light and dark, its colors, and the console’s palette it’s in (palette), each only when set. Anyone may ask

Lexicon

How this host shows itself, as its operator names it: its name, its logo and the links to its operator's pages, each only when set. Anyone may ask. For the console to draw on every page.

Output

namestring, at most 400 bytes, optionalIts name (SERVICE_NAME); absent for the console's own.
logostring (uri), optionalIts logo (LOGO_URL), which the host serves at /img/host, as a page is to draw it; absent when it has none.
palettestring, at most 64 bytes, paper, slate, neutral, sage, mauve, optionalWhich of the console's palettes its pages are in (PALETTE): its paper, cards, lines and ink; absent for the console's own, paper.
linkslinks
backgroundsbackgrounds
colorscolors

org.atgrp.internal.getBrand.json

GET /img/host
GET /img/background-light
GET /img/background-dark

serve the host’s logo (LOGO_URL) and backgrounds (BACKGROUND_LIGHT_URL, BACKGROUND_DARK_URL), as /img/app serves an app’s logo: from a public address, only a PNG, JPEG, GIF or WebP image, of at most 256 KiB for the logo and 2 MiB for a background, kept for 10 minutes. Each answers 404 when the host has none, or when what it names is no such image

The host is the PDS of every group it hosts, and answers for their public repos as any PDS does:

GET com.atproto.server.describeServer

describes the host as a PDS: its DID, the domain it names its groups under, BLOB_UPLOAD_LIMIT, that no one signs up, and its privacy policy, terms of service (links) and email address (contact) where its operator sets them

GET com.atproto.repo.describeRepo
GET com.atproto.repo.getRecord
GET com.atproto.repo.listRecords

serve a group’s public repo

GET com.atproto.sync.getRepo
GET com.atproto.sync.getRecord
GET com.atproto.sync.getLatestCommit
GET com.atproto.sync.listRepos
GET com.atproto.sync.getBlob
GET com.atproto.sync.listBlobs

sync the repos. getRecord answers a CAR rooted at the repo’s signed commit, with the tree’s nodes proving the record, and the record when it is there; a record not there is proved absent the same way. A blob only a space holds isn’t served or listed. listRepos and listBlobs answer pages of up to 1000 (500 by default), as atproto’s lexicons have them

GET com.atproto.sync.subscribeRepos

the firehose, over a WebSocket

GET com.atproto.identity.resolveHandle

resolves a handle here to its DID. For a caller who’s signed in, it resolves any handle through HANDLE_RESOLVERS

GET /.well-known/did.json

the host’s own DID document when SERVICE_DID is a did:web, with its #atproto_pds and #atgrp services at PUBLIC_URL

GET /.well-known/atproto-did

the DID of the group whose address the request’s host names

GET /xrpc/_health

says the host is up, with its version and the commit its image was built from (null in a build of a checkout)

A switched-off group’s public repo answers RepoDeactivated, and listRepos shows it as active: false.

The OAuth routes, the /mcp routes, and the methods an app calls with a token (the writes, the sessions, provisionGroup, getGroupAuth) answer any origin. So do the methods a space is read by. Those are its authority’s authorizeSpaceSync and listWriters, and the reads of a repo in it (getRepo, listRepoOps and the rest), which an app’s page makes. The rest are for the console, at its own origin.