# com.getorbyt.community.manageMember

> Published by [getorbyt.com](https://lexicon.garden/identity/did:plc:2xrqztnmzlckb3xfuuukupso)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.manageMember)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.manageMember/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2xrqztnmzlckb3xfuuukupso/com.getorbyt.community.manageMember/examples)

## Definitions

### `com.getorbyt.community.manageMember`

**Type**: `procedure`

Mute, ban, or re-role a member. Only an owner may set a role; a moderator may mute and ban, but never a peer or the owner.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `role` | `string` | No |  |
| `action` | `string` | Yes |  |
| `reason` | `string` | No | Recorded on the membership row for the acting moderator's own reference. Orbyt keeps no moderation audit log. |
| `community` | `string` (at-uri) | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `status` | `string` | Yes |  |

#### Errors

- **CommunityNotFound**
- **InsufficientRole**
- **InvalidAction**

## Raw Schema

```json
{
  "id": "com.getorbyt.community.manageMember",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community",
            "did",
            "action"
          ],
          "properties": {
            "did": {
              "type": "string",
              "format": "did"
            },
            "role": {
              "type": "string",
              "knownValues": [
                "moderator",
                "member"
              ]
            },
            "action": {
              "type": "string",
              "knownValues": [
                "setRole",
                "mute",
                "unmute",
                "ban",
                "unban"
              ]
            },
            "reason": {
              "type": "string",
              "maxLength": 1000,
              "description": "Recorded on the membership row for the acting moderator's own reference. Orbyt keeps no moderation audit log."
            },
            "community": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "CommunityNotFound"
        },
        {
          "name": "InsufficientRole"
        },
        {
          "name": "InvalidAction"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "status": {
              "type": "string",
              "knownValues": [
                "none",
                "active",
                "muted",
                "banned"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Mute, ban, or re-role a member. Only an owner may set a role; a moderator may mute and ban, but never a peer or the owner."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
