# org.atgrp.membership

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.

A record in the spec for Atmosphere Groups. The page: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-membership/

- Named in the spec: 5 Roles & Access (https://www.atmospheregroups.org/spec/#roles--access); 7 Creating a group (https://www.atmospheregroups.org/spec/#creating-a-group); 13.2 Record types (https://www.atmospheregroups.org/spec/#record-types); 13.3 Permission sets (https://www.atmospheregroups.org/spec/#permission-sets)
- In the spec's repository: https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/lexicons/org/atgrp/membership.json
- Published under the same name: https://www.atmospheregroups.org/reference/lexicons/org-atgrp-membership/, the same schema
- The reference host's version: fyi.opensocial.membership, https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-membership/

## The schema in the spec

```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"
          }
        }
      }
    }
  }
}
```
