# app.tempomusic.staff.disableInviteCodes

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

## Definitions

### `app.tempomusic.staff.disableInviteCodes`

**Type**: `procedure`

Disable one or more PDS invite codes (TEM-502). Requires the caller to have the `superAdmin` role. Codes are provided as suffix-only strings; the handler re-prepends the env prefix stored under `APPVIEW_PDS_INVITE_CODE_PREFIX` before calling `com.atproto.admin.disableInviteCodes`. On success, writes one `inviteCodeDisabled` audit row per code (payload = SHA-256 hash of the suffix, never the plain code).

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `codes` | `array` | Yes | Suffix-only invite codes to disable. The env prefix is re-prepended by the handler before the PDS call. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Errors

- **Forbidden**: The caller is not a super-admin.
- **InvalidRequest**: `codes` is empty.
- **PdsUnavailable**: The PDS returned a transient failure — nothing is audited locally, retry.

## Raw Schema

```json
{
  "id": "app.tempomusic.staff.disableInviteCodes",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "codes"
          ],
          "properties": {
            "codes": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 128
              },
              "minLength": 1,
              "description": "Suffix-only invite codes to disable. The env prefix is re-prepended by the handler before the PDS call."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "Forbidden",
          "description": "The caller is not a super-admin."
        },
        {
          "name": "InvalidRequest",
          "description": "`codes` is empty."
        },
        {
          "name": "PdsUnavailable",
          "description": "The PDS returned a transient failure — nothing is audited locally, retry."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "properties": {}
        },
        "encoding": "application/json"
      },
      "description": "Disable one or more PDS invite codes (TEM-502). Requires the caller to have the `superAdmin` role. Codes are provided as suffix-only strings; the handler re-prepends the env prefix stored under `APPVIEW_PDS_INVITE_CODE_PREFIX` before calling `com.atproto.admin.disableInviteCodes`. On success, writes one `inviteCodeDisabled` audit row per code (payload = SHA-256 hash of the suffix, never the plain code)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
