{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Provision a brand-new stewarded PDS account.\n\nThe caller authenticates via serviceAuth (aud = arbiter-server DID,\nlxm = town.muni.arbiter.createArbiter). The server creates a new account\non the configured default PDS using an invite code + random password,\nstores the credentials, and writes the service + recovery records from the\nnew account's session. No policy is written: the arbiter stays offline\n(fail-closed) until the recovery admin installs the first policy via\n`town.muni.arbiter.resetPolicy`.",
      "errors": [
        {
          "description": "The requesting user is not allowed to create an arbiter.",
          "name": "ErrPermissionDenied"
        },
        {
          "description": "Account creation or initial record writes failed.",
          "name": "ErrProvisioningFailed"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "description": "The DID of the newly created stewarded account.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "did"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "town.muni.arbiter.createArbiter",
  "lexicon": 1
}
