# fyi.opensocial.membership

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.membership)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.membership/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.membership/examples)

## Definitions

### `fyi.opensocial.membership`

**Type**: `record`

Grants a member their roles. Written by the group authority; the record key is the member's DID.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `member` | `string` (did) | Yes |  |
| `roles` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Grants a member their roles. Written by the group authority; the record key is the member's DID.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "member": {
            "format": "did",
            "type": "string"
          },
          "roles": {
            "items": {
              "description": "A role id: the record key of a fyi.opensocial.role record.",
              "maxLength": 64,
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "member",
          "roles",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "fyi.opensocial.membership",
  "lexicon": 1
}
```
