# app.tempomusic.staff.getAccountModeration

> 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.getAccountModeration)
- [Documentation](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.staff.getAccountModeration/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:pxsuqmultto34oks44m2lgxm/app.tempomusic.staff.getAccountModeration/examples)

## Definitions

### `app.tempomusic.staff.getAccountModeration`

**Type**: `query`

Current account-level moderation state of a DID (suspension or ban), or an empty object when the account is unrestricted. A lapsed suspension is reported with its (past) `until` — interpretation is the caller's. Requires the `moderator` role.

#### Parameters

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

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `setAt` | `string` (datetime) | No |  |
| `state` | `string` | No |  |
| `until` | `string` (datetime) | No |  |
| `reason` | `string` | No |  |
| `setByDid` | `string` (did) | No |  |

#### Errors

- **Forbidden**: The caller is not an active moderator.

## Raw Schema

```json
{
  "id": "app.tempomusic.staff.getAccountModeration",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "Forbidden",
          "description": "The caller is not an active moderator."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "setAt": {
              "type": "string",
              "format": "datetime"
            },
            "state": {
              "type": "string",
              "maxLength": 100,
              "knownValues": [
                "suspended",
                "banned"
              ]
            },
            "until": {
              "type": "string",
              "format": "datetime"
            },
            "reason": {
              "type": "string",
              "maxLength": 5000,
              "maxGraphemes": 500
            },
            "setByDid": {
              "type": "string",
              "format": "did"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "did"
        ],
        "properties": {
          "did": {
            "type": "string",
            "format": "did"
          }
        }
      },
      "description": "Current account-level moderation state of a DID (suspension or ban), or an empty object when the account is unrestricted. A lapsed suspension is reported with its (past) `until` — interpretation is the caller's. Requires the `moderator` role."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
