app.tempomusic.staff.createInviteCode
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Generate a batch of single-use PDS invite codes (TEM-502). Requires the caller to have the `superAdmin` role. Each call requests `quantity` codes from the PDS (`com.atproto.server.createInviteCode` with `useCount=1`), writes one `inviteCodeCreated` audit row per successfully-created code (payload = SHA-256 hash of the suffix + `use_count`, never the plain code), and returns the suffix-only codes. When the PDS returns a transient failure mid-batch the handler stops iterating and returns the successfully-generated codes together with the requested count (partial-batch surfacing — the client decides whether to retry the missing count).",
"errors": [
{
"description": "The caller is not a super-admin.",
"name": "Forbidden"
},
{
"description": "`quantity` outside the 1..25 range.",
"name": "InvalidRequest"
},
{
"description": "The PDS returned a transient failure on the FIRST call and zero codes were generated. Partial failures on subsequent calls surface via `created < requested` on a 200 OK response, NOT this error.",
"name": "PdsUnavailable"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"quantity": {
"description": "Number of invite codes to generate in this batch. Hard-capped at 25 to keep the audit-log write batch bounded and the partial-failure surface predictable.",
"maximum": 25,
"minimum": 1,
"type": "integer"
}
},
"required": [
"quantity"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"codes": {
"description": "The successfully-generated invite codes as suffix-only strings (the env prefix stored under `APPVIEW_PDS_INVITE_CODE_PREFIX` has been stripped).",
"items": {
"maxLength": 128,
"type": "string"
},
"type": "array"
},
"created": {
"description": "Number of codes actually generated (equal to `codes.length`). Present redundantly to make the partial-batch semantic obvious to clients that only inspect scalars.",
"minimum": 0,
"type": "integer"
},
"requested": {
"description": "The `quantity` originally requested. `created < requested` signals a partial batch — the client may retry with `quantity = requested - created`.",
"minimum": 1,
"type": "integer"
}
},
"required": [
"codes",
"created",
"requested"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "app.tempomusic.staff.createInviteCode",
"lexicon": 1
}
Metadata
- DID
-
did:plc:pxsuqmultto34oks44m2lgxm - CID
-
bafyreihsgwzsjglo5ii5l2g7wgd4o6r5x2bowxanbdbosat6x42xzppj3y - Indexed At
- 2026-08-24 09:06 UTC
- AT-URI
-
at://did:plc:pxsuqmultto34oks44m2lgxm/com.atproto.lexicon.schema/app.tempomusic.staff.createInviteCode
Similar Lexicons
Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
List PDS invite codes on-demand via the PDS (`com.atproto.admin.getInviteCodes`). No local mirror — the source of truth is the PDS. Requires the caller to have the `superAdmin` role. Codes are returned as suffix-only …
-
app.tempomusic.staff.disableInviteCodes 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_…
-
com.atproto.server.createInviteCodes procedure
Create invite codes.
-
com.atproto.server.createInviteCode procedure
Create an invite code.