# app.tempomusic.staff.revokeStaffRole

> Published by [lexicons.tempomusic.fan](https://lexicon.garden/identity/did:plc:pxsuqmultto34oks44m2lgxm)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.staff.revokeStaffRole)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.staff.revokeStaffRole/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.staff.revokeStaffRole/examples)

## Definitions

### `app.tempomusic.staff.revokeStaffRole`

**Type**: `procedure`

Mark a moderator row as revoked. The DID can no longer pass the moderator gate (latency = the moderator-cache TTL, default 30s). Requires the caller to have the `superAdmin` role. A super-admin cannot revoke themselves. Writes a `moderatorRevoked` audit row only when an active row was actually revoked. Idempotent: revoking a DID that is not currently an active moderator returns 200 with `revoked: false` and no audit row.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `reason` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `revoked` | `boolean` | Yes | True when a previously active row was revoked. False when the DID was not an active moderator (idempotent no-op). |
| `auditEntryId` | `integer` | No | Present only when revoked=true. |

#### Errors

- **Forbidden**: The caller is not a super-admin.
- **CannotRevokeSelf**: A super-admin cannot revoke their own row. Have another super-admin do it.

## Raw Schema

```json
{
  "id": "app.tempomusic.staff.revokeStaffRole",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "did"
          ],
          "properties": {
            "did": {
              "type": "string",
              "format": "did"
            },
            "reason": {
              "type": "string",
              "maxLength": 1000
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "Forbidden",
          "description": "The caller is not a super-admin."
        },
        {
          "name": "CannotRevokeSelf",
          "description": "A super-admin cannot revoke their own row. Have another super-admin do it."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "revoked"
          ],
          "properties": {
            "revoked": {
              "type": "boolean",
              "description": "True when a previously active row was revoked. False when the DID was not an active moderator (idempotent no-op)."
            },
            "auditEntryId": {
              "type": "integer",
              "minimum": 1,
              "description": "Present only when revoked=true."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Mark a moderator row as revoked. The DID can no longer pass the moderator gate (latency = the moderator-cache TTL, default 30s). Requires the caller to have the `superAdmin` role. A super-admin cannot revoke themselves. Writes a `moderatorRevoked` audit row only when an active row was actually revoked. Idempotent: revoking a DID that is not currently an active moderator returns 200 with `revoked: false` and no audit row."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
