app.tempomusic.staff.grantStaffRole

lexicons.tempomusic.fan

Documentation

Add a DID to the moderators allowlist with the given role. Requires the caller to have the `superAdmin` role. Writes a `moderatorGranted` audit row only when a new row is inserted or a revoked row is reactivated. Idempotent: granting a DID that already holds the same active role returns 200 with `granted: false` and no audit row.

main procedure

Add a DID to the moderators allowlist with the given role. Requires the caller to have the `superAdmin` role. Writes a `moderatorGranted` audit row only when a new row is inserted or a revoked row is reactivated. Idempotent: granting a DID that already holds the same active role returns 200 with `granted: false` and no audit row.

Input

Encodingapplication/json
did stringdid Required

A decentralized identifier (DID).

reason string Optional

No description available.

maxLength: 1000 bytes

Output

Encodingapplication/json
auditEntryId integer Optional

Present only when granted=true.

granted boolean Required

True when a new row was inserted or a revoked row was reactivated. False when the DID already held the requested active role (idempotent no-op).

Errors

Forbidden The caller is not a super-admin.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "did",
        "role"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "role": {
          "ref": "app.tempomusic.staff.defs#staffRole",
          "type": "ref"
        },
        "reason": {
          "type": "string",
          "maxLength": 1000
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "Forbidden",
      "description": "The caller is not a super-admin."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "granted"
      ],
      "properties": {
        "granted": {
          "type": "boolean",
          "description": "True when a new row was inserted or a revoked row was reactivated. False when the DID already held the requested active role (idempotent no-op)."
        },
        "auditEntryId": {
          "type": "integer",
          "minimum": 1,
          "description": "Present only when granted=true."
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Add a DID to the moderators allowlist with the given role. Requires the caller to have the `superAdmin` role. Writes a `moderatorGranted` audit row only when a new row is inserted or a revoked row is reactivated. Idempotent: granting a DID that already holds the same active role returns 200 with `granted: false` and no audit row."
}

Lexicon Garden

@