{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Finish moving the account the caller signed in to move: with the code its server emailed, the host has its server sign the operation that gives its identity to this host, then finishes as completeImport does, and gives its tokens back.",
      "errors": [
        {
          "description": "No account is signed in for the caller to move.",
          "name": "NotFound"
        },
        {
          "description": "Its move is not started (startAccountMove).",
          "name": "NotStarted"
        },
        {
          "description": "The account's server failed, or refused the code.",
          "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": {
            "code": {
              "description": "The code the account's server emailed.",
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "code"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "address": {
              "description": "Its address here: one label under this host's handle domain.",
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "handle": {
              "format": "handle",
              "type": "string"
            },
            "members": {
              "type": "string"
            },
            "meta": {
              "type": "string"
            }
          },
          "required": [
            "did",
            "handle",
            "address",
            "meta",
            "members"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.finishAccountMove",
  "lexicon": 1
}
