# chat.yakka.grant

> Published by [yakka.chat](https://lexicon.garden/identity/did:plc:wpjoy2orkqq5m65vq7gg7liz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.grant)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.grant/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.grant/examples)

## Definitions

### `chat.yakka.grant`

**Type**: `record`

One member holds one role. Authority-written (ADR 0006) — a member cannot grant themselves a role, which is why this is not self-written the way membership is. The mint reads these to decide gated-channel credentials (ADR 0007).

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` (at-uri) | Yes | The chat.yakka.role record granted. |
| `subject` | `string` (did) | Yes | The member holding the role. |
| `createdAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "chat.yakka.grant",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "subject",
          "role",
          "createdAt"
        ],
        "properties": {
          "role": {
            "type": "string",
            "format": "at-uri",
            "description": "The chat.yakka.role record granted."
          },
          "subject": {
            "type": "string",
            "format": "did",
            "description": "The member holding the role."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      },
      "description": "One member holds one role. Authority-written (ADR 0006) — a member cannot grant themselves a role, which is why this is not self-written the way membership is. The mint reads these to decide gated-channel credentials (ADR 0007)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
