# fyi.opensocial.role

> 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.

- Kind: record
- Record key: any
- Authority: opensocial.fyi
- Lexicon: 1
- Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.role)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.role/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.role/analytics)

## Record (`fyi.opensocial.role`)

Type: record · key any

### Properties

- `bot` (boolean): 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.
- `createdAt` (string · datetime)
- `default` (boolean): Granted to members who join through requestJoin. With no role marked so, a newcomer gets member.
- `description` (string)
  - Constraints: maxLength: 20000, maxGraphemes: 2000
- `displayName` (string, required)
  - Constraints: maxLength: 640, maxGraphemes: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "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
}
```
