# pub.chive.governance.revokeRole

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.revokeRole)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.revokeRole/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.governance.revokeRole/examples)

## Definitions

### `pub.chive.governance.revokeRole`

**Type**: `procedure`

Revoke a user's governance role. Only accessible to administrators. Also revokes any active delegation.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | DID of the user whose role to revoke |
| `reason` | `string` | Yes | Reason for revoking the role |

#### Output

**Encoding**: `application/json`

#### Errors

- **AuthenticationRequired**
- **Unauthorized**
- **InvalidRequest**

### `pub.chive.governance.revokeRole#elevationResult`

**Type**: `object`

Result of role operation

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `message` | `string` | Yes | Human-readable result message |
| `success` | `boolean` | Yes | Whether the operation succeeded |
| `requestId` | `string` | No | Request ID (if applicable) |

## Raw Schema

```json
{
  "id": "pub.chive.governance.revokeRole",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "did",
            "reason"
          ],
          "properties": {
            "did": {
              "type": "string",
              "format": "did",
              "description": "DID of the user whose role to revoke"
            },
            "reason": {
              "type": "string",
              "maxLength": 1000,
              "minLength": 10,
              "description": "Reason for revoking the role"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "Unauthorized"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "schema": {
          "ref": "#elevationResult",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "description": "Revoke a user's governance role. Only accessible to administrators. Also revokes any active delegation."
    },
    "elevationResult": {
      "type": "object",
      "required": [
        "success",
        "message"
      ],
      "properties": {
        "message": {
          "type": "string",
          "description": "Human-readable result message"
        },
        "success": {
          "type": "boolean",
          "description": "Whether the operation succeeded"
        },
        "requestId": {
          "type": "string",
          "description": "Request ID (if applicable)"
        }
      },
      "description": "Result of role operation"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
