# com.getorbyt.community.membership

> Published by [getorbyt.com](https://lexicon.garden/identity/did:plc:2xrqztnmzlckb3xfuuukupso)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.membership)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.membership/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.membership/examples)

## Definitions

### `com.getorbyt.community.membership`

**Type**: `record`

A user-owned canonical membership link, one record per Community. The record key MUST be base32(sha256(community AT-URI)) truncated to 24 characters, lowercase and unpadded, so writing it twice replaces the record instead of adding a second one and a repo can never hold two memberships for the same Community. The AppView rejects a record whose key is not that derivation, so the invariant is enforced rather than assumed. The key is derived from the AT-URI rather than the Community name, which its owner can change, or the Community's own record key, which is unique only within one repo. Roles, mutes and bans are service-owned and are not asserted by this record.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (at-uri) | Yes | The com.getorbyt.community.declaration record this membership is for. |
| `createdAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "com.getorbyt.community.membership",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "community",
          "createdAt"
        ],
        "properties": {
          "community": {
            "type": "string",
            "format": "at-uri",
            "description": "The com.getorbyt.community.declaration record this membership is for."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      },
      "description": "A user-owned canonical membership link, one record per Community. The record key MUST be base32(sha256(community AT-URI)) truncated to 24 characters, lowercase and unpadded, so writing it twice replaces the record instead of adding a second one and a repo can never hold two memberships for the same Community. The AppView rejects a record whose key is not that derivation, so the invariant is enforced rather than assumed. The key is derived from the AT-URI rather than the Community name, which its owner can change, or the Community's own record key, which is unique only within one repo. Roles, mutes and bans are service-owned and are not asserted by this record."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
