{
  "lexicon": 1,
  "id": "com.atproto.server.getAccountInviteCodes",
  "defs": {
    "main": {
      "type": "query",
      "description": "Get all invite codes for the current account. Requires auth.",
      "parameters": {
        "type": "params",
        "properties": {
          "createAvailable": {
            "type": "boolean",
            "description": "Controls whether any new 'earned' but not 'created' invites should be created.",
            "default": true
          },
          "includeUsed": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "codes"
          ],
          "properties": {
            "codes": {
              "type": "array",
              "items": {
                "type": "ref",
                "ref": "com.atproto.server.defs#inviteCode"
              }
            }
          }
        }
      },
      "errors": [
        {
          "name": "DuplicateCreate"
        }
      ]
    }
  }
}