# app.userinput.member

> Published by [userinput.app](https://lexicon.garden/identity/did:plc:uyixj57k6nmxrdj7pjs2ss5s)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.member)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.member/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.member/examples)

## Definitions

### `app.userinput.member`

**Type**: `record`

Grants a DID a role on a space. Only honored when authored by the space owner. Lives in the owner's repo.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | Yes |  |
| `space` | `ref` → `com.atproto.repo.strongRef` | Yes | The space this membership applies to. Indexed by constellation at space.uri. |
| `subject` | `string` (did) | Yes | The DID being granted a role. |
| `createdAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "app.userinput.member",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "space",
          "subject",
          "role",
          "createdAt"
        ],
        "properties": {
          "role": {
            "enum": [
              "moderator",
              "admin"
            ],
            "type": "string"
          },
          "space": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "The space this membership applies to. Indexed by constellation at space.uri."
          },
          "subject": {
            "type": "string",
            "format": "did",
            "description": "The DID being granted a role."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      },
      "description": "Grants a DID a role on a space. Only honored when authored by the space owner. Lives in the owner's repo."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
