{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Claims an account for the caller's DID, waiting for an invite, and starts the account session. Requires service auth.",
      "errors": [
        {
          "name": "AlreadyClaimed"
        },
        {
          "name": "AlreadyMember"
        },
        {
          "description": "The DID has an invite waiting, so it makes an account with an email instead.",
          "name": "Invited"
        },
        {
          "name": "InvalidEmail"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "email": {
              "description": "Required with notify; confirmed by a sign-in link.",
              "type": "string"
            },
            "notify": {
              "type": "boolean"
            }
          },
          "required": [],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "account": {
              "ref": "club.hellyeah.defs#accountView",
              "type": "ref"
            }
          },
          "required": [
            "account"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "club.hellyeah.account.claim",
  "lexicon": 1
}
