# Atmosphere Groups > Atmosphere Groups gives a group a home of its own on the Atmosphere, so it keeps its name, members and roles in every app that supports the standard. An open spec for groups on atproto. A group is an account (a DID) with a set of permissioned spaces under it: its own identity, members, roles and rules, the same in every app that supports the standard. The standard's lexicons are `org.atgrp.*`, as the spec names them and as they're published on the network. The reference host (https://opensocial.fyi) publishes its own versions as `fyi.opensocial.*`, which differ in places, along with extensions of its own. Check which names a host serves before you call it: method NSIDs, space types, record `$type`s and OAuth scopes. What to read before building with Atmosphere Groups, and what an AI agent helping someone should do first: https://www.atmospheregroups.org/build/ The spec follows, as written. It is kept at https://tangled.org/atmospheregroups.org/spec. ## The pages as Markdown Every page on the site has a copy in Markdown at its address with `index.md` after it, and names it in its head as an alternate of type `text/markdown`. - [The landing page](https://www.atmospheregroups.org/index.md) - [Start building](https://www.atmospheregroups.org/build/index.md): what to read first, and the prompt for an agent - [The spec](https://www.atmospheregroups.org/spec/index.md) - [The spec's lexicons](https://www.atmospheregroups.org/spec/lexicons/index.md), and one for each of them, as https://www.atmospheregroups.org/spec/lexicons/org-atgrp-space/index.md - [Published lexicons](https://www.atmospheregroups.org/reference/lexicons/index.md), and one for each of them - [Projects](https://www.atmospheregroups.org/projects/index.md) ## The spec https://www.atmospheregroups.org/spec/ From https://tangled.org/atmospheregroups.org/spec at commit 0885261. > **Status: beta.** The spec may still change. We'll try to avoid backwards-incompatible changes but don't promise to; any such change is at the discretion of the working group and implementers. Atmosphere Groups also builds on [atproto spaces](https://github.com/bluesky-social/proposals/tree/main/0016-permissioned-data), which is also in beta. Atmosphere Groups is a specification for groups that share the same identity, presence, and data across multiple applications and modalities. Groups may also have a web presence of their own. Because an Atmosphere group spans applications, those applications need a shared understanding of what a group is and how to interact with it. Atmosphere Groups provides that interface as a suite of lexicons, under the `org.atgrp` namespace, describing space types, record types, and methods. The spec builds on [atproto spaces](https://github.com/bluesky-social/proposals/tree/main/0016-permissioned-data). The underlying protocol deliberately does not define application semantics. This spec adds the concepts needed to model groups, including membership, roles, group presence, and moderation. The spec focuses on three areas: - roles and access - presence and discoverability - moderation ### 1 Design Posture The standard defines the **interface between the group and the application**. In the same way that the atproto spaces protocol avoids describing application semantics, the group standard should avoid describing both group governance and application semantics. This is not to underrate their importance; if anything, it is to acknowledge just how important they are. By not standardizing them, we leave the freedom of implementation up to group stewards. The standard should be as **minimal as possible**. Standards like this are hard to change. By making this as minimal as possible (but no more minimal), we give the best chance for experimentation, growth, and applicability across many different groups. The standard should **target the 90% case.** Every group is different, and some have bespoke or idiosyncratic needs. Reflecting all of those needs in the standard will increase complexity for all implementers. Instead, we target the 90% case. *Most* groups should be able to be modeled directly on Atmosphere Groups. If a group needs something more complicated, it can still do whatever it wants, and then project its backend state onto the group standard. ### 2 The model This document specifies the Atmosphere Groups model. An **atmosphere group** is a network identity (DID) with a bunch of permissioned spaces under it. There is a one-to-one mapping between groups and DIDs. Atmosphere Groups is a set of **lexicons**, under the `org.atgrp` namespace, describing **space types, record types, and methods** for modeling and interacting with atmosphere groups. Groups run on **group hosts** that implement this spec. Groups should be able to migrate from one group host to another without disrupting how members interact with the group. Atmosphere Groups defines its own [space policy](https://github.com/bluesky-social/proposals/tree/main/0016-permissioned-data#space-policy), `org.atgrp.policy`, as a *peer* of the [baseline policies](https://github.com/bluesky-social/proposals/tree/main/0016-permissioned-data#baseline-policies) that PDSes are required to support. Group hosts implement the policy. It is not expected to operate on most PDSes and does not layer on top of the baseline policies. ### 3 Group hosts A **group host** functions like a PDS for group accounts. Just as a person's PDS hosts their account and data, a group host manages the group's network identity, hosts and signs its public repository and space repositories, and acts as the space host for the group's spaces. It adds the group-specific functionality needed to manage a collectively controlled account. It understands the Atmosphere Groups records and methods, enforces space access policies, and checks roles when authorizing group-account permissions. It is both the authorization service and the repo host for records authored by the group. Members continue to publish their own records to their own PDSes, including records in the group's spaces. Members' repositories *are not* stored on the group host. The group host serves as the OAuth authorization server for the group account. Users authenticate to it using their personal atproto accounts, and the host determines which group-account permissions they may authorize from their roles. This is described in the [OAuth flow](https://www.atmospheregroups.org/spec/#writing-as-the-group-account) below. A user's account may be on a different PDS, and that PDS only needs to support the standard atproto OAuth flow for authenticating them. ### 4 Group configuration spaces Every group has at least two spaces: * a `meta` space (`org.atgrp.meta/self`) which includes metadata about the group that is often shared publicly rather than just with members. This includes basic information for presenting the group and its settings. This space has to do with “overall group presence and discoverability.” * a `members` space (`org.atgrp.members/self`) which includes members-only information about the group. This includes membership and administrative information, and an index of available modality spaces. This space has to do with “roles and access.” The Atmosphere Groups spaces are largely intended for records *about* the group. Apps may publish modality-specific info about the group in `meta`, but other modality- or app-specific data is not published to these spaces. Rather, a group hosts an additional space for each application or modality. If a group wants to enable event applications, it might create a `community.lexicon.calendar.events` space. All `community.lexicon.*` records will then be published into this modality-specific space rather than into a universal “group” space. A group creates a space with `com.atproto.space.createSpace`, passing the space's [policy](https://www.atmospheregroups.org/spec/#roles--access) (`org.atgrp.policy`), and deletes one with `com.atproto.space.deleteSpace`. The `meta` and `members` spaces cannot be deleted. The `members` space indexes the group's modality spaces with a `space` record per space. The host maintains the index, adding an entry when a space is created and removing it when the space is deleted, and rejects direct writes to it. The index is a discovery aid, not an exhaustive list. A group may leave a space out by setting `unlisted` in its policy, for instance so that members cannot learn an admin-only space exists. The `meta` and `members` spaces always exist and are never indexed, so `unlisted` does not apply to them. ### 5 Roles & Access Authorization and access is modeled as flat Role-Based Access Control (RBAC). The group defines multiple **roles** and assigns one or more roles to each member. Each role can be configured to grant specific access to the group's spaces and a set of OAuth permissions on the overall group account. There are no deny rules or caveats. So authorization composes simply by **unioning all access and permissions granted by a member's roles.** There is no precedence, hierarchy, or evaluation order. Membership is defined **bidirectionally**. The group creates a `membership` record in the `members` space and the member in turn creates a `confirmation` record in the same space. Roles are granted in the `membership` record. The group account itself is implicitly a member with all group permissions. It does not need its own `membership` or `confirmation` records or assigned roles. To leave, a member calls `leaveGroup`, which deletes their `membership`. They should also delete their `confirmation`. Apps ignore a `confirmation` without a matching `membership`. Permissions cannot express which roles a user may grant, revoke, or eject, so each role definition also has a `canAssign` list. When a user writes a membership, every role added or removed, and every current role of a member being removed, must be in the union of `canAssign` across their roles. A `canAssign` entry of `*` covers every role, including roles created later. Each role is keyed by its ID. Role IDs follow label value syntax (lowercase letters and `-`) and are at least 3 characters, since apps may display them. As a convention, groups should have an `admin` role and a `member` role, which hosts [create by default](https://www.atmospheregroups.org/spec/#creating-a-group). This is not strictly required, and a group can change or delete either role, but apps may rely on them as a baseline. For example, an app creating a space may simply grant access to the `member` role. Roles may also imply modality-specific access not represented as permissions. Beyond `admin` and `member`, groups may develop other role conventions, such as `moderator`, that apps choose to special-case with UI affordances or badges. Other roles may be treated as flair or metadata. Apps and groups are free to adopt or ignore these conventions. Grants live in two places: - Each space in the group (both modality-specific spaces and Atmosphere Groups spaces) has an `org.atgrp.policy` space policy. For each role, it grants `read` and `write` access for members acting as themselves, and permissions for acting as the group in that space. Grants apply only to that space. The policy can also make the space public or leave it out of the space index. The group changes it with `com.atproto.space.updateSpace`, and the host always publishes it in the space as a `com.atproto.space.policy` record so members can read it. - Each `role` record in the `members` space grants its role permissions that are not tied to one existing space: `manage=create`, `rpc:` permissions for the group methods, and grants across all spaces, such as `space:*` for writing labels. It also holds the role's `canAssign` list. A member whose roles grant `read` on a space may obtain space credentials for it. Only members whose roles grant `write` may be included in its [writer set](https://github.com/bluesky-social/proposals/tree/main/0016-permissioned-data#the-sync-boundary-writer-set), so only their records sync to readers. Making a space public does not let non-members' records in. When a member loses `write` on a space, through a role change, ejection, or leaving, the host removes them from its writer set. Apps determine what access a member has by reading their `membership`, the grants on their role records and in each space's policy, and each role's `canAssign` list. The Atmosphere Groups lexicons include [permission sets](https://www.atmospheregroups.org/spec/#permission-sets) for common grants, which roles and applications can use instead of listing individual permissions. Any member who can write role records or update a space's policy can grant any access or permission, so these are considered admin-level permissions. What members' own records mean is an **app feature**: who can pin a thread, post to an announcements channel, create an event, etc. Each of these is declared in the modality’s **own lexicon** within the relevant space, and may use the group-defined roles. ### 6 Writing as the Group Account The group account authors the group's info, rules, roles, memberships, invites, and labels, and sets each space's policy. It can also author modality-specific records. For example, pinning a post at the top of a forum may require the group account to create a `pin` record in the forum space. Applications create, update, and delete these records through `com.atproto.space.*`, using an OAuth session for the group account. The host checks that each write follows the semantics for that record type and that the session permits it. Authorization uses a two-sided OAuth flow: 1. The application starts an atproto OAuth flow for the group account, requesting the permissions it needs. 2. The group host authenticates the user by acting as an OAuth client to their personal PDS in a second flow (requiring only authentication). 3. The group host checks the user's roles and presents consent for the permissions those roles allow. 4. On approval, the application receives an OAuth session for the group account. ```text Application Group host User's PDS | | | |--- OAuth for group account --->| | | |--- OAuth for user account ---->| | | (authentication only) | | | User signs in | |<-- Personal OAuth session -----| | | | | Check roles + user consent | | | | |<-- Group OAuth session --------| | | | | ``` Applications can use these sessions in two ways: - **Per-user sessions.** Each user authorizes a session for their own actions, using the permissions allowed by their roles. This suits personal tools and independent clients. - **Shared application sessions.** An admin authorizes a session that the application uses on behalf of multiple members. This avoids a separate group authorization flow for each member when many members use the same trusted application. The application is responsible for checking each member's permissions before using the group session on their behalf. The group host must track which user authorized each session. Some permissions depend on the record being written, and permissions cannot express these limits. For example, `canAssign` limits which roles a user can grant or revoke and which members they can eject. On every write, whether through CRUD or a method, the host checks them using the current roles of the user who authorized the session. For shared sessions, this is the authorizing admin. The same check keeps users from granting themselves more than they hold. In a role write or a policy update, the user may change grants only for roles in their `canAssign` union. Any permission they add must already be covered by their own permissions, after expanding permission sets. Any `read` or `write` access they grant on a space must already be theirs on that space. Any role they add to a `canAssign` list must already be in their own `canAssign` union, and only a user whose union includes `*` may add `*`. Without this, anyone who can write roles or update a policy could grant their own role every permission and role in the group. A session's permissions are likewise limited on every request to what its authorizing user's current roles grant. If that user loses roles or membership, the session narrows accordingly. A user can authorize a permission only if their roles grant it. Methods for personal actions, such as joining, leaving, or reporting, use service auth from the person's own account instead of a group account session. ### 7 Creating a group An application creates a group by starting the [OAuth flow](https://www.atmospheregroups.org/spec/#writing-as-the-group-account) at the group host with `prompt=create`. The host authenticates the creator through their PDS, creates the group account, and returns a group account session. This is how an application may allow a user to sign up for an account on a PDS. Each group host decides who may create groups and under which circumstances. For example, a group host may have a relationship with a particular app or require invite codes. A new group starts with: - a DID and handle - the `meta` and `members` spaces, each with a policy - `about` and `config` records - a `role` that grants every permission and can assign every role (`*`), and a `membership` giving it to the creator Hosts should give the creator's role the ID `admin`. They should also create a `member` role, marked `default`, that can read the `meta` and `members` spaces and write to `members`. A host should not let a group lose its last admin. Without an admin, regaining control of the group depends on whatever recovery the host offers outside this specification. ### 8 Presence & Discoverability Each group has an `about` record that it publishes in its `meta` space. This includes some basic metadata about the group such as a display name and a profile picture. The `meta` space also holds a `config` record with the group's join policy. Any app that wants to show or interact with atmosphere groups will use these records when displaying the group. Many groups will wish to make their `meta` space public, even if the rest of the group is private. Even in those cases, the data is still published in a **space**; the space is just permissioned to allow public reads. Groups that wish to be easily discoverable may also publish a `declaration` record to the public broadcast protocol. This record is empty. It simply declares the account as a group, whose `meta` space is always at `org.atgrp.meta/self`. ### 9 Moderation Each group is also a **moderation service** with moderation authority over all content in the group. Moderation happens in the normal atproto way: reports come in one side, labels come out the other side. In some cases, certain group-specific actions such as ejection from the group may need to occur. Reports are sent through `org.atgrp.mod.submitReport`. Labels are `com.atproto.label.record` records that the group account writes in its own repo, in the same space as their subject. A label may reference an account or any record in that space, by any author, but not content in another space, so exactly those who can read the subject can read its labels. Labels on accounts are published in the `members` space. Deleting a label record negates it. Following the spaces convention, a `!takedown` label removes content from the space. The host keeps a moderation history of label writes and member ejections. The group defines its own label values in a `labeler` record in the `members` space. It declares the label values and their definitions, plus the report reasons and subject types the group accepts. On top of this, a simple moderation information architecture is specified. In this system, a reported subject is either **open** or **resolved**. Moderators can also tag subjects and filter the queue by tag, for example `escalated` for subjects that need another moderator. Moderators may see limited information and take limited action on reports. The goal of this system is to support in-app moderation use cases. Accounts can appeal a label or ejection on themselves or their records with `mod.submitAppeal`, which reopens the subject, and see their own moderation history with `mod.querySelfHistory`. Both work for former members. Groups at scale may support significantly more complex moderation systems. However, this will likely require bespoke group moderation software and wouldn’t be done through in-app flows. Like any account, the group account itself remains subject to labels and takedowns from the wider network. ### 10 Invites An invite is an interesting case because it must reach someone who isn’t yet a member and therefore does not necessarily have access to the group’s spaces. Invites usually should not be broadcast publicly. Instead, each user who is interested in receiving invites to groups hosts an `inbox` space under their own account, and a group writes an `invite` record into that space. The user's app creates the space with the baseline `com.atproto.memberspace.policy`, with `publicWrite` set and no members, so any group may write an invite but only the user can read the space. When a group writes an invite, its host notifies the user's PDS with `com.atproto.space.notifyRepoUpdate`, and the PDS forwards that to apps registered for the space with `com.atproto.space.notifySpaceUpdate`. Those apps can then read and present the invite to the user. Only the user (and authorized applications) may read the space. In other words, the inviting group writes the record but can’t read other invites in the space. The group writes and deletes invite records in its own repo through the standard CRUD methods. Deleting an invite revokes it. ### 11 Migration A group migrates to a new host through the standard account migration flow, including the migration of its space repos and space policies. A group can only migrate to a host that implements `org.atgrp.policy`. Everything the group stores in repos, including labels, moves with it. Private host state does not migrate. This includes join requests, the moderation queue and history, and OAuth sessions, which users authorize again on the new host. A host may offer an export of its moderation history, but this spec does not define one. ### 12 Group governance Atmosphere Groups is intended to standardize the interface between applications and groups. Therefore, group governance is generally considered out of scope. A group may implement arbitrarily complex governance, including things like voting and holding periods for certain actions. This is all considered out of scope for the group standard. ### 13 Spaces, records, and methods: at a glance #### 13.1 Space types | Space type | skey | Purpose | | ----- | ----- | ----- | | `org.atgrp.meta` | `self` | The group's public face. Basic information and settings. Often readable by anyone, though may be private to members. | | `org.atgrp.members` | `self` | Membership and administrative information, and the space index. Usually gated to members. | | `org.atgrp.inbox` | `self` | Hosted by each **user**, not by groups. Where invites arrive. | | *(modality spaces)* | any | `com.example.atmoboards.forum`, `app.bsky.group`, etc. Not specified here. | #### 13.2 Record types | Record | Space | Author | Key | Purpose | | ----- | ----- | ----- | ----- | ----- | | `org.atgrp.declaration` | *public repo* | authority | `self` | Marks an account as a group. Discovery only. | | `org.atgrp.about` | meta | authority | `self` | Basic information for presenting the group. | | `org.atgrp.config` | meta | authority | `self` | Group settings, such as the join policy. | | `org.atgrp.rule` | members | authority | tid | One group rule with a stable URI a mod action can cite. | | `org.atgrp.labeler` | members | authority | `self` | The group's label value definitions and accepted report reasons. | | `org.atgrp.space` | members | authority | tid | Lists one space in the group's index. Maintained by the host. | | `org.atgrp.role` | members | authority | role id | Declares a role, its group-wide permissions, and its `canAssign` list. | | `org.atgrp.membership` | members | authority | member DID | Grants a member their roles. | | `org.atgrp.confirmation` | members | **member** | `self` | The member's side of membership. Gates whether the member appears in the roster, not access. | | `com.atproto.space.policy` | any space | authority | `self` | Published copy of the space's `org.atgrp.policy`: each role's access and permissions in this space, and whether it is public or unlisted. | | `com.atproto.label.record` | any space | authority | tid | A moderation label written into the space its subject lives in. | | `org.atgrp.invite` | inbox | inviting group | tid | An invitation delivered into the invitee's own space. | #### 13.3 Permission sets Atmosphere Groups publishes these permission sets for group account sessions: profile, members, moderation, and admin, which includes the other three. Each covers reading and writing records in the group's own `meta` and `members` spaces, or writing invites into invitees' `inbox` spaces, plus the related methods. A set is an upper bound. A session gets only the parts the authorizing user's roles grant. | Set | Writes | Calls | | ----- | ----- | ----- | | `org.atgrp.authManageBasic` | `about` in `meta`; `rule` in `members` | — | | `org.atgrp.authManageMembers` | `membership` in `members`; `invite` in invitees' `inbox` spaces | `listJoinRequests`, `denyJoinRequest` | | `org.atgrp.authModerate` | labels in `meta` and `members`; deleting `membership` (ejection) | `mod.querySubjects`, `mod.querySubjectHistory`, `mod.updateSubject` | | `org.atgrp.authManageAdmin` | everything above, plus `config` in `meta`; `labeler` and `role` in `members`; the `meta` and `members` policies | everything above | A permission set must name a specific space type, so grants that span the group's modality spaces are listed as individual permissions. | Grant | Permission | | ----- | ----- | | Write labels in any group space | `space:*?collection=com.atproto.label.record` | | Update any group space's policy | `space:*?manage=update` | | Create and delete spaces | `space:*?manage=create&manage=delete` | #### 13.4 Methods Methods handle data stored privately by the host and actions users take as themselves (not as the group). | Method | Auth | Requires | Purpose | | ----- | ----- | ----- | ----- | | `listJoinRequests` | group account session | `rpc:` permission | Lists pending join requests, which the host stores privately. Writing a requester's membership approves their request. | | `denyJoinRequest` | group account session | `rpc:` permission | Denies a pending join request. | | `mod.querySubjects` | group account session | `rpc:` permission | Lists the moderation queue, which the host stores privately. | | `mod.querySubjectHistory` | group account session | `rpc:` permission | Returns a subject's moderation history, which the host stores privately. | | `mod.updateSubject` | group account session | `rpc:` permission | Reopens or resolves a subject, or changes its tags, in the host's private moderation records, optionally with a note. | | `requestJoin` | member service auth | — | Creates a private request or redeems an invite for a non-member. | | `cancelJoinRequest` | member service auth | — | Withdraws a private join request. | | `leaveGroup` | member service auth | — | Deletes the caller's membership record, which is authored by the group. | | `mod.submitReport` | member service auth | access to the subject's space | Opens or reopens a subject in the host's private moderation records. | | `mod.submitAppeal` | service auth | subject is the caller or their record | Appeals a label or ejection, reopening the subject. | | `mod.querySelfHistory` | service auth | — | Returns the caller's own moderation history, without reports, notes, tags, or who acted. | ### 14 Governance This spec was developed by the ecosystem through an informal working group organized on the [Atmosphere Community forum](https://discourse.atmosphere.community/c/wg/community-standards-wg/46). The domains (`atmospheregroups.org` and `atgrp.org`) are owned and operated by the [Atmosphere Co-op](https://atmosphere.coop/). This repository and the repository that holds the published Lexicons are currently operated by [Bluesky PBC](https://bsky.social/). The plan is to fully move governance of the specification to an [Atmosphere Co-op Circle](https://atmosphere.coop/updates/bootstrapping-self-governance). ### 15 License The spec text (this README and [spec.md](https://www.atmospheregroups.org/spec/#the-model)) is licensed under [CC BY 4.0](https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/LICENSE-CC-BY-4.0.txt). The Lexicon schemas, examples, and scripts are licensed under [MIT](https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/LICENSE-MIT.txt). See [LICENSE.txt](https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/LICENSE.txt) for details. ## Lexicon schemas Every schema the reference pages are made from, exactly as published: the standard's under `org.atgrp.*`, the reference host's under `fyi.opensocial.*`, and the other namespaces they refer to. ### com.atproto.admin.defs https://www.atmospheregroups.org/reference/lexicons/com-atproto-admin-defs/ ```json { "id": "com.atproto.admin.defs", "defs": { "repoRef": { "type": "object", "required": [ "did" ], "properties": { "did": { "type": "string", "format": "did" } } }, "statusAttr": { "type": "object", "required": [ "applied" ], "properties": { "ref": { "type": "string" }, "applied": { "type": "boolean" } } }, "accountView": { "type": "object", "required": [ "did", "handle", "indexedAt" ], "properties": { "did": { "type": "string", "format": "did" }, "email": { "type": "string" }, "handle": { "type": "string", "format": "handle" }, "invites": { "type": "array", "items": { "ref": "com.atproto.server.defs#inviteCode", "type": "ref" } }, "indexedAt": { "type": "string", "format": "datetime" }, "invitedBy": { "ref": "com.atproto.server.defs#inviteCode", "type": "ref" }, "inviteNote": { "type": "string" }, "deactivatedAt": { "type": "string", "format": "datetime" }, "relatedRecords": { "type": "array", "items": { "type": "unknown" } }, "invitesDisabled": { "type": "boolean" }, "emailConfirmedAt": { "type": "string", "format": "datetime" }, "threatSignatures": { "type": "array", "items": { "ref": "#threatSignature", "type": "ref" } } } }, "repoBlobRef": { "type": "object", "required": [ "did", "cid" ], "properties": { "cid": { "type": "string", "format": "cid" }, "did": { "type": "string", "format": "did" }, "recordUri": { "type": "string", "format": "at-uri" } } }, "threatSignature": { "type": "object", "required": [ "property", "value" ], "properties": { "value": { "type": "string" }, "property": { "type": "string" } } } }, "lexicon": 1 } ``` ### com.atproto.label.defs https://www.atmospheregroups.org/reference/lexicons/com-atproto-label-defs/ ```json { "id": "com.atproto.label.defs", "defs": { "label": { "type": "object", "required": [ "src", "uri", "val", "cts" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to." }, "cts": { "type": "string", "format": "datetime", "description": "Timestamp when this label was created." }, "exp": { "type": "string", "format": "datetime", "description": "Timestamp at which this label expires (no longer applies)." }, "neg": { "type": "boolean", "description": "If true, this is a negation label, overwriting a previous label." }, "sig": { "type": "bytes", "description": "Signature of dag-cbor encoded label." }, "src": { "type": "string", "format": "did", "description": "DID of the actor who created this label." }, "uri": { "type": "string", "format": "uri", "description": "AT URI of the record, repository (account), or other resource that this label applies to." }, "val": { "type": "string", "maxLength": 128, "description": "The short string name of the value or type of this label." }, "ver": { "type": "integer", "description": "The AT Protocol version of the label object." } }, "description": "Metadata tag on an atproto resource (eg, repo or record)." }, "selfLabel": { "type": "object", "required": [ "val" ], "properties": { "val": { "type": "string", "maxLength": 128, "description": "The short string name of the value or type of this label." } }, "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel." }, "labelValue": { "type": "string", "knownValues": [ "!hide", "!warn", "!no-unauthenticated", "porn", "sexual", "nudity", "graphic-media", "bot" ] }, "selfLabels": { "type": "object", "required": [ "values" ], "properties": { "values": { "type": "array", "items": { "ref": "#selfLabel", "type": "ref" }, "maxLength": 10 } }, "description": "Metadata tags on an atproto record, published by the author within the record." }, "labelValueDefinition": { "type": "object", "required": [ "identifier", "severity", "blurs", "locales" ], "properties": { "blurs": { "type": "string", "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", "knownValues": [ "content", "media", "none" ] }, "locales": { "type": "array", "items": { "ref": "#labelValueDefinitionStrings", "type": "ref" } }, "severity": { "type": "string", "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", "knownValues": [ "inform", "alert", "none" ] }, "adultOnly": { "type": "boolean", "description": "Does the user need to have adult content enabled in order to configure this label?" }, "identifier": { "type": "string", "maxLength": 100, "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", "maxGraphemes": 100 }, "defaultSetting": { "type": "string", "default": "warn", "description": "The default setting for this label.", "knownValues": [ "ignore", "warn", "hide" ] } }, "description": "Declares a label value and its expected interpretations and behaviors." }, "labelValueDefinitionStrings": { "type": "object", "required": [ "lang", "name", "description" ], "properties": { "lang": { "type": "string", "format": "language", "description": "The code of the language these strings are written in." }, "name": { "type": "string", "maxLength": 640, "description": "A short human-readable name for the label.", "maxGraphemes": 64 }, "description": { "type": "string", "maxLength": 100000, "description": "A longer description of what the label means and why it might be applied.", "maxGraphemes": 10000 } }, "description": "Strings which describe the label in the UI, localized into a specific language." } }, "lexicon": 1 } ``` ### com.atproto.moderation.defs https://www.atmospheregroups.org/reference/lexicons/com-atproto-moderation-defs/ ```json { "id": "com.atproto.moderation.defs", "defs": { "reasonRude": { "type": "token", "description": "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`." }, "reasonSpam": { "type": "token", "description": "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`." }, "reasonType": { "type": "string", "knownValues": [ "com.atproto.moderation.defs#reasonSpam", "com.atproto.moderation.defs#reasonViolation", "com.atproto.moderation.defs#reasonMisleading", "com.atproto.moderation.defs#reasonSexual", "com.atproto.moderation.defs#reasonRude", "com.atproto.moderation.defs#reasonOther", "com.atproto.moderation.defs#reasonAppeal", "tools.ozone.report.defs#reasonAppeal", "tools.ozone.report.defs#reasonOther", "tools.ozone.report.defs#reasonViolenceAnimal", "tools.ozone.report.defs#reasonViolenceThreats", "tools.ozone.report.defs#reasonViolenceGraphicContent", "tools.ozone.report.defs#reasonViolenceGlorification", "tools.ozone.report.defs#reasonViolenceExtremistContent", "tools.ozone.report.defs#reasonViolenceTrafficking", "tools.ozone.report.defs#reasonViolenceOther", "tools.ozone.report.defs#reasonSexualAbuseContent", "tools.ozone.report.defs#reasonSexualNCII", "tools.ozone.report.defs#reasonSexualDeepfake", "tools.ozone.report.defs#reasonSexualAnimal", "tools.ozone.report.defs#reasonSexualUnlabeled", "tools.ozone.report.defs#reasonSexualOther", "tools.ozone.report.defs#reasonChildSafetyCSAM", "tools.ozone.report.defs#reasonChildSafetyGroom", "tools.ozone.report.defs#reasonChildSafetyPrivacy", "tools.ozone.report.defs#reasonChildSafetyHarassment", "tools.ozone.report.defs#reasonChildSafetyOther", "tools.ozone.report.defs#reasonHarassmentTroll", "tools.ozone.report.defs#reasonHarassmentTargeted", "tools.ozone.report.defs#reasonHarassmentHateSpeech", "tools.ozone.report.defs#reasonHarassmentDoxxing", "tools.ozone.report.defs#reasonHarassmentOther", "tools.ozone.report.defs#reasonMisleadingBot", "tools.ozone.report.defs#reasonMisleadingImpersonation", "tools.ozone.report.defs#reasonMisleadingSpam", "tools.ozone.report.defs#reasonMisleadingScam", "tools.ozone.report.defs#reasonMisleadingElections", "tools.ozone.report.defs#reasonMisleadingOther", "tools.ozone.report.defs#reasonRuleSiteSecurity", "tools.ozone.report.defs#reasonRuleProhibitedSales", "tools.ozone.report.defs#reasonRuleBanEvasion", "tools.ozone.report.defs#reasonRuleOther", "tools.ozone.report.defs#reasonSelfHarmContent", "tools.ozone.report.defs#reasonSelfHarmED", "tools.ozone.report.defs#reasonSelfHarmStunts", "tools.ozone.report.defs#reasonSelfHarmSubstances", "tools.ozone.report.defs#reasonSelfHarmOther" ] }, "reasonOther": { "type": "token", "description": "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`." }, "subjectType": { "type": "string", "description": "Tag describing a type of subject that might be reported.", "knownValues": [ "account", "record", "chat" ] }, "reasonAppeal": { "type": "token", "description": "Appeal a previously taken moderation action" }, "reasonSexual": { "type": "token", "description": "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`." }, "reasonViolation": { "type": "token", "description": "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`." }, "reasonMisleading": { "type": "token", "description": "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`." } }, "lexicon": 1 } ``` ### com.atproto.repo.strongRef https://www.atmospheregroups.org/reference/lexicons/com-atproto-repo-strongRef/ ```json { "id": "com.atproto.repo.strongRef", "defs": { "main": { "type": "object", "required": [ "uri", "cid" ], "properties": { "cid": { "type": "string", "format": "cid" }, "uri": { "type": "string", "format": "at-uri" } } } }, "lexicon": 1, "description": "A URI with a content-hash fingerprint." } ``` ### com.atproto.server.defs https://www.atmospheregroups.org/reference/lexicons/com-atproto-server-defs/ ```json { "id": "com.atproto.server.defs", "defs": { "inviteCode": { "type": "object", "required": [ "code", "available", "disabled", "forAccount", "createdBy", "createdAt", "uses" ], "properties": { "code": { "type": "string" }, "uses": { "type": "array", "items": { "ref": "#inviteCodeUse", "type": "ref" } }, "disabled": { "type": "boolean" }, "available": { "type": "integer" }, "createdAt": { "type": "string", "format": "datetime" }, "createdBy": { "type": "string" }, "forAccount": { "type": "string" } } }, "inviteCodeUse": { "type": "object", "required": [ "usedBy", "usedAt" ], "properties": { "usedAt": { "type": "string", "format": "datetime" }, "usedBy": { "type": "string", "format": "did" } } } }, "lexicon": 1 } ``` ### community.lexicon.location.address https://www.atmospheregroups.org/reference/lexicons/community-lexicon-location-address/ ```json { "id": "community.lexicon.location.address", "defs": { "main": { "type": "object", "required": [ "country" ], "properties": { "name": { "type": "string", "description": "The name of the location." }, "region": { "type": "string", "description": "The administrative region of the country. For example, a state in the USA." }, "street": { "type": "string", "description": "The street address." }, "country": { "type": "string", "maxLength": 10, "minLength": 2, "description": "The ISO 3166 country code. Preferably the 2-letter code." }, "locality": { "type": "string", "description": "The locality of the region. For example, a city in the USA." }, "postalCode": { "type": "string", "description": "The postal code of the location." } }, "description": "A physical location in the form of a street address." } }, "lexicon": 1 } ``` ### community.lexicon.location.fsq https://www.atmospheregroups.org/reference/lexicons/community-lexicon-location-fsq/ ```json { "id": "community.lexicon.location.fsq", "defs": { "main": { "type": "object", "required": [ "fsq_place_id" ], "properties": { "name": { "type": "string", "description": "The name of the location." }, "latitude": { "type": "string" }, "longitude": { "type": "string" }, "fsq_place_id": { "type": "string", "description": "The unique identifier of a Foursquare POI." } }, "description": "A physical location contained in the Foursquare Open Source Places dataset." } }, "lexicon": 1 } ``` ### community.lexicon.location.geo https://www.atmospheregroups.org/reference/lexicons/community-lexicon-location-geo/ ```json { "id": "community.lexicon.location.geo", "defs": { "main": { "type": "object", "required": [ "latitude", "longitude" ], "properties": { "name": { "type": "string", "description": "The name of the location." }, "altitude": { "type": "string" }, "latitude": { "type": "string" }, "longitude": { "type": "string" } }, "description": "A physical location in the form of a WGS84 coordinate." } }, "lexicon": 1 } ``` ### community.lexicon.location.hthree https://www.atmospheregroups.org/reference/lexicons/community-lexicon-location-hthree/ ```json { "id": "community.lexicon.location.hthree", "defs": { "main": { "type": "object", "required": [ "value" ], "properties": { "name": { "type": "string", "description": "The name of the location." }, "value": { "type": "string", "description": "The h3 encoded location." } }, "description": "A physical location in the form of a H3 encoded location." } }, "lexicon": 1 } ``` ### fyi.opensocial.acceptance https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-acceptance/ ```json { "defs": { "main": { "description": "The member's side of membership, written by the member into the members space. Gates appearing in the roster, not access.", "key": "literal:self", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" } }, "required": [ "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.acceptance", "lexicon": 1 } ``` ### fyi.opensocial.access https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-access/ ```json { "defs": { "main": { "description": "Who can access this space, in every space under the group. Grants apply only to this space. Members whose roles grant read may obtain space credentials and write their own records here. The group authority issues space credentials according to this record and nothing else.", "key": "literal:self", "record": { "properties": { "grants": { "description": "At most one entry per role.", "items": { "ref": "fyi.opensocial.defs#spaceGrant", "type": "ref" }, "maxLength": 100, "type": "array" }, "people": { "description": "A space for chosen people: those who read it and write in it in their own name while they are members, beside the roles granted read, who read it.", "items": { "ref": "fyi.opensocial.defs#accountRef", "type": "ref" }, "maxLength": 100, "type": "array" }, "public": { "default": false, "description": "Anyone signed in can read, member or not.", "type": "boolean" }, "writableBy": { "description": "Who may write into the space in their own name, when not every member whose roles grant read: role ids, or 'public' for anyone signed in.", "items": { "ref": "fyi.opensocial.defs#audience", "type": "ref" }, "maxLength": 50, "type": "array" } }, "required": [ "grants" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.access", "lexicon": 1 } ``` ### fyi.opensocial.admitMember https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-admitMember/ ```json { "defs": { "main": { "description": "Approve a join request, giving the requester their roles. Requires admit. denyJoinRequest declines one.", "input": { "encoding": "application/json", "schema": { "properties": { "did": { "format": "did", "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "roles": { "description": "The roles to give. Omitted gives the group's default roles.", "items": { "maxLength": 64, "type": "string" }, "type": "array" } }, "required": [ "group", "did" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.admitMember", "lexicon": 1 } ``` ### fyi.opensocial.applyLabel https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-applyLabel/ ```json { "defs": { "main": { "description": "Write a label record into the subject's space. Requires label, or takedown for !hide and !takedown.", "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "rule": { "format": "at-uri", "type": "string" }, "subject": { "refs": [ "com.atproto.admin.defs#repoRef", "com.atproto.repo.strongRef" ], "type": "union" }, "val": { "maxLength": 128, "type": "string" } }, "required": [ "group", "subject", "val" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "description": "The label record written.", "properties": { "cid": { "format": "cid", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.applyLabel", "lexicon": 1 } ``` ### fyi.opensocial.assignRoles https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-assignRoles/ ```json { "defs": { "main": { "description": "Set a member's full role set. Requires role.assign; every role added or removed must be in the caller's assignable set.", "errors": [ { "name": "NotAssignable" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "member": { "format": "did", "type": "string" }, "roles": { "items": { "maxLength": 64, "type": "string" }, "type": "array" } }, "required": [ "group", "member", "roles" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.assignRoles", "lexicon": 1 } ``` ### fyi.opensocial.basePermissions https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-basePermissions/ ```json { "defs": { "main": { "detail": "See your groups and their sites, take part in them, act for groups where you hold a role, let apps sign in as them, share tabs from them with everyone as yourself, and like what others share", "permissions": [ { "action": [ "read" ], "authority": "*", "resource": "space", "skey": "self", "spaceType": "fyi.opensocial.meta", "type": "permission" }, { "action": [ "read", "create", "update", "delete" ], "authority": "*", "collection": [ "fyi.opensocial.acceptance" ], "resource": "space", "skey": "self", "spaceType": "fyi.opensocial.members", "type": "permission" }, { "action": [ "read", "create", "update", "delete" ], "authority": "*", "collection": [ "fyi.opensocial.invite" ], "manage": [ "create" ], "resource": "space", "skey": "self", "spaceType": "fyi.opensocial.inbox", "type": "permission" }, { "action": [ "create", "update" ], "collection": [ "fyi.opensocial.template" ], "resource": "repo", "type": "permission" }, { "action": [ "create" ], "collection": [ "fyi.opensocial.templateVersion" ], "resource": "repo", "type": "permission" }, { "action": [ "create", "delete" ], "collection": [ "fyi.opensocial.templateLike" ], "resource": "repo", "type": "permission" }, { "inheritAud": true, "lxm": [ "fyi.opensocial.createGroup", "fyi.opensocial.provisionGroup", "fyi.opensocial.createSpace", "fyi.opensocial.getSuggestedSite", "fyi.opensocial.assignRoles", "fyi.opensocial.ejectMember", "fyi.opensocial.listGroups", "fyi.opensocial.getGroup", "fyi.opensocial.getActor", "fyi.opensocial.getGroupAuth", "fyi.opensocial.createInvite", "fyi.opensocial.requestJoin", "fyi.opensocial.listInvites", "fyi.opensocial.revokeInvite", "fyi.opensocial.getAuthorization", "fyi.opensocial.approveAuthorization", "fyi.opensocial.declineAuthorization", "fyi.opensocial.listSiteRecords", "fyi.opensocial.getSite", "fyi.opensocial.getSiteRecord", "fyi.opensocial.refreshRecords", "fyi.opensocial.getSpaceBlob", "fyi.opensocial.getActorInvites", "fyi.opensocial.getUnread", "fyi.opensocial.listNotifications", "fyi.opensocial.updateNotificationsSeen", "fyi.opensocial.getNotificationPreferences", "fyi.opensocial.putNotificationPreferences", "fyi.opensocial.describePush", "fyi.opensocial.registerPush", "fyi.opensocial.unregisterPush", "fyi.opensocial.declineInvite", "fyi.opensocial.updateProfile", "fyi.opensocial.putRole", "fyi.opensocial.deleteRole", "fyi.opensocial.putRule", "fyi.opensocial.deleteRule", "fyi.opensocial.applyLabel", "fyi.opensocial.negateLabel", "fyi.opensocial.listSubjects", "fyi.opensocial.getSubjectHistory", "fyi.opensocial.resolveSubject", "fyi.opensocial.getJoinRequest", "fyi.opensocial.listJoinRequests", "fyi.opensocial.admitMember", "fyi.opensocial.denyJoinRequest", "fyi.opensocial.cancelJoinRequest", "fyi.opensocial.leaveGroup", "fyi.opensocial.updateSpace", "fyi.opensocial.deleteSpace", "fyi.opensocial.uploadImage", "fyi.opensocial.listGroupTokens", "fyi.opensocial.revokeGroupToken", "fyi.opensocial.createAppPassword", "fyi.opensocial.listAppPasswords", "fyi.opensocial.revokeAppPassword", "fyi.opensocial.migratePrepare", "fyi.opensocial.migrateComplete", "fyi.opensocial.checkImport", "fyi.opensocial.importAccount", "fyi.opensocial.importAccountSpace", "fyi.opensocial.completeImport", "fyi.opensocial.deactivateGroup", "fyi.opensocial.activateGroup", "fyi.opensocial.deleteGroup", "fyi.opensocial.listRecoveryKeys", "fyi.opensocial.addRecoveryKey", "fyi.opensocial.removeRecoveryKey", "fyi.opensocial.checkGroupHandle", "fyi.opensocial.updateGroupHandle", "fyi.opensocial.listSpaceRecords", "fyi.opensocial.putSite", "fyi.opensocial.subscribeSpaces", "fyi.opensocial.uploadSiteFile", "fyi.opensocial.getBlobFields", "fyi.opensocial.listPeopleChannels", "fyi.opensocial.putPeopleChannel", "fyi.opensocial.deletePeopleChannel", "fyi.opensocial.createPeopleSpace", "fyi.opensocial.offerTab", "fyi.opensocial.listTabOffers", "fyi.opensocial.withdrawTabOffer", "fyi.opensocial.decideTabOffer", "fyi.opensocial.listRemovedTabs", "fyi.opensocial.restoreTab", "fyi.opensocial.getTabWriters", "fyi.opensocial.listDrafts", "fyi.opensocial.deleteDraft", "fyi.opensocial.listConnectedApps", "fyi.opensocial.watchConversation", "fyi.opensocial.getActorGroups", "fyi.opensocial.getAssistantRequest", "fyi.opensocial.approveAssistantRequest", "fyi.opensocial.declineAssistantRequest", "fyi.opensocial.getPageDraft", "fyi.opensocial.previewMethod", "fyi.opensocial.previewPublicPage", "fyi.opensocial.getSiteDraft", "fyi.opensocial.previewSiteDraft", "fyi.opensocial.publishSiteDraft", "fyi.opensocial.discardSiteDraft", "fyi.opensocial.draftFrontPage", "fyi.opensocial.undoSitePublish", "fyi.opensocial.deletePageDraft", "fyi.opensocial.revokeAssistant", "fyi.opensocial.callTab", "fyi.opensocial.shareTab", "fyi.opensocial.listTemplates", "fyi.opensocial.getTemplate", "fyi.opensocial.undoTabUpdate", "fyi.opensocial.takeBackVersion", "fyi.opensocial.getTabBundle", "fyi.opensocial.listTabShares", "fyi.opensocial.getTemplateUse", "fyi.opensocial.updateTemplateListing" ], "resource": "rpc", "type": "permission" } ], "title": "Groups", "type": "permission-set" } }, "id": "fyi.opensocial.basePermissions", "lexicon": 1 } ``` ### fyi.opensocial.cancelJoinRequest https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-cancelJoinRequest/ ```json { "defs": { "main": { "description": "Withdraw a pending join request.", "errors": [ { "description": "No request from that account is waiting.", "name": "JoinRequestNotFound" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" } }, "required": [ "group" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": {}, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.cancelJoinRequest", "lexicon": 1 } ``` ### fyi.opensocial.configure https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-configure/ ```json { "defs": { "main": { "description": "For group-DID sessions.", "detail": "Edit the group's profile, rules, and roles, and decide what each role can do.", "permissions": [ { "action": [ "read", "create", "update", "delete" ], "authority": "self", "collection": [ "fyi.opensocial.profile", "fyi.opensocial.rule", "fyi.opensocial.labeler" ], "resource": "space", "skey": "self", "spaceType": "fyi.opensocial.meta", "type": "permission" }, { "action": [ "read", "create", "update", "delete" ], "authority": "self", "collection": [ "fyi.opensocial.role", "fyi.opensocial.permissions" ], "resource": "space", "skey": "self", "spaceType": "fyi.opensocial.members", "type": "permission" } ], "title": "Group settings", "type": "permission-set" } }, "id": "fyi.opensocial.configure", "lexicon": 1 } ``` ### fyi.opensocial.createInvite https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-createInvite/ ```json { "defs": { "main": { "description": "Write an invite into someone's own invites space. Requires invite.", "errors": [ { "name": "NoInvitesSpace" } ], "input": { "encoding": "application/json", "schema": { "properties": { "expiresAt": { "format": "datetime", "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "invitee": { "format": "did", "type": "string" }, "message": { "type": "string" } }, "required": [ "group", "invitee" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.createInvite", "lexicon": 1 } ``` ### fyi.opensocial.createSpace https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-createSpace/ ```json { "defs": { "main": { "description": "Create a space under the group with its access record and, unless index is false, an index entry. Requires space.create.", "errors": [ { "description": "A space with this type and skey already exists.", "name": "SpaceAlreadyExists" }, { "description": "The meta and members spaces can't be created or deleted.", "name": "ReservedSpace" }, { "description": "A grant names a role that doesn't exist.", "name": "UnknownRole" }, { "description": "A grant isn't a space scope.", "name": "InvalidScope" } ], "input": { "encoding": "application/json", "schema": { "properties": { "access": { "ref": "fyi.opensocial.defs#accessConfig", "type": "ref" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "index": { "default": true, "description": "Add the space to the group's index.", "type": "boolean" }, "name": { "description": "What the group calls it, kept in its index entry.", "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "skey": { "description": "Omit to generate a TID.", "format": "record-key", "type": "string" }, "type": { "format": "nsid", "type": "string" } }, "required": [ "group", "type", "access" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "access": { "ref": "com.atproto.repo.strongRef", "type": "ref" }, "index": { "description": "Present when the space was indexed.", "ref": "com.atproto.repo.strongRef", "type": "ref" }, "space": { "format": "space-ref", "type": "string" } }, "required": [ "space", "access" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.createSpace", "lexicon": 1 } ``` ### fyi.opensocial.declaration https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-declaration/ ```json { "defs": { "main": { "description": "Marks a DID as a group. Lives in the public repo. Points at the meta space. Discovery only.", "key": "literal:self", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "meta": { "description": "The group's meta space.", "format": "space-ref", "type": "string" } }, "required": [ "meta" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.declaration", "lexicon": 1 } ``` ### fyi.opensocial.defs https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-defs/ ```json { "defs": { "accessConfig": { "description": "Contents of an access record.", "properties": { "grants": { "items": { "ref": "#spaceGrant", "type": "ref" }, "maxLength": 100, "type": "array" }, "public": { "default": false, "type": "boolean" }, "writableBy": { "description": "Who may write into the space in their own name, when not every member whose roles grant read: role ids, or 'public' for anyone signed in. Absent or empty is every such member.", "items": { "ref": "#audience", "type": "ref" }, "maxLength": 50, "type": "array" } }, "required": [ "grants" ], "type": "object" }, "accountRef": { "description": "An account, by its DID.", "properties": { "did": { "format": "did", "type": "string" } }, "required": [ "did" ], "type": "object" }, "accountSubject": { "description": "An account, as a moderation subject.", "properties": { "did": { "format": "did", "type": "string" } }, "required": [ "did" ], "type": "object" }, "action": { "description": "What a holder of a role may do, as the host's methods ask: each is answered by the scope that grants it in the role's grant.", "knownValues": [ "mod.read", "mod.resolve", "label", "takedown", "invite", "admit", "eject", "role.assign", "space.create", "space.configure", "space.delete", "group.configure" ], "maxLength": 64, "type": "string" }, "actorView": { "description": "A person, as a view names them: their DID, and the handle their DID document names, when it can be read.", "properties": { "canCreateGroup": { "description": "Only on the caller's own view, from getActor: whether this host lets them start a group (createGroup).", "type": "boolean" }, "did": { "format": "did", "type": "string" }, "handle": { "description": "The handle their DID document names; missing when it names none or cannot be read.", "format": "handle", "type": "string" } }, "required": [ "did" ], "type": "object" }, "audience": { "description": "Who may read or write a space: a role, by its id, or everyone signed in.", "properties": { "role": { "description": "A role id, or public for anyone signed in.", "knownValues": [ "public" ], "maxLength": 64, "type": "string" } }, "required": [ "role" ], "type": "object" }, "collectionRef": { "description": "A collection of records, by its NSID, or * for any.", "properties": { "collection": { "maxLength": 317, "type": "string" } }, "required": [ "collection" ], "type": "object" }, "ejectEvent": { "description": "The subject's membership was deleted.", "properties": {}, "type": "object" }, "groupGrant": { "description": "Scopes a role is granted across the group, and the roles its holders may assign.", "properties": { "assignable": { "description": "Roles holders may grant or revoke, and whose holders they may eject.", "items": { "ref": "fyi.opensocial.defs#roleId", "type": "ref" }, "maxLength": 100, "type": "array" }, "role": { "ref": "fyi.opensocial.defs#roleId", "type": "ref" }, "scopes": { "description": "OAuth scopes, one per item. May include permission sets. `repo:` scopes are the public-repo collections holders may write as the group.", "items": { "maxLength": 2000, "minLength": 1, "type": "string" }, "maxLength": 100, "type": "array" } }, "required": [ "role", "scopes", "assignable" ], "type": "object" }, "groupRule": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "rkey": { "format": "record-key", "type": "string" }, "text": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "title": { "maxGraphemes": 100, "maxLength": 1000, "type": "string" } }, "required": [ "rkey", "title" ], "type": "object" }, "groupView": { "description": "A group as a list shows it. To a caller not signed in, only its did and handle.", "properties": { "address": { "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.", "type": "string" }, "avatar": { "description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.", "type": "string" }, "banner": { "description": "CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.", "type": "string" }, "createdAt": { "description": "When the group was started on this host.", "format": "datetime", "type": "string" }, "deactivated": { "description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on.", "type": "boolean" }, "description": { "type": "string" }, "did": { "format": "did", "type": "string" }, "displayName": { "type": "string" }, "handle": { "format": "handle", "type": "string" }, "joinPolicy": { "description": "How new members get in, as the profile states it.", "type": "string" }, "languages": { "description": "The languages it uses, as BCP 47 tags: en, pl, sl.", "items": { "ref": "#languageRef", "type": "ref" }, "maxLength": 5, "type": "array" }, "location": { "description": "Where it meets, if it meets somewhere: a town or city is enough.", "refs": [ "community.lexicon.location.address", "community.lexicon.location.geo", "community.lexicon.location.fsq", "community.lexicon.location.hthree" ], "type": "union" }, "members": { "format": "space-ref", "type": "string" }, "meta": { "format": "space-ref", "type": "string" }, "online": { "description": "It meets online, as well as or instead of somewhere.", "type": "boolean" }, "rules": { "items": { "ref": "#groupRule", "type": "ref" }, "type": "array" }, "topics": { "description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.", "items": { "ref": "#topicRef", "type": "ref" }, "maxLength": 10, "type": "array" }, "url": { "description": "The group's own site, if it keeps one.", "format": "uri", "type": "string" } }, "required": [ "did", "handle" ], "type": "object" }, "groupViewBasic": { "properties": { "address": { "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.", "type": "string" }, "avatar": { "description": "CID of the group's picture.", "type": "string" }, "did": { "format": "did", "type": "string" }, "displayName": { "type": "string" }, "handle": { "format": "handle", "type": "string" }, "memberCount": { "description": "How many people are in it. Only to its members.", "minimum": 0, "type": "integer" }, "sampleMembers": { "description": "A few of its members, each as they are in the group, to show their faces. Only to its members.", "items": { "ref": "#actorView", "type": "ref" }, "maxLength": 5, "type": "array" }, "url": { "description": "The group's own site, if not at its handle.", "format": "uri", "type": "string" } }, "required": [ "did", "handle" ], "type": "object" }, "groupViewDetailed": { "description": "A group in full, as the viewer may see it. Profile fields and rules are present only when the viewer may read the meta space.", "properties": { "address": { "description": "The group's address here: one label under this host's handle domain, set when the group is made or arrives. Its handle, until the group takes one of its own.", "type": "string" }, "avatar": { "description": "CID of the avatar blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.", "type": "string" }, "banner": { "description": "CID of the banner blob; the host serves it at /img/{did}/{cid}, to whoever may see the profile.", "type": "string" }, "deactivated": { "description": "Set while a steward has the group switched off. Its spaces cannot be read until one of the stewards who could switch it off switches it back on.", "type": "boolean" }, "description": { "type": "string" }, "did": { "format": "did", "type": "string" }, "displayName": { "type": "string" }, "handle": { "format": "handle", "type": "string" }, "joinPolicy": { "description": "How new members get in, as the profile states it.", "type": "string" }, "languages": { "description": "The languages it uses, as BCP 47 tags: en, pl, sl.", "items": { "ref": "#languageRef", "type": "ref" }, "maxLength": 5, "type": "array" }, "links": { "description": "Where else the group is, as its profile lists them.", "items": { "ref": "#link", "type": "ref" }, "maxLength": 5, "type": "array" }, "location": { "description": "Where it meets, if it meets somewhere: a town or city is enough.", "refs": [ "community.lexicon.location.address", "community.lexicon.location.geo", "community.lexicon.location.fsq", "community.lexicon.location.hthree" ], "type": "union" }, "memberCount": { "description": "How many are in it. Present only when the viewer may read the members space, whose members listMembers gives a page at a time.", "minimum": 0, "type": "integer" }, "members": { "format": "space-ref", "type": "string" }, "meta": { "format": "space-ref", "type": "string" }, "online": { "description": "It meets online, as well as or instead of somewhere.", "type": "boolean" }, "rules": { "description": "In the order they are presented. Absent when the meta space is closed to the viewer.", "items": { "ref": "#groupRule", "type": "ref" }, "type": "array" }, "topics": { "description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.", "items": { "ref": "#topicRef", "type": "ref" }, "maxLength": 10, "type": "array" }, "url": { "description": "The group's own site, if it keeps one.", "format": "uri", "type": "string" }, "viewer": { "ref": "#viewerState", "type": "ref" } }, "required": [ "did", "handle" ], "type": "object" }, "inviteView": { "properties": { "actor": { "description": "Whom it invites, with their handle where it can be read: on listInvites.", "ref": "#actorView", "type": "ref" }, "createdAt": { "format": "datetime", "type": "string" }, "expiresAt": { "format": "datetime", "type": "string" }, "invitee": { "format": "did", "type": "string" }, "message": { "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri", "invitee", "createdAt" ], "type": "object" }, "joinPolicy": { "description": "open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy.", "knownValues": [ "open", "approval", "invite" ], "type": "string" }, "joinRequest": { "description": "A request to join, waiting in the host.", "properties": { "actor": { "description": "Who is asking, as a view names them.", "ref": "#actorView", "type": "ref" }, "createdAt": { "format": "datetime", "type": "string" }, "member": { "format": "did", "type": "string" }, "message": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" } }, "required": [ "member", "createdAt" ], "type": "object" }, "labelEvent": { "description": "A label record was written or deleted.", "properties": { "deleted": { "default": false, "type": "boolean" }, "uri": { "description": "The label record.", "format": "at-uri", "type": "string" }, "val": { "maxLength": 128, "minLength": 1, "type": "string" } }, "required": [ "uri", "val" ], "type": "object" }, "labelerPolicies": { "properties": { "labelValueDefinitions": { "description": "Its own label values, defined.", "items": { "ref": "com.atproto.label.defs#labelValueDefinition", "type": "ref" }, "type": "array" }, "labelValues": { "description": "The label values it applies.", "items": { "ref": "com.atproto.label.defs#labelValue", "type": "ref" }, "type": "array" } }, "required": [ "labelValues" ], "type": "object" }, "languageRef": { "description": "A language the group uses.", "properties": { "language": { "format": "language", "type": "string" } }, "required": [ "language" ], "type": "object" }, "link": { "description": "A place on the web where the group is: its site, a chat, a calendar.", "properties": { "title": { "description": "What it is, as the group puts it.", "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "url": { "description": "An http or https address.", "format": "uri", "maxLength": 2048, "type": "string" } }, "required": [ "url" ], "type": "object" }, "memberView": { "properties": { "actor": { "ref": "#actorView", "type": "ref" }, "roles": { "items": { "ref": "#roleRef", "type": "ref" }, "type": "array" } }, "required": [ "actor", "roles" ], "type": "object" }, "moderationEvent": { "description": "One event in the host's private moderation history.", "properties": { "createdAt": { "format": "datetime", "type": "string" }, "createdBy": { "description": "Hosts may withhold this to protect reporters and moderators.", "format": "did", "type": "string" }, "event": { "refs": [ "fyi.opensocial.defs#reportEvent", "fyi.opensocial.defs#statusEvent", "fyi.opensocial.defs#labelEvent", "fyi.opensocial.defs#ejectEvent" ], "type": "union" }, "id": { "maxLength": 512, "minLength": 1, "type": "string" } }, "required": [ "id", "createdAt", "event" ], "type": "object" }, "recordSubject": { "description": "A record, as a moderation subject.", "properties": { "cid": { "description": "A specific version. Omit for the record as a whole.", "format": "cid", "type": "string" }, "uri": { "description": "A record in one of the group's spaces.", "format": "at-uri", "type": "string" } }, "required": [ "uri" ], "type": "object" }, "reportEvent": { "description": "Someone reported the subject.", "properties": { "reason": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "reasonType": { "ref": "com.atproto.moderation.defs#reasonType", "type": "ref" }, "rule": { "description": "A rule in the group's meta space.", "format": "at-uri", "type": "string" } }, "required": [ "reasonType" ], "type": "object" }, "roleBinding": { "description": "What one role may do, as the host reads its grant.", "properties": { "actions": { "items": { "ref": "#action", "type": "ref" }, "type": "array" }, "assignable": { "items": { "ref": "#roleRef", "type": "ref" }, "type": "array" }, "repoCollections": { "description": "The public-repo collections holders may write as the group; `*` for any.", "items": { "ref": "#collectionRef", "type": "ref" }, "type": "array" }, "role": { "maxLength": 64, "type": "string" }, "scopes": { "description": "The role's grant as the permissions record has it.", "items": { "ref": "#scopeRef", "type": "ref" }, "type": "array" } }, "required": [ "role", "actions", "assignable" ], "type": "object" }, "roleId": { "description": "The rkey of a role record in the group's members space.", "format": "record-key", "maxLength": 512, "type": "string" }, "roleRef": { "description": "A role, by its id: the record key of a fyi.opensocial.role record.", "properties": { "role": { "maxLength": 64, "type": "string" } }, "required": [ "role" ], "type": "object" }, "roleView": { "properties": { "bot": { "description": "People with this role are bots.", "type": "boolean" }, "default": { "description": "Granted to members who join through requestJoin.", "type": "boolean" }, "description": { "type": "string" }, "key": { "description": "The role id: its record key.", "type": "string" }, "name": { "type": "string" } }, "required": [ "key" ], "type": "object" }, "scopeRef": { "description": "An OAuth scope, as a permission or permission set is written.", "properties": { "scope": { "maxLength": 400, "type": "string" } }, "required": [ "scope" ], "type": "object" }, "spaceGrant": { "description": "Scopes a role is granted in one space.", "properties": { "role": { "description": "A role id: the record key of a fyi.opensocial.role record.", "format": "record-key", "maxLength": 512, "type": "string" }, "scopes": { "description": "OAuth scopes, one per item: space scopes, read against this space. One granting read lets the role read the space; one naming collections lets it write those as the group here.", "items": { "maxLength": 2000, "minLength": 1, "type": "string" }, "maxLength": 100, "type": "array" } }, "required": [ "role", "scopes" ], "type": "object" }, "spaceView": { "properties": { "grants": { "description": "The scopes each role is granted there, when the viewer may read the space.", "items": { "ref": "#spaceGrant", "type": "ref" }, "type": "array" }, "name": { "type": "string" }, "people": { "description": "For chosen people: who they are, when the viewer is one of them. Only they read it or write in it.", "items": { "ref": "#accountRef", "type": "ref" }, "type": "array" }, "public": { "description": "Whether anyone signed in may read it, when the viewer may read the space.", "type": "boolean" }, "spaceType": { "format": "nsid", "type": "string" }, "uri": { "format": "space-ref", "type": "string" }, "writableBy": { "description": "Who may write there in their own name, when the viewer may read the space. Absent is every member whose roles grant read.", "items": { "ref": "#audience", "type": "ref" }, "type": "array" } }, "required": [ "uri", "spaceType" ], "type": "object" }, "statusEvent": { "description": "A moderator set the subject's status, optionally with a note.", "properties": { "note": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "status": { "ref": "fyi.opensocial.defs#subjectStatus", "type": "ref" } }, "required": [ "status" ], "type": "object" }, "subjectStatus": { "description": "Where a subject stands in the moderation queue.", "enum": [ "open", "escalated", "resolved" ], "type": "string" }, "subjectView": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "reportCount": { "minimum": 0, "type": "integer" }, "status": { "ref": "fyi.opensocial.defs#subjectStatus", "type": "ref" }, "subject": { "refs": [ "fyi.opensocial.defs#accountSubject", "fyi.opensocial.defs#recordSubject" ], "type": "union" }, "updatedAt": { "format": "datetime", "type": "string" } }, "required": [ "subject", "status", "createdAt", "updatedAt", "reportCount" ], "type": "object" }, "topicRef": { "description": "A topic the group is about.", "properties": { "topic": { "maxGraphemes": 64, "maxLength": 640, "type": "string" } }, "required": [ "topic" ], "type": "object" }, "viewerState": { "description": "The requesting account's standing in the group. Only present for authed requests.", "properties": { "accepted": { "description": "For a member: whether their own acceptance is in the members space.", "type": "boolean" }, "actions": { "description": "The union of actions across the viewer's roles: what the host would let them do.", "items": { "ref": "fyi.opensocial.defs#action", "type": "ref" }, "type": "array" }, "member": { "type": "boolean" }, "request": { "description": "The viewer's own pending request to join, when they are not a member and have one.", "ref": "#joinRequest", "type": "ref" }, "roles": { "items": { "ref": "#roleRef", "type": "ref" }, "type": "array" } }, "required": [ "member", "roles", "actions" ], "type": "object" } }, "id": "fyi.opensocial.defs", "lexicon": 1 } ``` ### fyi.opensocial.deleteRole https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-deleteRole/ ```json { "defs": { "main": { "description": "Remove a role. Requires group.configure. Fails if any membership still holds it.", "errors": [ { "name": "RoleInUse" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "role": { "maxLength": 64, "type": "string" } }, "required": [ "group", "role" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.deleteRole", "lexicon": 1 } ``` ### fyi.opensocial.deleteRule https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-deleteRule/ ```json { "defs": { "main": { "description": "Remove a rule. Requires group.configure.", "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "rkey": { "format": "record-key", "type": "string" } }, "required": [ "group", "rkey" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.deleteRule", "lexicon": 1 } ``` ### fyi.opensocial.deleteSpace https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-deleteSpace/ ```json { "defs": { "main": { "description": "Delete a group space and its index entry. Requires space.delete.", "errors": [ { "description": "The group has no such space.", "name": "SpaceNotFound" }, { "description": "The meta and members spaces can't be created or deleted.", "name": "ReservedSpace" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "space": { "format": "space-ref", "type": "string" } }, "required": [ "group", "space" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": {}, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.deleteSpace", "lexicon": 1 } ``` ### fyi.opensocial.denyJoinRequest https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-denyJoinRequest/ ```json { "defs": { "main": { "description": "Deny a pending join request. Requires admit. The requester sees it as no request at all, and may ask again.", "errors": [ { "name": "JoinRequestNotFound" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "member": { "description": "Who asked to join.", "format": "did", "type": "string" } }, "required": [ "group", "member" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": {}, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.denyJoinRequest", "lexicon": 1 } ``` ### fyi.opensocial.ejectMember https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-ejectMember/ ```json { "defs": { "main": { "description": "Remove a member and their access. Requires eject; every role the member holds must be in the caller's assignable set.", "errors": [ { "name": "NotAssignable" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "member": { "format": "did", "type": "string" }, "reason": { "type": "string" } }, "required": [ "group", "member" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.ejectMember", "lexicon": 1 } ``` ### fyi.opensocial.getGroupAuth https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-getGroupAuth/ ```json { "defs": { "main": { "description": "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 are granted by the space's access record. 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 (fyi.opensocial.invites), a caller whose roles may invite gets a token to write the group's invite there, and nothing in the group's repo.", "errors": [ { "name": "Forbidden" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "format": "did", "type": "string" }, "space": { "description": "The space the caller intends to write into: one of the group's, where the scopes its access record grants the caller's roles bound the grant, or someone's inbox, to invite them.", "format": "space-ref", "type": "string" } }, "required": [ "group", "space" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "accessJwt": { "type": "string" }, "collections": { "description": "Collections the caller's roles may write as the group in that space ('*' for any).", "items": { "ref": "fyi.opensocial.defs#collectionRef", "type": "ref" }, "type": "array" }, "did": { "format": "did", "type": "string" }, "expiresAt": { "format": "datetime", "type": "string" }, "pds": { "description": "Where to use it: the group's PDS (this host).", "format": "uri", "type": "string" }, "repoCollections": { "description": "Public-repo collections this token may also write.", "items": { "ref": "fyi.opensocial.defs#collectionRef", "type": "ref" }, "type": "array" }, "scope": { "description": "The token's OAuth scope string; the PDS enforces it.", "type": "string" } }, "required": [ "did", "accessJwt", "pds", "collections", "expiresAt" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.getGroupAuth", "lexicon": 1 } ``` ### fyi.opensocial.getJoinRequest https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-getJoinRequest/ ```json { "defs": { "main": { "description": "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.", "output": { "encoding": "application/json", "schema": { "properties": { "request": { "ref": "fyi.opensocial.defs#joinRequest", "type": "ref" } }, "required": [], "type": "object" } }, "parameters": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" } }, "required": [ "group" ], "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.getJoinRequest", "lexicon": 1 } ``` ### fyi.opensocial.getSubjectHistory https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-getSubjectHistory/ ```json { "defs": { "main": { "description": "Get a subject's moderation history, oldest first. Requires mod.read.", "errors": [ { "description": "The subject isn't an account or record in this group.", "name": "InvalidSubject" } ], "output": { "encoding": "application/json", "schema": { "properties": { "cursor": { "type": "string" }, "events": { "items": { "ref": "fyi.opensocial.defs#moderationEvent", "type": "ref" }, "type": "array" } }, "required": [ "events" ], "type": "object" } }, "parameters": { "properties": { "cid": { "description": "Narrow a record subject to one version.", "format": "cid", "type": "string" }, "cursor": { "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "limit": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" }, "subject": { "description": "An account DID or record URI.", "format": "uri", "type": "string" } }, "required": [ "group", "subject" ], "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.getSubjectHistory", "lexicon": 1 } ``` ### fyi.opensocial.inbox https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-inbox/ ```json { "defs": { "main": { "collections": [ "fyi.opensocial.invite", "fyi.opensocial.conversation.pointer", "fyi.opensocial.conversation.state", "fyi.opensocial.readState" ], "description": "Each person's own inbox, hosted by them rather than by a group: where groups' invites arrive, where whoever puts them in a conversation leaves a pointer to it, and where they keep how far they've read their conversations and their groups' chats, boards and calendars, which only they read.", "key": "literal:self", "name": "Inbox", "type": "space" } }, "id": "fyi.opensocial.inbox", "lexicon": 1 } ``` ### fyi.opensocial.invite https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-invite/ ```json { "defs": { "main": { "description": "An invitation, written by the group in its own repo in the invitee's inbox (fyi.opensocial.invites), through com.atproto.space.*. Deleting it revokes it.", "key": "tid", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "expiresAt": { "format": "datetime", "type": "string" }, "message": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" } }, "required": [ "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.invite", "lexicon": 1 } ``` ### fyi.opensocial.label https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-label/ ```json { "defs": { "main": { "description": "A moderation label, written by the group authority into the space its subject lives in — or, for an account, into the members space.", "key": "tid", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "neg": { "description": "If true, negates an earlier label with the same val on the same subject.", "type": "boolean" }, "rule": { "description": "The fyi.opensocial.rule this label cites.", "format": "at-uri", "type": "string" }, "subject": { "description": "A record inside one of the group's spaces, or an account. A record's label lives in that record's space; an account's in the members space.", "refs": [ "com.atproto.admin.defs#repoRef", "com.atproto.repo.strongRef" ], "type": "union" }, "val": { "description": "The label value, e.g. '!hide', '!takedown', or a group-defined value.", "maxLength": 128, "type": "string" } }, "required": [ "subject", "val", "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.label", "lexicon": 1 } ``` ### fyi.opensocial.labeler https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-labeler/ ```json { "defs": { "main": { "description": "The group as a moderation service: the label values it applies and what it accepts reports about. Written by the group into the meta space.", "key": "literal:self", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "policies": { "ref": "fyi.opensocial.defs#labelerPolicies", "type": "ref" }, "reasonTypes": { "description": "Accepted report reasons. Omit to accept all.", "items": { "ref": "com.atproto.moderation.defs#reasonType", "type": "ref" }, "type": "array" }, "subjectCollections": { "description": "Record types that can be reported. Omit to accept all.", "items": { "format": "nsid", "type": "string" }, "type": "array" }, "subjectTypes": { "description": "Accepted report subject types. Omit to accept all.", "items": { "ref": "com.atproto.moderation.defs#subjectType", "type": "ref" }, "type": "array" } }, "required": [ "policies", "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.labeler", "lexicon": 1 } ``` ### fyi.opensocial.leaveGroup https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-leaveGroup/ ```json { "defs": { "main": { "description": "Leave the group.", "errors": [ { "description": "The account is not a member of the group.", "name": "NotAMember" }, { "description": "It would leave the group with nobody able to configure it.", "name": "LastConfigurer" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" } }, "required": [ "group" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": {}, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.leaveGroup", "lexicon": 1 } ``` ### fyi.opensocial.listGroups https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-listGroups/ ```json { "defs": { "main": { "description": "Host-level: the groups hosted here, with their profiles. v1 discovery; a real index would come from declarations on the public network.", "output": { "encoding": "application/json", "schema": { "properties": { "groups": { "items": { "ref": "fyi.opensocial.defs#groupView", "type": "ref" }, "type": "array" } }, "required": [ "groups" ], "type": "object" } }, "parameters": { "properties": {}, "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.listGroups", "lexicon": 1 } ``` ### fyi.opensocial.listInvites https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-listInvites/ ```json { "defs": { "main": { "description": "Outstanding invites. Requires invite.", "output": { "encoding": "application/json", "schema": { "properties": { "cursor": { "type": "string" }, "invites": { "items": { "ref": "fyi.opensocial.defs#inviteView", "type": "ref" }, "type": "array" } }, "required": [ "invites" ], "type": "object" } }, "parameters": { "properties": { "cursor": { "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "limit": { "default": 50, "maximum": 100, "type": "integer" } }, "required": [ "group" ], "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.listInvites", "lexicon": 1 } ``` ### fyi.opensocial.listJoinRequests https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-listJoinRequests/ ```json { "defs": { "main": { "description": "The pending-requests queue. Requires admit.", "output": { "encoding": "application/json", "schema": { "properties": { "cursor": { "type": "string" }, "requests": { "items": { "ref": "fyi.opensocial.defs#joinRequest", "type": "ref" }, "type": "array" } }, "required": [ "requests" ], "type": "object" } }, "parameters": { "properties": { "cursor": { "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "limit": { "default": 50, "maximum": 100, "type": "integer" } }, "required": [ "group" ], "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.listJoinRequests", "lexicon": 1 } ``` ### fyi.opensocial.listSubjects https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-listSubjects/ ```json { "defs": { "main": { "description": "List subjects in the moderation queue. Requires mod.read.", "output": { "encoding": "application/json", "schema": { "properties": { "cursor": { "type": "string" }, "subjects": { "items": { "ref": "fyi.opensocial.defs#subjectView", "type": "ref" }, "type": "array" } }, "required": [ "subjects" ], "type": "object" } }, "parameters": { "properties": { "cursor": { "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "limit": { "default": 50, "maximum": 100, "minimum": 1, "type": "integer" }, "status": { "default": "open", "enum": [ "open", "escalated", "resolved" ], "type": "string" } }, "required": [ "group" ], "type": "params" }, "type": "query" } }, "id": "fyi.opensocial.listSubjects", "lexicon": 1 } ``` ### fyi.opensocial.members https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-members/ ```json { "defs": { "main": { "collections": [ "fyi.opensocial.permissions", "fyi.opensocial.space", "fyi.opensocial.role", "fyi.opensocial.membership", "fyi.opensocial.acceptance", "fyi.opensocial.access" ], "description": "Roles, who holds them, the authz config, and the space index. Usually gated to members.", "key": "literal:self", "name": "Group: members", "type": "space" } }, "id": "fyi.opensocial.members", "lexicon": 1 } ``` ### fyi.opensocial.membership https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-membership/ ```json { "defs": { "main": { "description": "Grants a member their roles, in the members space. Written by the group authority; the record key is the member's DID. Writes are bounded by the writer's assignable roles. Creating one admits one waiting to join and decides their request; deleting one ejects the member.", "key": "any", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "member": { "format": "did", "type": "string" }, "roles": { "description": "Distinct roles declared by this group.", "items": { "ref": "fyi.opensocial.defs#roleId", "type": "ref" }, "maxLength": 100, "type": "array" } }, "required": [ "member", "roles", "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.membership", "lexicon": 1 } ``` ### fyi.opensocial.meta https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-meta/ ```json { "defs": { "main": { "collections": [ "fyi.opensocial.profile", "fyi.opensocial.rule", "fyi.opensocial.labeler", "fyi.opensocial.access" ], "description": "The group's public face. Profile, rules, how to get in. Often readable by anyone, though may be private to members.", "key": "literal:self", "name": "Group: about", "type": "space" } }, "id": "fyi.opensocial.meta", "lexicon": 1 } ``` ### fyi.opensocial.negateLabel https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-negateLabel/ ```json { "defs": { "main": { "description": "Negate a previously applied label. Requires label, or takedown for !hide and !takedown.", "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "subject": { "refs": [ "com.atproto.admin.defs#repoRef", "com.atproto.repo.strongRef" ], "type": "union" }, "val": { "maxLength": 128, "type": "string" } }, "required": [ "group", "subject", "val" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "cid": { "format": "cid", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri", "cid" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.negateLabel", "lexicon": 1 } ``` ### fyi.opensocial.permissions https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-permissions/ ```json { "defs": { "main": { "description": "Group-wide grants for each role, in the members space: the OAuth scopes the role holds and the roles its holders may assign. Roles compose by union; there are no deny rules. A writer changes the grants only of roles they may assign, adds no scope their own roles do not hold, and lets no role assign one they may not.", "key": "literal:self", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "grants": { "description": "At most one entry per role.", "items": { "ref": "fyi.opensocial.defs#groupGrant", "type": "ref" }, "maxLength": 100, "type": "array" } }, "required": [ "grants" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.permissions", "lexicon": 1 } ``` ### fyi.opensocial.profile https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-profile/ ```json { "defs": { "main": { "description": "The group's profile. Written by the group authority into the meta space.", "key": "literal:self", "record": { "properties": { "avatar": { "accept": [ "image/png", "image/jpeg", "image/webp" ], "maxSize": 2000000, "type": "blob" }, "banner": { "accept": [ "image/png", "image/jpeg", "image/webp" ], "maxSize": 2000000, "type": "blob" }, "createdAt": { "format": "datetime", "type": "string" }, "description": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "displayName": { "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "joinPolicy": { "ref": "fyi.opensocial.defs#joinPolicy", "type": "ref" }, "languages": { "description": "The languages it uses, as BCP 47 tags: en, pl, sl.", "items": { "ref": "fyi.opensocial.defs#languageRef", "type": "ref" }, "maxLength": 5, "type": "array" }, "links": { "description": "Where else the group is, in the order it shows them: each an http or https address, and what it is.", "items": { "ref": "fyi.opensocial.defs#link", "type": "ref" }, "maxLength": 5, "type": "array" }, "location": { "description": "Where it meets, if it meets somewhere: a town or city is enough.", "refs": [ "community.lexicon.location.address", "community.lexicon.location.geo", "community.lexicon.location.fsq", "community.lexicon.location.hthree" ], "type": "union" }, "online": { "description": "It meets online, as well as or instead of somewhere.", "type": "boolean" }, "topics": { "description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.", "items": { "ref": "fyi.opensocial.defs#topicRef", "type": "ref" }, "maxLength": 10, "type": "array" }, "url": { "description": "The group's own site, if it keeps one. A third-party app that shows the group can link back to it.", "format": "uri", "type": "string" } }, "required": [ "displayName", "joinPolicy" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.profile", "lexicon": 1 } ``` ### fyi.opensocial.provisionGroup https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-provisionGroup/ ```json { "defs": { "main": { "description": "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.", "errors": [ { "name": "UntrustedApp" }, { "name": "InvalidScope" }, { "name": "use_dpop_nonce" }, { "name": "HandleTaken" } ], "input": { "encoding": "application/json", "schema": { "properties": { "clientAssertion": { "maxLength": 8192, "type": "string" }, "clientAssertionType": { "maxLength": 256, "type": "string" }, "clientId": { "description": "The app's OAuth client id, its client metadata's URL.", "maxLength": 2048, "type": "string" }, "description": { "maxGraphemes": 300, "maxLength": 3000, "type": "string" }, "displayName": { "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "handle": { "format": "handle", "type": "string" }, "joinPolicy": { "knownValues": [ "fyi.opensocial.profile#open", "fyi.opensocial.profile#request", "fyi.opensocial.profile#invite" ], "type": "string" }, "metaReadableBy": { "items": { "ref": "fyi.opensocial.defs#audience", "type": "ref" }, "type": "array" }, "scope": { "description": "The OAuth scope the app wants on the group. Must include `atproto`, and every entry must be one the app's client metadata declares.", "maxLength": 2048, "type": "string" }, "stewards": { "description": "Accounts that run the group alongside the founder.", "items": { "ref": "fyi.opensocial.defs#accountRef", "type": "ref" }, "type": "array" } }, "required": [ "handle", "displayName", "scope", "clientId" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "did": { "format": "did", "type": "string" }, "members": { "format": "space-ref", "type": "string" }, "meta": { "format": "space-ref", "type": "string" }, "session": { "description": "An OAuth token response (access_token, token_type, refresh_token, expires_in, scope, sub), as /oauth/token returns it.", "type": "unknown" } }, "required": [ "did", "meta", "members", "session" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.provisionGroup", "lexicon": 1 } ``` ### fyi.opensocial.putRole https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-putRole/ ```json { "defs": { "main": { "description": "Create or update a role and its grant. Requires group.configure.", "input": { "encoding": "application/json", "schema": { "properties": { "actions": { "description": "What the role may do. Written as the scopes that grant each, beside any other scope the role already holds.", "items": { "ref": "fyi.opensocial.defs#action", "type": "ref" }, "type": "array" }, "assignable": { "items": { "maxLength": 64, "type": "string" }, "type": "array" }, "bot": { "description": "Whether people with this role are bots: accounts that act on their own, not a person. Giving someone a bot role is how they are marked as one.", "type": "boolean" }, "default": { "description": "Whether members get this role when they join. Omitted keeps the role's current value.", "type": "boolean" }, "description": { "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "name": { "description": "What the role is called. Written as the role record's displayName.", "type": "string" }, "repoCollections": { "description": "Collections holders may write in the group's public repo as the group, `*` for any; written as `repo:` scopes. Omitted keeps the role's current value.", "items": { "type": "string" }, "type": "array" }, "role": { "maxLength": 64, "type": "string" } }, "required": [ "group", "role", "name", "actions" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "cid": { "format": "cid", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri", "cid" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.putRole", "lexicon": 1 } ``` ### fyi.opensocial.putRule https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-putRule/ ```json { "defs": { "main": { "description": "Create or update a rule. Requires group.configure. Fields are inlined rather than referencing fyi.opensocial.rule, because a record def cannot be used as an input object — same fix as updateProfile.", "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "order": { "description": "Where it comes in the list, lowest first. Omitted keeps an existing rule's place and puts a new one last.", "minimum": 0, "type": "integer" }, "rkey": { "format": "record-key", "type": "string" }, "text": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "title": { "maxGraphemes": 100, "maxLength": 1000, "type": "string" } }, "required": [ "group", "title" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "cid": { "format": "cid", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri", "cid" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.putRule", "lexicon": 1 } ``` ### fyi.opensocial.requestJoin https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-requestJoin/ ```json { "defs": { "main": { "description": "Ask to join a group, optionally redeeming an invitation. An invite the group has sent the caller, neither taken back nor past its expiresAt, admits them at once, whatever the group's join policy, with the group's default roles; one named that is not such an invite is refused. Unnamed, a waiting invite is redeemed all the same. No role required; authenticated as the requester.", "errors": [ { "description": "The group isn't hosted here.", "name": "GroupNotFound" }, { "description": "The invitation is expired, revoked, or not addressed to the caller.", "name": "InvalidInvite" }, { "description": "The group requires an invitation.", "name": "JoinClosed" }, { "description": "The caller is a member already.", "name": "AlreadyMember" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "invite": { "description": "An invitation from this group to the caller.", "format": "at-uri", "type": "string" }, "message": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" } }, "required": [ "group" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "membership": { "description": "Present when admitted.", "ref": "com.atproto.repo.strongRef", "type": "ref" }, "request": { "description": "Present when pending.", "ref": "fyi.opensocial.defs#joinRequest", "type": "ref" }, "status": { "knownValues": [ "pending", "admitted" ], "type": "string" } }, "required": [ "status" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.requestJoin", "lexicon": 1 } ``` ### fyi.opensocial.resolveSubject https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-resolveSubject/ ```json { "defs": { "main": { "description": "Resolve or escalate a subject, optionally with a note. Repeating the current status adds the note. Requires mod.resolve.", "errors": [ { "description": "The subject isn't an account or record in this group.", "name": "InvalidSubject" }, { "description": "The subject has never been reported.", "name": "SubjectNotFound" } ], "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "note": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "status": { "enum": [ "resolved", "escalated" ], "type": "string" }, "subject": { "refs": [ "fyi.opensocial.defs#accountSubject", "fyi.opensocial.defs#recordSubject" ], "type": "union" } }, "required": [ "group", "subject", "status" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "ref": "fyi.opensocial.defs#subjectView", "type": "ref" } }, "type": "procedure" } }, "id": "fyi.opensocial.resolveSubject", "lexicon": 1 } ``` ### fyi.opensocial.revokeInvite https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-revokeInvite/ ```json { "defs": { "main": { "description": "Retract an outstanding invite. Requires invite.", "input": { "encoding": "application/json", "schema": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "group", "uri" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.revokeInvite", "lexicon": 1 } ``` ### fyi.opensocial.role https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-role/ ```json { "defs": { "main": { "description": "Declares that a role exists, in the members space. The record key is the role id, of 64 characters at most. A role is deleted only once no member holds it and the permissions record grants it nothing.", "key": "any", "record": { "properties": { "bot": { "description": "People with this role are bots: accounts that act on their own, not a person. A member is a bot if any of their roles says so.", "type": "boolean" }, "createdAt": { "format": "datetime", "type": "string" }, "default": { "description": "Granted to members who join through requestJoin. With no role marked so, a newcomer gets member.", "type": "boolean" }, "description": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "displayName": { "maxGraphemes": 64, "maxLength": 640, "type": "string" } }, "required": [ "displayName" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.role", "lexicon": 1 } ``` ### fyi.opensocial.rule https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-rule/ ```json { "defs": { "main": { "description": "One group rule, with a stable URI a moderation action can cite.", "key": "tid", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "order": { "description": "Where it comes in the list of rules, lowest first.", "minimum": 0, "type": "integer" }, "text": { "maxGraphemes": 2000, "maxLength": 20000, "type": "string" }, "title": { "maxGraphemes": 64, "maxLength": 640, "type": "string" } }, "required": [ "title", "text" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.rule", "lexicon": 1 } ``` ### fyi.opensocial.space https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-space/ ```json { "defs": { "main": { "description": "Lists one space in the group's index, in its members space. A discovery aid, not an exhaustive list.", "key": "tid", "record": { "properties": { "createdAt": { "format": "datetime", "type": "string" }, "name": { "description": "What the group calls it, for apps that list its spaces.", "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "space": { "description": "The space this entry lists.", "format": "space-ref", "type": "string" } }, "required": [ "space", "createdAt" ], "type": "object" }, "type": "record" } }, "id": "fyi.opensocial.space", "lexicon": 1 } ``` ### fyi.opensocial.updateProfile https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-updateProfile/ ```json { "defs": { "main": { "description": "Replace the profile: name, description, join policy, where it meets, its topics and languages. Requires group.configure. Fields are inlined rather than referencing fyi.opensocial.profile, because a record def cannot be used as an input object — mirrors createGroup.", "input": { "encoding": "application/json", "schema": { "properties": { "avatar": { "accept": [ "image/png", "image/jpeg" ], "description": "The group's avatar, as returned by uploadImage. Omit to keep the current one; null to clear it.", "maxSize": 1000000, "type": "blob" }, "banner": { "accept": [ "image/png", "image/jpeg" ], "description": "The group's banner, as returned by uploadImage. Omit to keep the current one; null to clear it.", "maxSize": 1000000, "type": "blob" }, "description": { "maxGraphemes": 300, "maxLength": 3000, "type": "string" }, "displayName": { "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "joinPolicy": { "knownValues": [ "fyi.opensocial.profile#open", "fyi.opensocial.profile#request", "fyi.opensocial.profile#invite" ], "type": "string" }, "languages": { "description": "The languages it uses, as BCP 47 tags: en, pl, sl.", "items": { "format": "language", "type": "string" }, "maxLength": 5, "type": "array" }, "location": { "description": "Where it meets, if it meets somewhere: a town or city is enough.", "refs": [ "community.lexicon.location.address", "community.lexicon.location.geo", "community.lexicon.location.fsq", "community.lexicon.location.hthree" ], "type": "union" }, "online": { "description": "It meets online, as well as or instead of somewhere.", "type": "boolean" }, "topics": { "description": "What it's about, a few words each, as the group puts it: climbing, choir, renters' union.", "items": { "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "maxLength": 10, "type": "array" }, "url": { "description": "The group's own site.", "format": "uri", "type": "string" } }, "required": [ "group", "displayName" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": { "cid": { "format": "cid", "type": "string" }, "uri": { "format": "at-uri", "type": "string" } }, "required": [ "uri", "cid" ], "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.updateProfile", "lexicon": 1 } ``` ### fyi.opensocial.updateSpace https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-updateSpace/ ```json { "defs": { "main": { "description": "Change a space: its name in the group's index, and its access record, replaced whole. Requires space.configure.", "errors": [ { "description": "The group has no such space, or, to name it, none in its index.", "name": "SpaceNotFound" }, { "description": "A grant names a role that doesn't exist.", "name": "UnknownRole" }, { "description": "A grant isn't a space scope.", "name": "InvalidScope" } ], "input": { "encoding": "application/json", "schema": { "properties": { "access": { "description": "The access record the space has now. Omitted means unchanged.", "ref": "fyi.opensocial.defs#accessConfig", "type": "ref" }, "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" }, "name": { "description": "What the group calls it, kept in its index entry.", "maxGraphemes": 64, "maxLength": 640, "type": "string" }, "space": { "format": "space-ref", "type": "string" } }, "required": [ "group", "space" ], "type": "object" } }, "output": { "encoding": "application/json", "schema": { "properties": {}, "type": "object" } }, "type": "procedure" } }, "id": "fyi.opensocial.updateSpace", "lexicon": 1 } ``` ### fyi.opensocial.uploadImage https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-uploadImage/ ```json { "defs": { "main": { "description": "Upload an image for the profile avatar or banner. Requires group.configure. Binary input like com.atproto.repo.uploadBlob; the group is a parameter because the blob has to land in that group's repo for a profile record to reference it.", "input": { "encoding": "*/*" }, "output": { "encoding": "application/json", "schema": { "properties": { "blob": { "type": "blob" } }, "required": [ "blob" ], "type": "object" } }, "parameters": { "properties": { "group": { "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.", "format": "did", "type": "string" } }, "required": [ "group" ], "type": "params" }, "type": "procedure" } }, "id": "fyi.opensocial.uploadImage", "lexicon": 1 } ``` ### org.atgrp.about https://www.atmospheregroups.org/reference/lexicons/org-atgrp-about/ ```json { "id": "org.atgrp.about", "defs": { "main": { "key": "literal:self", "type": "record", "record": { "type": "object", "required": [ "displayName" ], "properties": { "avatar": { "type": "blob", "accept": [ "image/png", "image/jpeg", "image/webp" ], "maxSize": 2000000 }, "website": { "type": "string", "format": "uri", "description": "Group website. Must be http or https." }, "description": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "displayName": { "type": "string", "maxLength": 640, "maxGraphemes": 64 } } }, "description": "Basic information for presenting the group. Written by the group in the meta space." } }, "lexicon": 1 } ``` ### org.atgrp.authManageAdmin https://www.atmospheregroups.org/reference/lexicons/org-atgrp-authManageAdmin/ ```json { "id": "org.atgrp.authManageAdmin", "defs": { "main": { "type": "permission-set", "title": "Group administration", "detail": "Manage everything in the group's info and member list, including its roles and what each role can do.", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "permissions": [ { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "manage": [ "update" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.meta", "collection": [ "org.atgrp.about", "org.atgrp.config", "com.atproto.label.record" ] }, { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "manage": [ "update" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.members", "collection": [ "org.atgrp.rule", "org.atgrp.labeler", "org.atgrp.role", "org.atgrp.membership", "com.atproto.label.record" ] }, { "skey": "self", "type": "permission", "action": [ "read_self", "create", "update", "delete" ], "resource": "space", "authority": "*", "spaceType": "org.atgrp.inbox", "collection": [ "org.atgrp.invite" ] }, { "aud": "*", "lxm": [ "org.atgrp.listJoinRequests", "org.atgrp.denyJoinRequest", "org.atgrp.mod.querySubjects", "org.atgrp.mod.querySubjectHistory", "org.atgrp.mod.updateSubject" ], "type": "permission", "resource": "rpc" } ] } }, "lexicon": 1 } ``` ### org.atgrp.authManageBasic https://www.atmospheregroups.org/reference/lexicons/org-atgrp-authManageBasic/ ```json { "id": "org.atgrp.authManageBasic", "defs": { "main": { "type": "permission-set", "title": "Group profile", "detail": "Edit the group's profile and rules.", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "permissions": [ { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.meta", "collection": [ "org.atgrp.about" ] }, { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.members", "collection": [ "org.atgrp.rule" ] } ] } }, "lexicon": 1 } ``` ### org.atgrp.authManageMembers https://www.atmospheregroups.org/reference/lexicons/org-atgrp-authManageMembers/ ```json { "id": "org.atgrp.authManageMembers", "defs": { "main": { "type": "permission-set", "title": "Group members", "detail": "Manage the group's members, their roles, and invites.", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "permissions": [ { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.members", "collection": [ "org.atgrp.membership" ] }, { "skey": "self", "type": "permission", "action": [ "read_self", "create", "update", "delete" ], "resource": "space", "authority": "*", "spaceType": "org.atgrp.inbox", "collection": [ "org.atgrp.invite" ] }, { "aud": "*", "lxm": [ "org.atgrp.listJoinRequests", "org.atgrp.denyJoinRequest" ], "type": "permission", "resource": "rpc" } ] } }, "lexicon": 1 } ``` ### org.atgrp.authModerate https://www.atmospheregroups.org/reference/lexicons/org-atgrp-authModerate/ ```json { "id": "org.atgrp.authModerate", "defs": { "main": { "type": "permission-set", "title": "Group moderation", "detail": "Label content, remove members, and review reports.", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "permissions": [ { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.meta", "collection": [ "com.atproto.label.record" ] }, { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.members", "collection": [ "com.atproto.label.record" ] }, { "skey": "self", "type": "permission", "action": [ "read", "delete" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.members", "collection": [ "org.atgrp.membership" ] }, { "aud": "*", "lxm": [ "org.atgrp.mod.querySubjects", "org.atgrp.mod.querySubjectHistory", "org.atgrp.mod.updateSubject" ], "type": "permission", "resource": "rpc" } ] } }, "lexicon": 1 } ``` ### org.atgrp.authParticipate https://www.atmospheregroups.org/reference/lexicons/org-atgrp-authParticipate/ ```json { "id": "org.atgrp.authParticipate", "defs": { "main": { "type": "permission-set", "title": "Groups", "detail": "View and interact with your groups.", "description": "For personal sessions, acting as the user rather than the group.", "permissions": [ { "skey": "self", "type": "permission", "action": [ "read" ], "resource": "space", "authority": "*", "spaceType": "org.atgrp.meta" }, { "skey": "self", "type": "permission", "action": [ "read", "create", "update", "delete" ], "resource": "space", "authority": "*", "spaceType": "org.atgrp.members", "collection": [ "org.atgrp.confirmation" ] }, { "skey": "self", "type": "permission", "action": [ "read" ], "manage": [ "create" ], "resource": "space", "authority": "self", "spaceType": "org.atgrp.inbox" }, { "aud": "*", "lxm": [ "org.atgrp.requestJoin", "org.atgrp.cancelJoinRequest", "org.atgrp.leaveGroup", "org.atgrp.mod.submitReport", "org.atgrp.mod.submitAppeal", "org.atgrp.mod.querySelfHistory" ], "type": "permission", "resource": "rpc" } ] } }, "lexicon": 1 } ``` ### org.atgrp.cancelJoinRequest https://www.atmospheregroups.org/reference/lexicons/org-atgrp-cancelJoinRequest/ ```json { "id": "org.atgrp.cancelJoinRequest", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" } } }, "encoding": "application/json" }, "errors": [ { "name": "GroupNotFound" }, { "name": "JoinRequestNotFound" } ], "description": "Withdraw the caller's pending join request. Requires service auth." } }, "lexicon": 1 } ``` ### org.atgrp.config https://www.atmospheregroups.org/reference/lexicons/org-atgrp-config/ ```json { "id": "org.atgrp.config", "defs": { "main": { "key": "literal:self", "type": "record", "record": { "type": "object", "required": [ "joinPolicy" ], "properties": { "joinPolicy": { "type": "string", "description": "open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy.", "knownValues": [ "open", "approval", "invite" ] } } }, "description": "The group's configuration, such as how to join. Written by the group in the meta space." } }, "lexicon": 1 } ``` ### org.atgrp.confirmation https://www.atmospheregroups.org/reference/lexicons/org-atgrp-confirmation/ ```json { "id": "org.atgrp.confirmation", "defs": { "main": { "key": "literal:self", "type": "record", "record": { "type": "object", "required": [ "createdAt" ], "properties": { "createdAt": { "type": "string", "format": "datetime" } } }, "description": "A member's confirmation of their group membership. Written by the member in the group's members space." } }, "lexicon": 1 } ``` ### org.atgrp.declaration https://www.atmospheregroups.org/reference/lexicons/org-atgrp-declaration/ ```json { "id": "org.atgrp.declaration", "defs": { "main": { "key": "literal:self", "type": "record", "record": { "type": "object", "properties": {} }, "description": "Declares an account as a group. Published in the group's public repo for discovery." } }, "lexicon": 1 } ``` ### org.atgrp.defs https://www.atmospheregroups.org/reference/lexicons/org-atgrp-defs/ ```json { "id": "org.atgrp.defs", "defs": { "joinRequest": { "type": "object", "required": [ "member", "createdAt" ], "properties": { "member": { "type": "string", "format": "did" }, "message": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "createdAt": { "type": "string", "format": "datetime" } }, "description": "A pending join request." } }, "lexicon": 1 } ``` ### org.atgrp.denyJoinRequest https://www.atmospheregroups.org/reference/lexicons/org-atgrp-denyJoinRequest/ ```json { "id": "org.atgrp.denyJoinRequest", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "member" ], "properties": { "member": { "type": "string", "format": "did" } } }, "encoding": "application/json" }, "errors": [ { "name": "JoinRequestNotFound" } ], "description": "Deny a pending join request, deleting it. To approve one, write the requester's membership instead. Requires auth as the group." } }, "lexicon": 1 } ``` ### org.atgrp.inbox https://www.atmospheregroups.org/reference/lexicons/org-atgrp-inbox/ ```json { "id": "org.atgrp.inbox", "defs": { "main": { "key": "literal:self", "type": "space", "title": "Group invites", "collections": [ "org.atgrp.invite" ], "description": "A user's inbox for group invites, under their own DID. Created with a memberspace policy that sets publicWrite, so groups may write invites here and read only their own." } }, "lexicon": 1 } ``` ### org.atgrp.invite https://www.atmospheregroups.org/reference/lexicons/org-atgrp-invite/ ```json { "id": "org.atgrp.invite", "defs": { "main": { "key": "tid", "type": "record", "record": { "type": "object", "required": [ "createdAt" ], "properties": { "message": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "createdAt": { "type": "string", "format": "datetime" }, "expiresAt": { "type": "string", "format": "datetime" } } }, "description": "An invitation to join the group, written by the group into the invitee's inbox space. Deleting it revokes the invite." } }, "lexicon": 1 } ``` ### org.atgrp.labeler https://www.atmospheregroups.org/reference/lexicons/org-atgrp-labeler/ ```json { "id": "org.atgrp.labeler", "defs": { "main": { "key": "literal:self", "type": "record", "record": { "type": "object", "required": [ "policies" ], "properties": { "policies": { "ref": "#policies", "type": "ref" }, "reasonTypes": { "type": "array", "items": { "ref": "org.atgrp.mod.defs#reasonType", "type": "ref" }, "description": "Accepted report reasons. Omit to accept all." }, "subjectTypes": { "type": "array", "items": { "type": "string", "knownValues": [ "account", "record" ] }, "description": "Accepted report subject types. Omit to accept all." }, "subjectCollections": { "type": "array", "items": { "type": "string", "format": "nsid" }, "description": "Accepted report record types. Omit to accept all." } } }, "description": "The group's label values and the reports it accepts. Written by the group in the members space." }, "policies": { "type": "object", "required": [ "labelValues" ], "properties": { "labelValues": { "type": "array", "items": { "ref": "com.atproto.label.defs#labelValue", "type": "ref" }, "description": "Label values the group applies." }, "labelValueDefinitions": { "type": "array", "items": { "ref": "com.atproto.label.defs#labelValueDefinition", "type": "ref" }, "description": "Definitions for group-defined label values." } }, "description": "The group's label values and their definitions." } }, "lexicon": 1 } ``` ### org.atgrp.leaveGroup https://www.atmospheregroups.org/reference/lexicons/org-atgrp-leaveGroup/ ```json { "id": "org.atgrp.leaveGroup", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" } } }, "encoding": "application/json" }, "errors": [ { "name": "GroupNotFound" } ], "description": "Leave a group, deleting the caller's membership, which the group authored. The caller should also delete their confirmation. Requires service auth." } }, "lexicon": 1 } ``` ### org.atgrp.listJoinRequests https://www.atmospheregroups.org/reference/lexicons/org-atgrp-listJoinRequests/ ```json { "id": "org.atgrp.listJoinRequests", "defs": { "main": { "type": "query", "errors": [ { "name": "InvalidCursor" } ], "output": { "schema": { "type": "object", "required": [ "requests" ], "properties": { "cursor": { "type": "string" }, "requests": { "type": "array", "items": { "ref": "org.atgrp.defs#joinRequest", "type": "ref" } } } }, "encoding": "application/json" }, "parameters": { "type": "params", "properties": { "limit": { "type": "integer", "default": 50, "maximum": 100, "minimum": 1 }, "cursor": { "type": "string" } } }, "description": "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." } }, "lexicon": 1 } ``` ### org.atgrp.members https://www.atmospheregroups.org/reference/lexicons/org-atgrp-members/ ```json { "id": "org.atgrp.members", "defs": { "main": { "key": "literal:self", "type": "space", "title": "Group members", "collections": [ "org.atgrp.space", "org.atgrp.role", "org.atgrp.membership", "org.atgrp.confirmation", "org.atgrp.rule", "org.atgrp.labeler", "com.atproto.label.record", "com.atproto.space.policy" ], "description": "Membership and administrative information for the group. Usually readable only by members." } }, "lexicon": 1 } ``` ### org.atgrp.membership https://www.atmospheregroups.org/reference/lexicons/org-atgrp-membership/ ```json { "id": "org.atgrp.membership", "defs": { "main": { "key": "any", "type": "record", "record": { "type": "object", "required": [ "roles", "createdAt" ], "properties": { "roles": { "type": "array", "items": { "type": "string", "format": "record-key", "description": "Role definition record key." }, "maxLength": 100 }, "createdAt": { "type": "string", "format": "datetime" } } }, "description": "A member's roles in the group, keyed by the member's DID. Written by the group in the members space, and paired with the member's confirmation." } }, "lexicon": 1 } ``` ### org.atgrp.meta https://www.atmospheregroups.org/reference/lexicons/org-atgrp-meta/ ```json { "id": "org.atgrp.meta", "defs": { "main": { "key": "literal:self", "type": "space", "title": "Group info", "collections": [ "org.atgrp.about", "org.atgrp.config", "com.atproto.label.record", "com.atproto.space.policy" ], "description": "Basic information and settings for the group. Often public, even when the rest of the group is not." } }, "lexicon": 1 } ``` ### org.atgrp.mod.defs https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-defs/ ```json { "id": "org.atgrp.mod.defs", "defs": { "tagEvent": { "type": "object", "properties": { "add": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 } }, "remove": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 } } }, "description": "A moderator added or removed tags." }, "eventView": { "type": "object", "required": [ "eventId", "createdAt", "subject", "event" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "event": { "refs": [ "#reportEvent", "#appealEvent", "#statusEvent", "#tagEvent", "#labelEvent", "#ejectEvent" ], "type": "union" }, "eventId": { "type": "string", "maxLength": 512, "minLength": 1 }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "createdAt": { "type": "string", "format": "datetime" }, "createdBy": { "type": "string", "format": "did", "description": "May be withheld to protect reporters and moderators." } }, "description": "An event in a subject's moderation history." }, "ejectEvent": { "type": "object", "properties": {}, "description": "The subject was ejected from the group." }, "labelEvent": { "type": "object", "required": [ "uri", "val" ], "properties": { "uri": { "type": "string", "format": "at-uri", "description": "The label record." }, "val": { "type": "string", "maxLength": 128, "minLength": 1 }, "deleted": { "type": "boolean", "default": false } }, "description": "A label record was written or deleted." }, "reasonNsfw": { "type": "token", "description": "Unwanted or unlabeled NSFW content." }, "reasonRude": { "type": "token", "description": "Rude, harassing, or hateful content." }, "reasonSpam": { "type": "token", "description": "Spam or unwanted promotion." }, "reasonType": { "type": "string", "knownValues": [ "org.atgrp.mod.defs#reasonSpam", "org.atgrp.mod.defs#reasonViolation", "org.atgrp.mod.defs#reasonMisleading", "org.atgrp.mod.defs#reasonNsfw", "org.atgrp.mod.defs#reasonRude", "org.atgrp.mod.defs#reasonOther" ] }, "appealEvent": { "type": "object", "properties": { "note": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 } }, "description": "An appeal was filed." }, "reasonOther": { "type": "token", "description": "Anything else." }, "reportEvent": { "type": "object", "required": [ "reasonType" ], "properties": { "rule": { "type": "string", "format": "at-uri" }, "reason": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "reasonType": { "ref": "#reasonType", "type": "ref" } }, "description": "A report was filed." }, "statusEvent": { "type": "object", "required": [ "status" ], "properties": { "note": { "type": "string", "maxLength": 20000, "description": "Only visible to moderators.", "maxGraphemes": 2000 }, "status": { "enum": [ "open", "resolved" ], "type": "string", "description": "The status after this event." } }, "description": "A moderator changed the subject's status or added a note." }, "subjectView": { "type": "object", "required": [ "subject", "status", "createdAt", "updatedAt" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "tags": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 }, "description": "Free-form moderator tags in label value syntax ([a-z-]+)." }, "status": { "enum": [ "open", "resolved" ], "type": "string" }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "createdAt": { "type": "string", "format": "datetime" }, "updatedAt": { "type": "string", "format": "datetime" }, "reportCount": { "type": "integer", "minimum": 0 } }, "description": "A subject in the moderation queue." }, "reasonViolation": { "type": "token", "description": "Breaks a group rule." }, "reasonMisleading": { "type": "token", "description": "Misleading content, impersonation, or scams." } }, "lexicon": 1 } ``` ### org.atgrp.mod.querySelfHistory https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-querySelfHistory/ ```json { "id": "org.atgrp.mod.querySelfHistory", "defs": { "main": { "type": "query", "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't the caller's account or record." }, { "name": "InvalidCursor" } ], "output": { "schema": { "type": "object", "required": [ "events" ], "properties": { "cursor": { "type": "string" }, "events": { "type": "array", "items": { "ref": "org.atgrp.mod.defs#eventView", "type": "ref" } } } }, "encoding": "application/json" }, "parameters": { "type": "params", "required": [ "group" ], "properties": { "sort": { "type": "string", "default": "newest", "knownValues": [ "newest", "oldest" ] }, "group": { "type": "string", "format": "did" }, "limit": { "type": "integer", "default": 50, "maximum": 100, "minimum": 1 }, "cursor": { "type": "string" }, "subject": { "type": "string", "format": "uri", "description": "The caller's DID or one of their record URIs. Omit for all." } } }, "description": "Get moderation history for the caller's account and records. Omits reports, notes, tags, and who acted. Works for former members. Requires service auth." } }, "lexicon": 1 } ``` ### org.atgrp.mod.querySubjectHistory https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-querySubjectHistory/ ```json { "id": "org.atgrp.mod.querySubjectHistory", "defs": { "main": { "type": "query", "errors": [ { "name": "InvalidSubject", "description": "The subject isn't in this group." }, { "name": "InvalidCursor" } ], "output": { "schema": { "type": "object", "required": [ "events" ], "properties": { "cursor": { "type": "string" }, "events": { "type": "array", "items": { "ref": "org.atgrp.mod.defs#eventView", "type": "ref" } } } }, "encoding": "application/json" }, "parameters": { "type": "params", "required": [ "subject" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "If set, only this version of the record." }, "sort": { "type": "string", "default": "newest", "knownValues": [ "newest", "oldest" ] }, "limit": { "type": "integer", "default": 50, "maximum": 100, "minimum": 1 }, "cursor": { "type": "string" }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." } } }, "description": "Get a subject's moderation history. Requires auth as the group." } }, "lexicon": 1 } ``` ### org.atgrp.mod.querySubjects https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-querySubjects/ ```json { "id": "org.atgrp.mod.querySubjects", "defs": { "main": { "type": "query", "errors": [ { "name": "InvalidCursor" } ], "output": { "schema": { "type": "object", "required": [ "subjects" ], "properties": { "cursor": { "type": "string" }, "subjects": { "type": "array", "items": { "ref": "org.atgrp.mod.defs#subjectView", "type": "ref" } } } }, "encoding": "application/json" }, "parameters": { "type": "params", "properties": { "sort": { "type": "string", "default": "oldest", "description": "oldest and newest go by createdAt. updated puts the latest updatedAt first.", "knownValues": [ "oldest", "newest", "updated" ] }, "tags": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 }, "maxLength": 25, "description": "Only subjects with any of these tags." }, "limit": { "type": "integer", "default": 50, "maximum": 100, "minimum": 1 }, "cursor": { "type": "string" }, "status": { "enum": [ "open", "resolved" ], "type": "string", "description": "Omit for all." } } }, "description": "List subjects in the moderation queue. Requires auth as the group." } }, "lexicon": 1 } ``` ### org.atgrp.mod.submitAppeal https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-submitAppeal/ ```json { "id": "org.atgrp.mod.submitAppeal", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "group", "subject" ], "properties": { "note": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "group": { "type": "string", "format": "did" }, "subject": { "type": "string", "format": "uri", "description": "The caller's DID or one of their record URIs." } } }, "encoding": "application/json" }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't the caller's account or record." }, { "name": "NotAppealable", "description": "The subject has no label or ejection." } ], "output": { "schema": { "type": "object", "required": [ "eventId", "createdAt" ], "properties": { "eventId": { "type": "string", "maxLength": 512, "minLength": 1 }, "createdAt": { "type": "string", "format": "datetime" } } }, "encoding": "application/json" }, "description": "Appeal a label or ejection on the caller's account or one of their records, reopening it in the moderation queue. Works for former members. Requires service auth." } }, "lexicon": 1 } ``` ### org.atgrp.mod.submitReport https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-submitReport/ ```json { "id": "org.atgrp.mod.submitReport", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "group", "subject", "reasonType" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "rule": { "type": "string", "format": "at-uri", "description": "The group rule the subject breaks." }, "group": { "type": "string", "format": "did" }, "reason": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "reasonType": { "ref": "org.atgrp.mod.defs#reasonType", "type": "ref", "description": "For reasonViolation, cite the broken rule in rule." } } }, "encoding": "application/json" }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't in this group." } ], "output": { "schema": { "type": "object", "required": [ "eventId", "createdAt" ], "properties": { "eventId": { "type": "string", "maxLength": 512, "minLength": 1 }, "createdAt": { "type": "string", "format": "datetime" } } }, "encoding": "application/json" }, "description": "Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth." } }, "lexicon": 1 } ``` ### org.atgrp.mod.updateSubject https://www.atmospheregroups.org/reference/lexicons/org-atgrp-mod-updateSubject/ ```json { "id": "org.atgrp.mod.updateSubject", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "subject" ], "properties": { "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "note": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "status": { "enum": [ "open", "resolved" ], "type": "string" }, "addTags": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 }, "maxLength": 25, "description": "Tags follow label value syntax ([a-z-]+)." }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "removeTags": { "type": "array", "items": { "type": "string", "maxLength": 128, "minLength": 1 }, "maxLength": 25 } } }, "encoding": "application/json" }, "errors": [ { "name": "InvalidSubject", "description": "The subject isn't in this group." }, { "name": "SubjectNotFound", "description": "The subject has never been reported." } ], "output": { "schema": { "ref": "org.atgrp.mod.defs#subjectView", "type": "ref" }, "encoding": "application/json" }, "description": "Change a subject's status or tags, or add a note. Omitted fields are left as they are. Requires auth as the group." } }, "lexicon": 1 } ``` ### org.atgrp.policy https://www.atmospheregroups.org/reference/lexicons/org-atgrp-policy/ ```json { "id": "org.atgrp.policy", "defs": { "main": { "type": "object", "required": [ "grants" ], "properties": { "grants": { "type": "array", "items": { "ref": "#grant", "type": "ref" }, "maxLength": 100, "description": "At most one entry per role." }, "unlisted": { "type": "boolean", "default": false, "description": "If true, the host leaves the space out of the group's space index. Ignored for the meta and members spaces." }, "publicRead": { "type": "boolean", "default": false, "description": "If true, anyone may read the space." } }, "description": "Space policy for group spaces: each role's access and permissions in the space, whether it is public, and whether it is listed in the space index. The host always publishes it in the space as a com.atproto.space.policy record." }, "grant": { "type": "object", "required": [ "role" ], "properties": { "read": { "type": "boolean", "default": false, "description": "If true, members with this role may read the space." }, "role": { "type": "string", "format": "record-key", "description": "A role record's key." }, "write": { "type": "boolean", "default": false, "description": "If true, members with this role are in the space's writer set, so their own records sync to readers." }, "permissions": { "type": "array", "items": { "type": "string", "maxLength": 2000, "minLength": 1 }, "maxLength": 100, "description": "Permissions for acting as the group in this space, one per item." } }, "description": "A role's grants in one space. read and write apply to members acting as themselves; permissions apply to acting as the group." } }, "lexicon": 1 } ``` ### org.atgrp.requestJoin https://www.atmospheregroups.org/reference/lexicons/org-atgrp-requestJoin/ ```json { "id": "org.atgrp.requestJoin", "defs": { "main": { "type": "procedure", "input": { "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" }, "invite": { "type": "string", "format": "at-uri", "description": "An invite in the caller's inbox space." }, "message": { "type": "string", "maxLength": 20000, "description": "Shown to the group with the request.", "maxGraphemes": 2000 } } }, "encoding": "application/json" }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidInvite" }, { "name": "JoinClosed", "description": "The group is invite-only." } ], "output": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "knownValues": [ "pending", "admitted" ] }, "request": { "ref": "org.atgrp.defs#joinRequest", "type": "ref", "description": "Present when pending." }, "membership": { "ref": "com.atproto.repo.strongRef#main", "type": "ref", "description": "Present when admitted." } } }, "encoding": "application/json" }, "description": "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." } }, "lexicon": 1 } ``` ### org.atgrp.role https://www.atmospheregroups.org/reference/lexicons/org-atgrp-role/ ```json { "id": "org.atgrp.role", "defs": { "main": { "key": "any", "type": "record", "record": { "type": "object", "properties": { "default": { "type": "boolean", "default": false, "description": "If true, granted to members admitted through requestJoin." }, "canAssign": { "type": "array", "items": { "type": "string", "maxLength": 512, "minLength": 1 }, "maxLength": 100, "description": "Keys of roles this role may assign, or * for every role." }, "description": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "displayName": { "type": "string", "maxLength": 640, "description": "Defaults to the role ID.", "maxGraphemes": 64 }, "permissions": { "type": "array", "items": { "type": "string", "maxLength": 2000, "minLength": 1 }, "maxLength": 100, "description": "Group-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants." } } }, "description": "A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy." } }, "lexicon": 1 } ``` ### org.atgrp.rule https://www.atmospheregroups.org/reference/lexicons/org-atgrp-rule/ ```json { "id": "org.atgrp.rule", "defs": { "main": { "key": "tid", "type": "record", "record": { "type": "object", "required": [ "title", "text" ], "properties": { "text": { "type": "string", "maxLength": 20000, "maxGraphemes": 2000 }, "order": { "type": "integer", "minimum": 0, "description": "Display order, ascending." }, "title": { "type": "string", "maxLength": 640, "maxGraphemes": 64 } } }, "description": "A group rule, written by the group in the members space. Reports can cite it by URI." } }, "lexicon": 1 } ``` ### org.atgrp.space https://www.atmospheregroups.org/reference/lexicons/org-atgrp-space/ ```json { "id": "org.atgrp.space", "defs": { "main": { "key": "tid", "type": "record", "record": { "type": "object", "required": [ "space", "createdAt" ], "properties": { "space": { "type": "string", "format": "space-ref" }, "createdAt": { "type": "string", "format": "datetime" } } }, "description": "An entry in the group's space index, in the members space. The group host maintains these records as spaces are created, deleted, or unlisted, and rejects direct writes." } }, "lexicon": 1 } ``` ## The spec's schemas Every schema the spec defines, exactly as it is in the spec's repository. The ones published under the same names above may differ from them. ### org.atgrp.about https://www.atmospheregroups.org/spec/lexicons/org-atgrp-about/ ```json { "lexicon": 1, "id": "org.atgrp.about", "defs": { "main": { "type": "record", "description": "Basic information for presenting the group. Written by the group in the meta space.", "key": "literal:self", "record": { "type": "object", "required": [ "displayName" ], "properties": { "displayName": { "type": "string", "maxGraphemes": 64, "maxLength": 640 }, "description": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "avatar": { "type": "blob", "accept": [ "image/png", "image/jpeg", "image/webp" ], "maxSize": 2000000 }, "website": { "type": "string", "format": "uri", "description": "Group website. Must be http or https." } } } } } } ``` ### org.atgrp.authManageAdmin https://www.atmospheregroups.org/spec/lexicons/org-atgrp-authManageAdmin/ ```json { "lexicon": 1, "id": "org.atgrp.authManageAdmin", "defs": { "main": { "type": "permission-set", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "title": "Group administration", "detail": "Manage everything in the group's info and member list, including its roles and what each role can do.", "permissions": [ { "type": "permission", "resource": "space", "spaceType": "org.atgrp.meta", "authority": "self", "skey": "self", "collection": [ "org.atgrp.about", "org.atgrp.config", "com.atproto.label.record" ], "action": [ "read", "create", "update", "delete" ], "manage": [ "update" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "self", "skey": "self", "collection": [ "org.atgrp.rule", "org.atgrp.labeler", "org.atgrp.role", "org.atgrp.membership", "com.atproto.label.record" ], "action": [ "read", "create", "update", "delete" ], "manage": [ "update" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.inbox", "authority": "*", "skey": "self", "collection": [ "org.atgrp.invite" ], "action": [ "read_self", "create", "update", "delete" ] }, { "type": "permission", "resource": "rpc", "aud": "*", "lxm": [ "org.atgrp.listJoinRequests", "org.atgrp.denyJoinRequest", "org.atgrp.mod.querySubjects", "org.atgrp.mod.querySubjectHistory", "org.atgrp.mod.updateSubject" ] } ] } } } ``` ### org.atgrp.authManageBasic https://www.atmospheregroups.org/spec/lexicons/org-atgrp-authManageBasic/ ```json { "lexicon": 1, "id": "org.atgrp.authManageBasic", "defs": { "main": { "type": "permission-set", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "title": "Group profile", "detail": "Edit the group's profile and rules.", "permissions": [ { "type": "permission", "resource": "space", "spaceType": "org.atgrp.meta", "authority": "self", "skey": "self", "collection": [ "org.atgrp.about" ], "action": [ "read", "create", "update", "delete" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "self", "skey": "self", "collection": [ "org.atgrp.rule" ], "action": [ "read", "create", "update", "delete" ] } ] } } } ``` ### org.atgrp.authManageMembers https://www.atmospheregroups.org/spec/lexicons/org-atgrp-authManageMembers/ ```json { "lexicon": 1, "id": "org.atgrp.authManageMembers", "defs": { "main": { "type": "permission-set", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "title": "Group members", "detail": "Manage the group's members, their roles, and invites.", "permissions": [ { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "self", "skey": "self", "collection": [ "org.atgrp.membership" ], "action": [ "read", "create", "update", "delete" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.inbox", "authority": "*", "skey": "self", "collection": [ "org.atgrp.invite" ], "action": [ "read_self", "create", "update", "delete" ] }, { "type": "permission", "resource": "rpc", "aud": "*", "lxm": [ "org.atgrp.listJoinRequests", "org.atgrp.denyJoinRequest" ] } ] } } } ``` ### org.atgrp.authModerate https://www.atmospheregroups.org/spec/lexicons/org-atgrp-authModerate/ ```json { "lexicon": 1, "id": "org.atgrp.authModerate", "defs": { "main": { "type": "permission-set", "description": "For group account sessions. Limited to what the authorizing user's roles grant.", "title": "Group moderation", "detail": "Label content, remove members, and review reports.", "permissions": [ { "type": "permission", "resource": "space", "spaceType": "org.atgrp.meta", "authority": "self", "skey": "self", "collection": [ "com.atproto.label.record" ], "action": [ "read", "create", "update", "delete" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "self", "skey": "self", "collection": [ "com.atproto.label.record" ], "action": [ "read", "create", "update", "delete" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "self", "skey": "self", "collection": [ "org.atgrp.membership" ], "action": [ "read", "delete" ] }, { "type": "permission", "resource": "rpc", "aud": "*", "lxm": [ "org.atgrp.mod.querySubjects", "org.atgrp.mod.querySubjectHistory", "org.atgrp.mod.updateSubject" ] } ] } } } ``` ### org.atgrp.authParticipate https://www.atmospheregroups.org/spec/lexicons/org-atgrp-authParticipate/ ```json { "lexicon": 1, "id": "org.atgrp.authParticipate", "defs": { "main": { "type": "permission-set", "description": "For personal sessions, acting as the user rather than the group.", "title": "Groups", "detail": "View and interact with your groups.", "permissions": [ { "type": "permission", "resource": "space", "spaceType": "org.atgrp.meta", "authority": "*", "skey": "self", "action": [ "read" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.members", "authority": "*", "skey": "self", "collection": [ "org.atgrp.confirmation" ], "action": [ "read", "create", "update", "delete" ] }, { "type": "permission", "resource": "space", "spaceType": "org.atgrp.inbox", "authority": "self", "skey": "self", "action": [ "read" ], "manage": [ "create" ] }, { "type": "permission", "resource": "rpc", "aud": "*", "lxm": [ "org.atgrp.requestJoin", "org.atgrp.cancelJoinRequest", "org.atgrp.leaveGroup", "org.atgrp.mod.submitReport", "org.atgrp.mod.submitAppeal", "org.atgrp.mod.querySelfHistory" ] } ] } } } ``` ### org.atgrp.cancelJoinRequest https://www.atmospheregroups.org/spec/lexicons/org-atgrp-cancelJoinRequest/ ```json { "lexicon": 1, "id": "org.atgrp.cancelJoinRequest", "defs": { "main": { "type": "procedure", "description": "Withdraw the caller's pending join request. Requires service auth.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" } } } }, "errors": [ { "name": "GroupNotFound" }, { "name": "JoinRequestNotFound" } ] } } } ``` ### org.atgrp.config https://www.atmospheregroups.org/spec/lexicons/org-atgrp-config/ ```json { "lexicon": 1, "id": "org.atgrp.config", "defs": { "main": { "type": "record", "description": "The group's configuration, such as how to join. Written by the group in the meta space.", "key": "literal:self", "record": { "type": "object", "required": [ "joinPolicy" ], "properties": { "joinPolicy": { "type": "string", "knownValues": [ "open", "approval", "invite" ], "description": "open admits anyone; approval queues a join request; invite requires an invitation. An invitation admits its recipient under any policy." } } } } } } ``` ### org.atgrp.confirmation https://www.atmospheregroups.org/spec/lexicons/org-atgrp-confirmation/ ```json { "lexicon": 1, "id": "org.atgrp.confirmation", "defs": { "main": { "type": "record", "description": "A member's confirmation of their group membership. Written by the member in the group's members space.", "key": "literal:self", "record": { "type": "object", "required": [ "createdAt" ], "properties": { "createdAt": { "type": "string", "format": "datetime" } } } } } } ``` ### org.atgrp.declaration https://www.atmospheregroups.org/spec/lexicons/org-atgrp-declaration/ ```json { "lexicon": 1, "id": "org.atgrp.declaration", "defs": { "main": { "type": "record", "description": "Declares an account as a group. Published in the group's public repo for discovery.", "key": "literal:self", "record": { "type": "object", "properties": {} } } } } ``` ### org.atgrp.defs https://www.atmospheregroups.org/spec/lexicons/org-atgrp-defs/ ```json { "lexicon": 1, "id": "org.atgrp.defs", "defs": { "joinRequest": { "type": "object", "description": "A pending join request.", "required": [ "member", "createdAt" ], "properties": { "member": { "type": "string", "format": "did" }, "createdAt": { "type": "string", "format": "datetime" }, "message": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 } } } } } ``` ### org.atgrp.denyJoinRequest https://www.atmospheregroups.org/spec/lexicons/org-atgrp-denyJoinRequest/ ```json { "lexicon": 1, "id": "org.atgrp.denyJoinRequest", "defs": { "main": { "type": "procedure", "description": "Deny a pending join request, deleting it. To approve one, write the requester's membership instead. Requires auth as the group.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "member" ], "properties": { "member": { "type": "string", "format": "did" } } } }, "errors": [ { "name": "JoinRequestNotFound" } ] } } } ``` ### org.atgrp.inbox https://www.atmospheregroups.org/spec/lexicons/org-atgrp-inbox/ ```json { "lexicon": 1, "id": "org.atgrp.inbox", "defs": { "main": { "type": "space", "description": "A user's inbox for group invites, under their own DID. Created with a memberspace policy that sets publicWrite, so groups may write invites here and read only their own.", "key": "literal:self", "title": "Group invites", "collections": [ "org.atgrp.invite" ] } } } ``` ### org.atgrp.invite https://www.atmospheregroups.org/spec/lexicons/org-atgrp-invite/ ```json { "lexicon": 1, "id": "org.atgrp.invite", "defs": { "main": { "type": "record", "description": "An invitation to join the group, written by the group into the invitee's inbox space. Deleting it revokes the invite.", "key": "tid", "record": { "type": "object", "required": [ "createdAt" ], "properties": { "createdAt": { "type": "string", "format": "datetime" }, "expiresAt": { "type": "string", "format": "datetime" }, "message": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 } } } } } } ``` ### org.atgrp.labeler https://www.atmospheregroups.org/spec/lexicons/org-atgrp-labeler/ ```json { "lexicon": 1, "id": "org.atgrp.labeler", "defs": { "main": { "type": "record", "description": "The group's label values and the reports it accepts. Written by the group in the members space.", "key": "literal:self", "record": { "type": "object", "required": [ "policies" ], "properties": { "policies": { "type": "ref", "ref": "#policies" }, "reasonTypes": { "type": "array", "description": "Accepted report reasons. Omit to accept all.", "items": { "type": "ref", "ref": "org.atgrp.mod.defs#reasonType" } }, "subjectTypes": { "type": "array", "description": "Accepted report subject types. Omit to accept all.", "items": { "type": "string", "knownValues": [ "account", "record" ] } }, "subjectCollections": { "type": "array", "description": "Accepted report record types. Omit to accept all.", "items": { "type": "string", "format": "nsid" } } } } }, "policies": { "type": "object", "description": "The group's label values and their definitions.", "required": [ "labelValues" ], "properties": { "labelValues": { "type": "array", "description": "Label values the group applies.", "items": { "type": "ref", "ref": "com.atproto.label.defs#labelValue" } }, "labelValueDefinitions": { "type": "array", "description": "Definitions for group-defined label values.", "items": { "type": "ref", "ref": "com.atproto.label.defs#labelValueDefinition" } } } } } } ``` ### org.atgrp.leaveGroup https://www.atmospheregroups.org/spec/lexicons/org-atgrp-leaveGroup/ ```json { "lexicon": 1, "id": "org.atgrp.leaveGroup", "defs": { "main": { "type": "procedure", "description": "Leave a group, deleting the caller's membership, which the group authored. The caller should also delete their confirmation. Requires service auth.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" } } } }, "errors": [ { "name": "GroupNotFound" } ] } } } ``` ### org.atgrp.listJoinRequests https://www.atmospheregroups.org/spec/lexicons/org-atgrp-listJoinRequests/ ```json { "lexicon": 1, "id": "org.atgrp.listJoinRequests", "defs": { "main": { "type": "query", "description": "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": { "type": "params", "properties": { "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }, "cursor": { "type": "string" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "requests" ], "properties": { "cursor": { "type": "string" }, "requests": { "type": "array", "items": { "type": "ref", "ref": "org.atgrp.defs#joinRequest" } } } } }, "errors": [ { "name": "InvalidCursor" } ] } } } ``` ### org.atgrp.members https://www.atmospheregroups.org/spec/lexicons/org-atgrp-members/ ```json { "lexicon": 1, "id": "org.atgrp.members", "defs": { "main": { "type": "space", "description": "Membership and administrative information for the group. Usually readable only by members.", "key": "literal:self", "title": "Group members", "collections": [ "org.atgrp.space", "org.atgrp.role", "org.atgrp.membership", "org.atgrp.confirmation", "org.atgrp.rule", "org.atgrp.labeler", "com.atproto.label.record", "com.atproto.space.policy" ] } } } ``` ### org.atgrp.membership https://www.atmospheregroups.org/spec/lexicons/org-atgrp-membership/ ```json { "lexicon": 1, "id": "org.atgrp.membership", "defs": { "main": { "type": "record", "description": "A member's roles in the group, keyed by the member's DID. Written by the group in the members space, and paired with the member's confirmation.", "key": "any", "record": { "type": "object", "required": [ "roles", "createdAt" ], "properties": { "roles": { "type": "array", "maxLength": 100, "items": { "type": "string", "format": "record-key", "description": "Role definition record key." } }, "createdAt": { "type": "string", "format": "datetime" } } } } } } ``` ### org.atgrp.meta https://www.atmospheregroups.org/spec/lexicons/org-atgrp-meta/ ```json { "lexicon": 1, "id": "org.atgrp.meta", "defs": { "main": { "type": "space", "description": "Basic information and settings for the group. Often public, even when the rest of the group is not.", "key": "literal:self", "title": "Group info", "collections": [ "org.atgrp.about", "org.atgrp.config", "com.atproto.label.record", "com.atproto.space.policy" ] } } } ``` ### org.atgrp.mod.defs https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-defs/ ```json { "lexicon": 1, "id": "org.atgrp.mod.defs", "defs": { "reasonType": { "type": "string", "knownValues": [ "org.atgrp.mod.defs#reasonSpam", "org.atgrp.mod.defs#reasonViolation", "org.atgrp.mod.defs#reasonMisleading", "org.atgrp.mod.defs#reasonNsfw", "org.atgrp.mod.defs#reasonRude", "org.atgrp.mod.defs#reasonOther" ] }, "reasonSpam": { "type": "token", "description": "Spam or unwanted promotion." }, "reasonViolation": { "type": "token", "description": "Breaks a group rule." }, "reasonMisleading": { "type": "token", "description": "Misleading content, impersonation, or scams." }, "reasonNsfw": { "type": "token", "description": "Unwanted or unlabeled NSFW content." }, "reasonRude": { "type": "token", "description": "Rude, harassing, or hateful content." }, "reasonOther": { "type": "token", "description": "Anything else." }, "subjectView": { "type": "object", "description": "A subject in the moderation queue.", "required": [ "subject", "status", "createdAt", "updatedAt" ], "properties": { "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "status": { "type": "string", "enum": [ "open", "resolved" ] }, "createdAt": { "type": "string", "format": "datetime" }, "updatedAt": { "type": "string", "format": "datetime" }, "reportCount": { "type": "integer", "minimum": 0 }, "tags": { "type": "array", "description": "Free-form moderator tags in label value syntax ([a-z-]+).", "items": { "type": "string", "minLength": 1, "maxLength": 128 } } } }, "eventView": { "type": "object", "description": "An event in a subject's moderation history.", "required": [ "eventId", "createdAt", "subject", "event" ], "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 512 }, "createdAt": { "type": "string", "format": "datetime" }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "createdBy": { "type": "string", "format": "did", "description": "May be withheld to protect reporters and moderators." }, "event": { "type": "union", "refs": [ "#reportEvent", "#appealEvent", "#statusEvent", "#tagEvent", "#labelEvent", "#ejectEvent" ] } } }, "reportEvent": { "type": "object", "description": "A report was filed.", "required": [ "reasonType" ], "properties": { "reasonType": { "type": "ref", "ref": "#reasonType" }, "reason": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "rule": { "type": "string", "format": "at-uri" } } }, "appealEvent": { "type": "object", "description": "An appeal was filed.", "properties": { "note": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 } } }, "statusEvent": { "type": "object", "description": "A moderator changed the subject's status or added a note.", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "open", "resolved" ], "description": "The status after this event." }, "note": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000, "description": "Only visible to moderators." } } }, "tagEvent": { "type": "object", "description": "A moderator added or removed tags.", "properties": { "add": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 128 } }, "remove": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 128 } } } }, "labelEvent": { "type": "object", "description": "A label record was written or deleted.", "required": [ "uri", "val" ], "properties": { "uri": { "type": "string", "format": "at-uri", "description": "The label record." }, "val": { "type": "string", "minLength": 1, "maxLength": 128 }, "deleted": { "type": "boolean", "default": false } } }, "ejectEvent": { "type": "object", "description": "The subject was ejected from the group.", "properties": {} } } } ``` ### org.atgrp.mod.querySelfHistory https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-querySelfHistory/ ```json { "lexicon": 1, "id": "org.atgrp.mod.querySelfHistory", "defs": { "main": { "type": "query", "description": "Get moderation history for the caller's account and records. Omits reports, notes, tags, and who acted. Works for former members. Requires service auth.", "parameters": { "type": "params", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" }, "subject": { "type": "string", "format": "uri", "description": "The caller's DID or one of their record URIs. Omit for all." }, "sort": { "type": "string", "knownValues": [ "newest", "oldest" ], "default": "newest" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }, "cursor": { "type": "string" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "events" ], "properties": { "cursor": { "type": "string" }, "events": { "type": "array", "items": { "type": "ref", "ref": "org.atgrp.mod.defs#eventView" } } } } }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't the caller's account or record." }, { "name": "InvalidCursor" } ] } } } ``` ### org.atgrp.mod.querySubjectHistory https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-querySubjectHistory/ ```json { "lexicon": 1, "id": "org.atgrp.mod.querySubjectHistory", "defs": { "main": { "type": "query", "description": "Get a subject's moderation history. Requires auth as the group.", "parameters": { "type": "params", "required": [ "subject" ], "properties": { "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "cid": { "type": "string", "format": "cid", "description": "If set, only this version of the record." }, "sort": { "type": "string", "knownValues": [ "newest", "oldest" ], "default": "newest" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }, "cursor": { "type": "string" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "events" ], "properties": { "cursor": { "type": "string" }, "events": { "type": "array", "items": { "type": "ref", "ref": "org.atgrp.mod.defs#eventView" } } } } }, "errors": [ { "name": "InvalidSubject", "description": "The subject isn't in this group." }, { "name": "InvalidCursor" } ] } } } ``` ### org.atgrp.mod.querySubjects https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-querySubjects/ ```json { "lexicon": 1, "id": "org.atgrp.mod.querySubjects", "defs": { "main": { "type": "query", "description": "List subjects in the moderation queue. Requires auth as the group.", "parameters": { "type": "params", "properties": { "status": { "type": "string", "enum": [ "open", "resolved" ], "description": "Omit for all." }, "tags": { "type": "array", "maxLength": 25, "description": "Only subjects with any of these tags.", "items": { "type": "string", "minLength": 1, "maxLength": 128 } }, "sort": { "type": "string", "knownValues": [ "oldest", "newest", "updated" ], "default": "oldest", "description": "oldest and newest go by createdAt. updated puts the latest updatedAt first." }, "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 50 }, "cursor": { "type": "string" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "subjects" ], "properties": { "cursor": { "type": "string" }, "subjects": { "type": "array", "items": { "type": "ref", "ref": "org.atgrp.mod.defs#subjectView" } } } } }, "errors": [ { "name": "InvalidCursor" } ] } } } ``` ### org.atgrp.mod.submitAppeal https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-submitAppeal/ ```json { "lexicon": 1, "id": "org.atgrp.mod.submitAppeal", "defs": { "main": { "type": "procedure", "description": "Appeal a label or ejection on the caller's account or one of their records, reopening it in the moderation queue. Works for former members. Requires service auth.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "group", "subject" ], "properties": { "group": { "type": "string", "format": "did" }, "subject": { "type": "string", "format": "uri", "description": "The caller's DID or one of their record URIs." }, "note": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "eventId", "createdAt" ], "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 512 }, "createdAt": { "type": "string", "format": "datetime" } } } }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't the caller's account or record." }, { "name": "NotAppealable", "description": "The subject has no label or ejection." } ] } } } ``` ### org.atgrp.mod.submitReport https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-submitReport/ ```json { "lexicon": 1, "id": "org.atgrp.mod.submitReport", "defs": { "main": { "type": "procedure", "description": "Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "group", "subject", "reasonType" ], "properties": { "group": { "type": "string", "format": "did" }, "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "reasonType": { "type": "ref", "ref": "org.atgrp.mod.defs#reasonType", "description": "For reasonViolation, cite the broken rule in rule." }, "reason": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "rule": { "type": "string", "format": "at-uri", "description": "The group rule the subject breaks." } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "eventId", "createdAt" ], "properties": { "eventId": { "type": "string", "minLength": 1, "maxLength": 512 }, "createdAt": { "type": "string", "format": "datetime" } } } }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidSubject", "description": "The subject isn't in this group." } ] } } } ``` ### org.atgrp.mod.updateSubject https://www.atmospheregroups.org/spec/lexicons/org-atgrp-mod-updateSubject/ ```json { "lexicon": 1, "id": "org.atgrp.mod.updateSubject", "defs": { "main": { "type": "procedure", "description": "Change a subject's status or tags, or add a note. Omitted fields are left as they are. Requires auth as the group.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "subject" ], "properties": { "subject": { "type": "string", "format": "uri", "description": "An account DID or record URI." }, "cid": { "type": "string", "format": "cid", "description": "If set, a specific version of the record." }, "status": { "type": "string", "enum": [ "open", "resolved" ] }, "note": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "addTags": { "type": "array", "maxLength": 25, "description": "Tags follow label value syntax ([a-z-]+).", "items": { "type": "string", "minLength": 1, "maxLength": 128 } }, "removeTags": { "type": "array", "maxLength": 25, "items": { "type": "string", "minLength": 1, "maxLength": 128 } } } } }, "output": { "encoding": "application/json", "schema": { "type": "ref", "ref": "org.atgrp.mod.defs#subjectView" } }, "errors": [ { "name": "InvalidSubject", "description": "The subject isn't in this group." }, { "name": "SubjectNotFound", "description": "The subject has never been reported." } ] } } } ``` ### org.atgrp.policy https://www.atmospheregroups.org/spec/lexicons/org-atgrp-policy/ ```json { "lexicon": 1, "id": "org.atgrp.policy", "defs": { "main": { "type": "object", "description": "Space policy for group spaces: each role's access and permissions in the space, whether it is public, and whether it is listed in the space index. The host always publishes it in the space as a com.atproto.space.policy record.", "required": [ "grants" ], "properties": { "publicRead": { "type": "boolean", "default": false, "description": "If true, anyone may read the space." }, "unlisted": { "type": "boolean", "default": false, "description": "If true, the host leaves the space out of the group's space index. Ignored for the meta and members spaces." }, "grants": { "type": "array", "maxLength": 100, "description": "At most one entry per role.", "items": { "type": "ref", "ref": "#grant" } } } }, "grant": { "type": "object", "description": "A role's grants in one space. read and write apply to members acting as themselves; permissions apply to acting as the group.", "required": [ "role" ], "properties": { "role": { "type": "string", "format": "record-key", "description": "A role record's key." }, "read": { "type": "boolean", "default": false, "description": "If true, members with this role may read the space." }, "write": { "type": "boolean", "default": false, "description": "If true, members with this role are in the space's writer set, so their own records sync to readers." }, "permissions": { "type": "array", "maxLength": 100, "description": "Permissions for acting as the group in this space, one per item.", "items": { "type": "string", "minLength": 1, "maxLength": 2000 } } } } } } ``` ### org.atgrp.requestJoin https://www.atmospheregroups.org/spec/lexicons/org-atgrp-requestJoin/ ```json { "lexicon": 1, "id": "org.atgrp.requestJoin", "defs": { "main": { "type": "procedure", "description": "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": { "encoding": "application/json", "schema": { "type": "object", "required": [ "group" ], "properties": { "group": { "type": "string", "format": "did" }, "invite": { "type": "string", "format": "at-uri", "description": "An invite in the caller's inbox space." }, "message": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000, "description": "Shown to the group with the request." } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "knownValues": [ "pending", "admitted" ] }, "request": { "type": "ref", "ref": "org.atgrp.defs#joinRequest", "description": "Present when pending." }, "membership": { "type": "ref", "ref": "com.atproto.repo.strongRef#main", "description": "Present when admitted." } } } }, "errors": [ { "name": "GroupNotFound" }, { "name": "InvalidInvite" }, { "name": "JoinClosed", "description": "The group is invite-only." } ] } } } ``` ### org.atgrp.role https://www.atmospheregroups.org/spec/lexicons/org-atgrp-role/ ```json { "lexicon": 1, "id": "org.atgrp.role", "defs": { "main": { "type": "record", "description": "A group role and its group-wide grants, keyed by role ID. Role IDs follow label value syntax ([a-z-]+) and are at least 3 characters. Written by the group in the members space. Grants within a space live in that space's policy.", "key": "any", "record": { "type": "object", "properties": { "displayName": { "type": "string", "maxGraphemes": 64, "maxLength": 640, "description": "Defaults to the role ID." }, "description": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "default": { "type": "boolean", "default": false, "description": "If true, granted to members admitted through requestJoin." }, "permissions": { "type": "array", "maxLength": 100, "description": "Group-wide permissions, one per item. For permissions not tied to one space, such as manage=create, rpc: permissions, and space:* grants.", "items": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "canAssign": { "type": "array", "maxLength": 100, "description": "Keys of roles this role may assign, or * for every role.", "items": { "type": "string", "minLength": 1, "maxLength": 512 } } } } } } } ``` ### org.atgrp.rule https://www.atmospheregroups.org/spec/lexicons/org-atgrp-rule/ ```json { "lexicon": 1, "id": "org.atgrp.rule", "defs": { "main": { "type": "record", "description": "A group rule, written by the group in the members space. Reports can cite it by URI.", "key": "tid", "record": { "type": "object", "required": [ "title", "text" ], "properties": { "title": { "type": "string", "maxGraphemes": 64, "maxLength": 640 }, "text": { "type": "string", "maxGraphemes": 2000, "maxLength": 20000 }, "order": { "type": "integer", "minimum": 0, "description": "Display order, ascending." } } } } } } ``` ### org.atgrp.space https://www.atmospheregroups.org/spec/lexicons/org-atgrp-space/ ```json { "lexicon": 1, "id": "org.atgrp.space", "defs": { "main": { "type": "record", "description": "An entry in the group's space index, in the members space. The group host maintains these records as spaces are created, deleted, or unlisted, and rejects direct writes.", "key": "tid", "record": { "type": "object", "required": [ "space", "createdAt" ], "properties": { "space": { "type": "string", "format": "space-ref" }, "createdAt": { "type": "string", "format": "datetime" } } } } } } ```