{
  "lexicon": 1,
  "id": "chat.bsky.group.createJoinLink",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a join link for the group convo.",
      "errors": [
        { "name": "EnabledJoinLinkAlreadyExists" },
        { "name": "InvalidConvo" },
        { "name": "InsufficientRole" }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["convoId", "joinRule"],
          "properties": {
            "convoId": { "type": "string" },
            "requireApproval": {
              "type": "boolean",
              "default": false
            },
            "joinRule": {
              "type": "ref",
              "ref": "chat.bsky.group.defs#joinRule"
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["joinLink"],
          "properties": {
            "joinLink": {
              "type": "ref",
              "ref": "chat.bsky.group.defs#joinLinkView"
            }
          }
        }
      }
    }
  }
}

