{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Start moving the account the caller signed in to move (getAccountMove) here, to become a group they run: the host asks its server for its token for this host, copies it as importAccount does, brings its spaces as importAccountSpace takes them, and asks its server to email the code that lets its identity move (finishAccountMove). Started again, it starts over.",
      "errors": [
        {
          "description": "No account is signed in for the caller to move.",
          "name": "NotFound"
        },
        {
          "description": "The account's server failed, or refused what the move asked of it.",
          "name": "UpstreamFailure"
        },
        {
          "description": "The account's sign-in at its server has lapsed, with no way to renew it: sign in to it again.",
          "name": "SignInAgain"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "address": {
              "description": "The label of its address here, if not its handle's first label.",
              "maxLength": 63,
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "address": {
              "description": "Its address here: one label under this host's handle domain.",
              "type": "string"
            },
            "blobs": {
              "description": "Files copied.",
              "type": "integer"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "displayName": {
              "type": "string"
            },
            "handle": {
              "description": "Its handle once moved: its own domain if it has one that still names it, otherwise its address.",
              "format": "handle",
              "type": "string"
            },
            "recommendedCreds": {
              "description": "rotationKeys, alsoKnownAs, verificationMethods and services, as com.atproto.identity.getRecommendedDidCredentials answers: what the account's server signs into its PLC operation (com.atproto.identity.signPlcOperation).",
              "type": "unknown"
            },
            "records": {
              "description": "Records copied.",
              "type": "integer"
            },
            "spaces": {
              "ref": "#spacesBrought",
              "type": "ref"
            }
          },
          "required": [
            "did",
            "handle",
            "address",
            "displayName",
            "records",
            "blobs",
            "recommendedCreds"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "spacesBrought": {
      "description": "What came of the account's spaces.",
      "properties": {
        "blobs": {
          "description": "Its files in them.",
          "type": "integer"
        },
        "records": {
          "description": "Its records in them, kept.",
          "type": "integer"
        },
        "spaces": {
          "description": "The spaces it governs or wrote in.",
          "type": "integer"
        }
      },
      "required": [
        "spaces",
        "records",
        "blobs"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.startAccountMove",
  "lexicon": 1
}
