{
    "components": {
        "schemas": {
            "data": {
                "properties": {
                    "data": {
                        "$ref": "#/components/schemas/openapimod.createWxChainOut"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainCreateEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "创建成功！",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afChainCreateResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainCreateResult": {
                "properties": {
                    "chain_title": {
                        "type": "string"
                    },
                    "created_today": {
                        "type": "integer"
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "render_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainEditEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afChainEditResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainEditResult": {
                "properties": {
                    "render_url": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainGroupItem": {
                "properties": {
                    "chain_num": {
                        "type": "integer"
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "group_name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainGroupListEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afChainGroupItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    }
                },
                "type": "object"
            },
            "openapimod.afChainListEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afChainListResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainListItem": {
                "properties": {
                    "chain": {
                        "description": "code (unique suffix)",
                        "type": "string"
                    },
                    "chain_id": {
                        "type": "integer"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "create_time": {
                        "type": "string"
                    },
                    "domain": {
                        "description": "domain id",
                        "type": "integer"
                    },
                    "domain_status": {
                        "description": "1 生效 / 99 未生效",
                        "type": "integer"
                    },
                    "domain_url": {
                        "description": "the domain host",
                        "type": "string"
                    },
                    "pv_history": {
                        "type": "integer"
                    },
                    "pv_today": {
                        "type": "integer"
                    },
                    "render_url": {
                        "description": "scheme://domain/code",
                        "type": "string"
                    },
                    "status": {
                        "description": "human label (\"跳转正常\")",
                        "type": "string"
                    },
                    "sub_type": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "type": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afChainListResult": {
                "properties": {
                    "list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afChainListItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "list_num": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afCreateChainIn": {
                "properties": {
                    "chain_title": {
                        "type": "string"
                    },
                    "domain": {
                        "description": "id (number) or host (string)",
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "valid_time": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afCreateGroupIn": {
                "properties": {
                    "chain_type": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afCreateWxChainIn": {
                "properties": {
                    "avatar": {
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "channel_list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afWxChannelIn"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "code": {
                        "description": "optional custom suffix (non-aifabu convenience)",
                        "type": "string"
                    },
                    "desc": {
                        "type": "string"
                    },
                    "domain": {
                        "description": "domain id (number) or host (string)",
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "group_id": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "qrcode_vc_type": {
                        "type": "integer"
                    },
                    "scan_qr_url": {
                        "type": "string"
                    },
                    "scan_tips": {
                        "type": "integer"
                    },
                    "show_type": {
                        "type": "integer"
                    },
                    "sub_title": {
                        "type": "string"
                    },
                    "sub_type": {
                        "description": "optional explicit surface; defaults to 扫码",
                        "type": "integer"
                    },
                    "visit_type": {
                        "type": "integer"
                    },
                    "wx_id": {
                        "description": "扫码 destination (aifabu drives 微信号 via channel_list QR images; we also accept\nan explicit wx_id/scan_qr_url for a direct 微信号/二维码 destination).",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afCreateWxworkChainIn": {
                "properties": {
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "code": {
                        "description": "optional custom suffix (non-aifabu convenience)",
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "domain": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "group_id": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "wxwork_type": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afCustomerAssemblyEnvelope": {
                "properties": {
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afCustomerAssemblyListResult"
                    },
                    "status": {
                        "example": 1,
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afCustomerAssemblyItem": {
                "properties": {
                    "auth_status": {
                        "type": "string"
                    },
                    "create_time": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "link_id": {
                        "type": "string"
                    },
                    "link_name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "use_status": {
                        "type": "integer"
                    },
                    "use_status_description": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afCustomerAssemblyListResult": {
                "properties": {
                    "list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afCustomerAssemblyItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "page": {
                        "type": "integer"
                    },
                    "pageCount": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afDelChainIn": {
                "properties": {
                    "chains": {
                        "description": "array of codes",
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "uniqueItems": false
                    }
                },
                "type": "object"
            },
            "openapimod.afDomainItem": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "is_my": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afDomainListEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afDomainListResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afDomainListResult": {
                "properties": {
                    "domain_list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afDomainItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    }
                },
                "type": "object"
            },
            "openapimod.afEditChainIn": {
                "properties": {
                    "chain": {
                        "description": "code (unique suffix)",
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afEditWxChainIn": {
                "properties": {
                    "avatar": {
                        "type": "string"
                    },
                    "chain": {
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "channel_list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afWxChannelIn"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "code": {
                        "description": "optional custom suffix (non-aifabu convenience)",
                        "type": "string"
                    },
                    "desc": {
                        "type": "string"
                    },
                    "domain": {
                        "description": "domain id (number) or host (string)",
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "group_id": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "qrcode_vc_type": {
                        "type": "integer"
                    },
                    "scan_qr_url": {
                        "type": "string"
                    },
                    "scan_tips": {
                        "type": "integer"
                    },
                    "show_type": {
                        "type": "integer"
                    },
                    "sub_title": {
                        "type": "string"
                    },
                    "sub_type": {
                        "description": "optional explicit surface; defaults to 扫码",
                        "type": "integer"
                    },
                    "visit_type": {
                        "type": "integer"
                    },
                    "wx_id": {
                        "description": "扫码 destination (aifabu drives 微信号 via channel_list QR images; we also accept\nan explicit wx_id/scan_qr_url for a direct 微信号/二维码 destination).",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afEditWxworkChainIn": {
                "properties": {
                    "chain": {
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "channel_id": {
                        "type": "integer"
                    },
                    "code": {
                        "description": "optional custom suffix (non-aifabu convenience)",
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "domain": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "group_id": {
                        "items": {
                            "type": "integer"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "wxwork_type": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afEmptyEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "编辑成功！",
                        "type": "string"
                    },
                    "result": {
                        "example": [
                            "[]"
                        ],
                        "items": {},
                        "type": "array",
                        "uniqueItems": false
                    }
                },
                "type": "object"
            },
            "openapimod.afGroupCreateEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afGroupCreateResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afGroupCreateResult": {
                "properties": {
                    "group_id": {
                        "example": "1024",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afTemplateItem": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "is_use": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "thumb": {
                        "type": "string"
                    },
                    "type": {
                        "type": "integer"
                    },
                    "update_time": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afTemplateListEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afTemplateListResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afTemplateListResult": {
                "properties": {
                    "list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afTemplateItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "page": {
                        "type": "string"
                    },
                    "pageCount": {
                        "type": "string"
                    },
                    "template_limit": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "used_num": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afUploadEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afUploadResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afUploadItem": {
                "properties": {
                    "file_name": {
                        "type": "string"
                    },
                    "img_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afUploadResult": {
                "properties": {
                    "upload_fail_data": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "upload_success_data": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afUploadItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainCreateEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "创建成功！",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afWxChainCreateResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainCreateResult": {
                "properties": {
                    "chain": {
                        "type": "string"
                    },
                    "render_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainInfoEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afWxChainInfoResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainInfoResult": {
                "properties": {
                    "avatar": {
                        "type": "string"
                    },
                    "chain": {
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "channel_list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afWxChannelOut"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "desc": {
                        "type": "string"
                    },
                    "domain": {
                        "type": "integer"
                    },
                    "domain_url": {
                        "type": "string"
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "is_del": {
                        "type": "integer"
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "qrcode_vc_type": {
                        "type": "integer"
                    },
                    "render_url": {
                        "type": "string"
                    },
                    "scan_qr_url": {
                        "type": "string"
                    },
                    "scan_tips": {
                        "type": "integer"
                    },
                    "show_type": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "sub_title": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "visit_type": {
                        "type": "integer"
                    },
                    "wx_id": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainListEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afWxChainListResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChainListResult": {
                "properties": {
                    "list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afWxListItem"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "page": {
                        "type": "string"
                    },
                    "pageCount": {
                        "type": "string"
                    },
                    "total": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChannelIn": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "is_delete": {
                        "type": "integer"
                    },
                    "qrcode_name": {
                        "type": "string"
                    },
                    "qrcode_time": {
                        "type": "integer"
                    },
                    "ratio": {
                        "type": "integer"
                    },
                    "sort": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "url2": {
                        "type": "string"
                    },
                    "visit_limit": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxChannelOut": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "qrcode_name": {
                        "type": "string"
                    },
                    "qrcode_time": {
                        "type": "integer"
                    },
                    "ratio": {
                        "type": "integer"
                    },
                    "sort": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "url2": {
                        "type": "string"
                    },
                    "visit_count": {
                        "type": "integer"
                    },
                    "visit_limit": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxListItem": {
                "properties": {
                    "chain": {
                        "type": "string"
                    },
                    "chain_id": {
                        "type": "integer"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "create_time": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "domain": {
                        "type": "integer"
                    },
                    "domain_status": {
                        "type": "integer"
                    },
                    "domain_url": {
                        "type": "string"
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "group_name": {
                        "type": "string"
                    },
                    "pv_history": {
                        "type": "integer"
                    },
                    "pv_today": {
                        "type": "integer"
                    },
                    "render_url": {
                        "type": "string"
                    },
                    "show_type": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "template_id": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxworkChainInfoEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {
                        "$ref": "#/components/schemas/openapimod.afWxworkChainInfoResult"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxworkChainInfoResult": {
                "properties": {
                    "chain": {
                        "type": "string"
                    },
                    "chain_title": {
                        "type": "string"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "channel_list": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.afWxworkChannelOut"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "domain": {
                        "type": "integer"
                    },
                    "domain_url": {
                        "type": "string"
                    },
                    "group_id": {
                        "type": "integer"
                    },
                    "is_direct_jump": {
                        "type": "integer"
                    },
                    "jump_template_id": {
                        "type": "integer"
                    },
                    "render_url": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.afWxworkChannelOut": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.aifabuEnvelope": {
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "success",
                        "type": "string"
                    },
                    "result": {}
                },
                "type": "object"
            },
            "openapimod.aifabuErrorEnvelope": {
                "properties": {
                    "code": {
                        "example": 0,
                        "type": "integer"
                    },
                    "msg": {
                        "example": "invalid API key",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.chainDataOut": {
                "properties": {
                    "chain_id": {
                        "type": "integer"
                    },
                    "daily_trend": {
                        "items": {
                            "$ref": "#/components/schemas/openapimod.dailyPoint"
                        },
                        "type": "array",
                        "uniqueItems": false
                    },
                    "total_clicks": {
                        "type": "integer"
                    },
                    "trend_days": {
                        "type": "integer"
                    },
                    "unique_visitors": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.chainOut": {
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "type": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.createChainIn": {
                "properties": {
                    "chain_title": {
                        "description": "optional label",
                        "type": "string"
                    },
                    "code": {
                        "description": "optional custom suffix",
                        "type": "string"
                    },
                    "domain_id": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "valid_time": {
                        "description": "0 = permanent",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.createChainOut": {
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "domain_id": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "target_url": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.createGroupIn": {
                "properties": {
                    "chain_type": {
                        "description": "1 短链 | 2 微信外链 | ... (chaindef.ChainType); 0 → 1",
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.createWxChainIn": {
                "properties": {
                    "avatar": {
                        "type": "string"
                    },
                    "chain_title": {
                        "description": "optional label",
                        "type": "string"
                    },
                    "code": {
                        "description": "optional custom suffix",
                        "type": "string"
                    },
                    "domain_id": {
                        "type": "integer"
                    },
                    "guide_text": {
                        "type": "string"
                    },
                    "is_direct_jump": {
                        "description": "0 停留唤起页 | 1 直跳",
                        "type": "integer"
                    },
                    "mini_appid": {
                        "type": "string"
                    },
                    "mini_path": {
                        "type": "string"
                    },
                    "promo_desc": {
                        "type": "string"
                    },
                    "qwhk_url": {
                        "type": "string"
                    },
                    "scan_qr_url": {
                        "type": "string"
                    },
                    "shop_appid": {
                        "type": "string"
                    },
                    "shop_path": {
                        "type": "string"
                    },
                    "show_type": {
                        "description": "1 小图 | 2 长图",
                        "type": "integer"
                    },
                    "sub_title": {
                        "description": "≤20, show_type=1",
                        "type": "string"
                    },
                    "sub_type": {
                        "type": "integer"
                    },
                    "valid_time": {
                        "description": "0 = permanent",
                        "type": "integer"
                    },
                    "wx_id": {
                        "description": "destination (set the fields for the chosen sub_type)",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.createWxChainOut": {
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "domain_id": {
                        "type": "integer"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "sub_type": {
                        "type": "integer"
                    },
                    "type": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.dailyPoint": {
                "properties": {
                    "clicks": {
                        "type": "integer"
                    },
                    "day": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.domainOut": {
                "properties": {
                    "domain": {
                        "type": "string"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "scene": {
                        "type": "string"
                    },
                    "scheme": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.groupOut": {
                "properties": {
                    "chain_count": {
                        "type": "integer"
                    },
                    "chain_type": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.openAPIEnvelope": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/data"
                    }
                ],
                "properties": {
                    "code": {
                        "example": 1,
                        "type": "integer"
                    },
                    "data": {},
                    "message": {
                        "example": "ok",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.openAPIError": {
                "properties": {
                    "code": {
                        "example": "forbidden",
                        "type": "string"
                    },
                    "message": {
                        "example": "api key scope does not permit this endpoint",
                        "type": "string"
                    },
                    "status": {
                        "example": 0,
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.reportConversionIn": {
                "properties": {
                    "chain": {
                        "description": "Chain is the short code (alias of chain_id). Provide chain OR chain_id.",
                        "type": "string"
                    },
                    "chain_id": {
                        "description": "ChainID is the numeric chain primary key.",
                        "type": "integer"
                    },
                    "clickid": {
                        "description": "ClickID is optional ad-click attribution id.",
                        "type": "string"
                    },
                    "conv_type": {
                        "description": "ConvType is a libs/adcb biz-event code (form / register / purchase / …).",
                        "type": "string"
                    },
                    "external_userid": {
                        "description": "ExternalUserID is optional caller-side user id stored in ext.",
                        "type": "string"
                    },
                    "out_id": {
                        "description": "OutID is the caller's idempotency token (order id, form submission id, …).\nSame (user, chain, conv_type, out_id) never double-inserts conversion_event.\nREQUIRED for purchase (and any RequiresOutID type) — missing → 400.",
                        "type": "string"
                    },
                    "platform": {
                        "description": "Platform is optional ad platform (juliang / tencent / …); free string.",
                        "type": "string"
                    },
                    "value_cents": {
                        "description": "ValueCents is optional monetary value in cents (deep conversion).",
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.reportConversionOut": {
                "properties": {
                    "chain_id": {
                        "type": "integer"
                    },
                    "conv_type": {
                        "type": "string"
                    },
                    "duplicate": {
                        "type": "boolean"
                    },
                    "event_id": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.templateOut": {
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "style": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "openapimod.updateChainIn": {
                "properties": {
                    "chain_title": {
                        "type": "string"
                    },
                    "target_url": {
                        "type": "string"
                    },
                    "valid_time": {
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "openapimod.uploadOut": {
                "properties": {
                    "file_id": {
                        "type": "integer"
                    },
                    "object_key": {
                        "type": "string"
                    },
                    "size_bytes": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "ApiKeyAuth": {
                "description": "API key as a Bearer token, e.g. `Bearer sk_live_…` (or the `X-API-Key` header). Required by every endpoint below, including the \"Aifabu …\" tagged ones — which additionally accept the key as a `?apikey=` query parameter (see that operation's description).",
                "in": "header",
                "name": "Authorization",
                "type": "apiKey"
            }
        }
    },
    "info": {
        "description": "Programmatic short-link surface for machine callers. Authenticate\nwith an API key as a Bearer token (`Authorization: Bearer sk_…`).\nEvery endpoint additionally requires the listed scope on the key\n(api_key.scopes); a key only ever acts as its owning user.\n\nThis document also carries the aifabu wire-compatibility surface\n(tags prefixed \"Aifabu …\"): action-style paths mounted at a\nDIFFERENT real base, /openapi/v1 (router.go's separate top-level\n`/openapi` group — see aifabu.go), replying with aifabu's\n`{code,msg,result}` shell instead of `{code,message,data}`. Each\nsuch operation carries its own `servers` override (OpenAPI 3\nper-operation servers, via `@Servers.url`) so it resolves to the\nright base regardless of this document's top-level @BasePath. It\nis authenticated the SAME ApiKeyAuth scheme below (a header/Bearer\nkey always works there too) but ADDITIONALLY accepts the key as a\n`?apikey=` query parameter — the aifabu wire convention — noted\nper-operation rather than as a second formal security scheme\n(swag's general-info parser — v2.0.0 — cannot represent two\ndistinct `@securityDefinitions.apikey` blocks; verified empirically:\nit silently collapses them onto one name).",
        "title": "Short-Link Open API",
        "version": "1.0.0"
    },
    "externalDocs": {
        "description": "",
        "url": ""
    },
    "paths": {
        "/card": {
            "get": {
                "description": "Returns up to 100 of the calling user's card chains (type=card), newest first. Scope: card:read. User is derived from the API key, never from input.",
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "api key scope does not permit this endpoint"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "List card chains",
                "tags": [
                    "Cards"
                ]
            }
        },
        "/card/createWxChain": {
            "post": {
                "description": "Creates a 卡片系统 微信外链 (wire chain_type=4), stored under chain.type=TypeCard — byte-identical shape to /chain/createWxChain, isolated into the 卡片 namespace. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/createWxChain. Scope: card:write. Also accepts the key as a `?apikey=` query parameter. 卡片 has no 跳转页: a non-zero `jump_template_id` is refused with 400 (aifabu offers 跳转页 only on 微信外链 and the two 抖音 卡片 flows).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateWxChainIn",
                                        "summary": "body",
                                        "description": "微信外链 to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "微信外链 to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainCreateEnvelope"
                                }
                            }
                        },
                        "description": "created (msg: 创建成功！)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (including a non-zero jump_template_id, unsupported on 卡片)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "domain/group is not available to this user / scope denied"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "custom code already exists for this domain"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a WeChat external link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Cards"
                ]
            }
        },
        "/card/createWxworkChain": {
            "post": {
                "description": "Creates a 卡片系统 企微获客链接 chain (wire chain_type=5) wrapping an EXISTING scene-authorized acquisition link's URL. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/createWxworkChain. Scope: card:write. wxwork_type 1 授权接入 resolves customer_id to wecom_scene_link.id (auth_status via wecom_scene_corp) and enforces same-link-once (H4); wxwork_type 2 手动输入 takes a urlencoded https://work.weixin.qq.com/ target_url verbatim. Also accepts the key as a `?apikey=` query parameter. 卡片 has no 跳转页: a non-zero `jump_template_id` is refused with 400 (aifabu offers 跳转页 only on 微信外链 and the two 抖音 卡片 flows).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateWxworkChainIn",
                                        "summary": "body",
                                        "description": "企微获客链接 to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "企微获客链接 to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainCreateEnvelope"
                                }
                            }
                        },
                        "description": "created (msg: 创建成功！)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (customer_id/target_url required, not a work.weixin.qq.com URL, or a non-zero jump_template_id — unsupported on 卡片)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "domain/group is not available to this user / scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scene acquisition link (customer_id) not found"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "custom code already exists, or authorized link already bound"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a WeCom acquisition link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Card WeCom"
                ]
            }
        },
        "/card/delWxChain": {
            "post": {
                "description": "Batch soft-deletes 卡片系统 微信外链 chains by CODE (unknown/foreign codes are skipped, idempotent). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/delWxChain. Scope: card:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afDelChainIn",
                                        "summary": "body",
                                        "description": "codes to delete"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "codes to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "deleted (result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chains is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Delete WeChat external links (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Cards"
                ]
            }
        },
        "/card/delWxworkChain": {
            "post": {
                "description": "Batch soft-deletes 卡片系统 企微获客链接 chains by CODE (unknown/foreign codes are skipped, idempotent). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/delWxworkChain. Scope: card:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afDelChainIn",
                                        "summary": "body",
                                        "description": "codes to delete"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "codes to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "deleted (result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chains is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Delete WeCom acquisition links (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Card WeCom"
                ]
            }
        },
        "/card/editWxChain": {
            "post": {
                "description": "Patches a 卡片系统 微信外链 identified by its CODE (`chain`). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/editWxChain. Scope: card:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter. 卡片 has no 跳转页: a non-zero `jump_template_id` is refused with 400 (aifabu offers 跳转页 only on 微信外链 and the two 抖音 卡片 flows).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afEditWxChainIn",
                                        "summary": "body",
                                        "description": "fields to patch (chain is required)"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch (chain is required)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "updated (msg: 编辑成功！; result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chain is required; a non-zero jump_template_id is unsupported on 卡片)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Edit a WeChat external link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Cards"
                ]
            }
        },
        "/card/editWxworkChain": {
            "post": {
                "description": "Patches a 卡片系统 企微获客链接 chain identified by its CODE (`chain`). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/card/editWxworkChain. Scope: card:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter. 卡片 has no 跳转页: a non-zero `jump_template_id` is refused with 400 (aifabu offers 跳转页 only on 微信外链 and the two 抖音 卡片 flows).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afEditWxworkChainIn",
                                        "summary": "body",
                                        "description": "fields to patch (chain is required)"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch (chain is required)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "updated (msg: 编辑成功！; result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chain is required; a non-zero jump_template_id is unsupported on 卡片)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain / scene acquisition link not found"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "authorized link already bound to another chain"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Edit a WeCom acquisition link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Card WeCom"
                ]
            }
        },
        "/card/getWxChainInfo": {
            "get": {
                "description": "Returns a 卡片系统 微信外链's full detail by its CODE (`chain`). aifabu-wire-compatible with openapi.aifabu.com's GET /v1/card/getWxChainInfo. Scope: card:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain code",
                        "in": "query",
                        "name": "chain",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainInfoEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Get a WeChat external link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Cards"
                ]
            }
        },
        "/card/getWxChainList": {
            "get": {
                "description": "Returns the calling user's 卡片系统 微信外链 chains under group_id, newest first, paginated. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/card/getWxChainList. Scope: card:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain group id",
                        "in": "query",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 20, max 1000)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group_id is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List WeChat external links (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Cards"
                ]
            }
        },
        "/card/getWxworkChainInfo": {
            "get": {
                "description": "Returns a 卡片系统 企微获客链接 chain's detail by its CODE (`chain`). aifabu-wire-compatible with openapi.aifabu.com's GET /v1/card/getWxworkChainInfo. Scope: card:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain code",
                        "in": "query",
                        "name": "chain",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxworkChainInfoEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Get a WeCom acquisition link (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Card WeCom"
                ]
            }
        },
        "/card/getWxworkChainList": {
            "get": {
                "description": "Returns the calling user's 卡片系统 企微获客链接 chains under group_id, newest first, paginated. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/card/getWxworkChainList. Scope: card:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain group id",
                        "in": "query",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 20, max 1000)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group_id is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List WeCom acquisition links (卡片系统, aifabu wire)",
                "tags": [
                    "Aifabu Card WeCom"
                ]
            }
        },
        "/chain": {
            "get": {
                "description": "Returns up to 100 of the calling user's short-link (type=1) chains, newest first. Scope: chain:read. User is derived from the API key, never from input.",
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "api key scope does not permit this endpoint"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "List chains",
                "tags": [
                    "Chains"
                ]
            },
            "post": {
                "description": "Creates a plain short link (type=1) for the API key's user. Scope: chain:write. user_id comes strictly from the key principal; domain_id must be a usable platform domain or the user's approved domain. Omit `code` to auto-generate a unique suffix.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.createChainIn",
                                        "summary": "body",
                                        "description": "short-link to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "short-link to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "created"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "validation error (missing/invalid domain_id or target_url)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "domain is not available to this user / scope denied"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "custom code already exists for this domain"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Create a short link",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/chain/createChain": {
            "post": {
                "description": "Creates a plain short link for the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/createChain. Scope: chain:write. `domain` is a domain id (number) or host (string) from getUserDomain; group_id 0/omitted uses the user's first group. `valid_time` is a China-time \"YYYY-MM-DD HH:MM:SS\" datetime string (\"\" = permanent). Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateChainIn",
                                        "summary": "body",
                                        "description": "short link to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "short link to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afChainCreateEnvelope"
                                }
                            }
                        },
                        "description": "created (msg: 创建成功！)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (missing/invalid domain or target_url)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "domain/group is not available to this user / scope denied"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "custom code already exists for this domain"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a short link (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/createWxChain": {
            "post": {
                "description": "Creates a 微信外链 (chain_type=2) for the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/createWxChain. Scope: chain:write. sub_type selects the surface (1 扫码 default | 2 小程序 | 3 小商店 | 4 企微获客, via ChannelList QR images or an explicit wx_id/scan_qr_url). Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateWxChainIn",
                                        "summary": "body",
                                        "description": "微信外链 to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "微信外链 to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainCreateEnvelope"
                                }
                            }
                        },
                        "description": "created (msg: 创建成功！)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "domain/group is not available to this user / scope denied"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "custom code already exists for this domain"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a WeChat external link (aifabu wire)",
                "tags": [
                    "Aifabu WeChat Chains"
                ]
            }
        },
        "/chain/createWxworkChain": {
            "post": {
                "description": "Creates a 企微获客链接 chain (chain_type=3) that wraps an EXISTING scene-authorized acquisition link's URL. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/createWxworkChain. Scope: chain:write. wxwork_type 1 授权接入 resolves customer_id (from getCustomerAssemblyList → wecom_scene_link.id) to the user's scene-authorized link URL and enforces same-link-once (H4, shared with wxext/douyin/card); wxwork_type 2 手动输入 takes a urlencoded https://work.weixin.qq.com/ target_url verbatim. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateWxworkChainIn",
                                        "summary": "body",
                                        "description": "企微获客链接 to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "企微获客链接 to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainCreateEnvelope"
                                }
                            }
                        },
                        "description": "created (msg: 创建成功！)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (customer_id/target_url required, or not a work.weixin.qq.com URL)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "domain/group is not available to this user / scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scene acquisition link (customer_id) not found"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "custom code already exists, or authorized link already bound"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a WeCom acquisition link (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/delChain": {
            "post": {
                "description": "Batch soft-deletes chains by CODE, scoped to the API key's user (unknown/foreign codes are skipped, idempotent). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/delChain. Scope: chain:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afDelChainIn",
                                        "summary": "body",
                                        "description": "codes to delete"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "codes to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "deleted (result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chains is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Delete short links (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/delWxChain": {
            "post": {
                "description": "Batch soft-deletes 微信外链 chains by CODE, scoped to the API key's user (unknown/foreign codes are skipped, idempotent). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/delWxChain. Scope: chain:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afDelChainIn",
                                        "summary": "body",
                                        "description": "codes to delete"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "codes to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "deleted (msg: 删除成功; result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chains is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Delete WeChat external links (aifabu wire)",
                "tags": [
                    "Aifabu WeChat Chains"
                ]
            }
        },
        "/chain/delWxworkChain": {
            "post": {
                "description": "Batch soft-deletes 企微获客链接 chains by CODE, scoped to the API key's user (unknown/foreign codes are skipped, idempotent). aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/delWxworkChain. Scope: chain:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afDelChainIn",
                                        "summary": "body",
                                        "description": "codes to delete"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "codes to delete",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "deleted (result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chains is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Delete WeCom acquisition links (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/editChain": {
            "post": {
                "description": "Patches chain_title / target_url of a chain identified by its CODE (`chain`), owned by the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/editChain. Scope: chain:write. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afEditChainIn",
                                        "summary": "body",
                                        "description": "fields to patch (chain is required)"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch (chain is required)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afChainEditEnvelope"
                                }
                            }
                        },
                        "description": "updated"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chain is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Edit a short link (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/editWxChain": {
            "post": {
                "description": "Patches a 微信外链 identified by its CODE (`chain`), owned by the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/editWxChain. Scope: chain:write. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afEditWxChainIn",
                                        "summary": "body",
                                        "description": "fields to patch (chain is required)"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch (chain is required)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "updated (msg: 编辑成功！; result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chain is required)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Edit a WeChat external link (aifabu wire)",
                "tags": [
                    "Aifabu WeChat Chains"
                ]
            }
        },
        "/chain/editWxworkChain": {
            "post": {
                "description": "Patches a 企微获客链接 chain identified by its CODE (`chain`), owned by the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chain/editWxworkChain. Scope: chain:write. target_url is only re-resolved when wxwork_type + (target_url or customer_id) are supplied; otherwise the stored destination is left untouched. Result is always an empty array on success. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afEditWxworkChainIn",
                                        "summary": "body",
                                        "description": "fields to patch (chain is required)"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch (chain is required)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afEmptyEnvelope"
                                }
                            }
                        },
                        "description": "updated (msg: 编辑成功！; result is always [])"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error (chain is required, or target_url not a work.weixin.qq.com URL)"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain / scene acquisition link not found"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "authorized link already bound to another chain"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Edit a WeCom acquisition link (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/getChainList": {
            "get": {
                "description": "Returns up to 1000 of the calling user's chains under group_id, newest first, optionally windowed by begin_date/end_date. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getChainList. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain group id (from getChainGroup)",
                        "in": "query",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "pagination offset (default 0)",
                        "in": "query",
                        "name": "start",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 100, max 1000)",
                        "in": "query",
                        "name": "count",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "created-at window start, epoch seconds",
                        "in": "query",
                        "name": "begin_date",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "created-at window end, epoch seconds",
                        "in": "query",
                        "name": "end_date",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afChainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group_id is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List chains in a group (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/getCustomerAssemblyList": {
            "get": {
                "description": "Returns the user's persisted 企微获客助手组件/场景 authorized links (wecom_scene_link), usable as createWxworkChain's customer_id. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getCustomerAssemblyList. Scope: chain:read. NOTE the response shell is `{status,msg,result}`, NOT the `{code,msg,result}` every other aifabu-compat endpoint uses (matches the captured aifabu spec for this one endpoint). Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 20, max 1000)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afCustomerAssemblyEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List selectable WeCom scene-authorized acquisition links (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/getTemplateList": {
            "get": {
                "description": "Returns platform templates and the calling user's landing jump-page templates, paginated. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getTemplateList. Scope: chain:read. `type` is 1 通用跳转页 or 3 对话式跳转页. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 100)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afTemplateListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List jump-page templates (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/getUserDomain": {
            "get": {
                "description": "Returns assignable platform domains and the calling user's approved domains (通用域名 + 专属域名). aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getUserDomain. Scope: chain:read. The id is createChain's `domain` field. Also accepts the key as a `?apikey=` query parameter.",
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afDomainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List usable domains (aifabu wire)",
                "tags": [
                    "Aifabu Chains"
                ]
            }
        },
        "/chain/getWxChainInfo": {
            "get": {
                "description": "Returns a 微信外链's full detail by its CODE (`chain`), scoped to the API key's user. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getWxChainInfo. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain code",
                        "in": "query",
                        "name": "chain",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainInfoEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Get a WeChat external link (aifabu wire)",
                "tags": [
                    "Aifabu WeChat Chains"
                ]
            }
        },
        "/chain/getWxChainList": {
            "get": {
                "description": "Returns the calling user's 微信外链 chains (all sub_types) under group_id, newest first, paginated. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getWxChainList. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain group id",
                        "in": "query",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 20, max 1000)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group_id is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List WeChat external links (aifabu wire)",
                "tags": [
                    "Aifabu WeChat Chains"
                ]
            }
        },
        "/chain/getWxworkChainInfo": {
            "get": {
                "description": "Returns a 企微获客链接 chain's detail by its CODE (`chain`), scoped to the API key's user. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getWxworkChainInfo. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain code",
                        "in": "query",
                        "name": "chain",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxworkChainInfoEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Get a WeCom acquisition link (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/getWxworkChainList": {
            "get": {
                "description": "Returns the calling user's 企微获客链接 chains under group_id, newest first, paginated. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chain/getWxworkChainList. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain group id",
                        "in": "query",
                        "name": "group_id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page number (default 1)",
                        "in": "query",
                        "name": "page",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "page size (default 20, max 1000)",
                        "in": "query",
                        "name": "pageCount",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afWxChainListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group_id is required"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "group not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List WeCom acquisition links (aifabu wire)",
                "tags": [
                    "Aifabu WeCom Chains"
                ]
            }
        },
        "/chain/{id}": {
            "get": {
                "description": "Returns a single chain by id, scoped to the API key's user. Scope: chain:read. User is derived from the key, never from input.",
                "parameters": [
                    {
                        "description": "chain id",
                        "in": "path",
                        "name": "id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Get a chain",
                "tags": [
                    "Chains"
                ]
            },
            "post": {
                "description": "Patches chain_title / target_url / valid_time of a short-link (type=1) chain owned by the key's user, emitting a rule_changed event so the edge reflects it. Scope: chain:write. type/domain/code are immutable from the open surface; a chain of another business (微信外链/活码/卡片/抖音/企微获客) answers 404 — use that business's own endpoint.",
                "parameters": [
                    {
                        "description": "chain id",
                        "in": "path",
                        "name": "id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.updateChainIn",
                                        "summary": "body",
                                        "description": "fields to patch"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "fields to patch",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "updated"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "validation error"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Update a chain",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/chain/{id}/data": {
            "get": {
                "description": "Returns total clicks, unique visitors and a 7-day daily click trend for a chain owned by the key's user. Scope: chain:read.",
                "parameters": [
                    {
                        "description": "chain id",
                        "in": "path",
                        "name": "id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Chain analytics",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/chain/{id}/delete": {
            "post": {
                "description": "Soft-deletes a short-link (type=1) chain (status=0, is_del=1) owned by the key's user, cascading to its side tables, and emits a rule_changed event so the edge stops serving it. Scope: chain:write. A chain of another business answers 404 — use that business's own endpoint.",
                "parameters": [
                    {
                        "description": "chain id",
                        "in": "path",
                        "name": "id",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "deleted"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Delete a chain",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/chainGroup": {
            "get": {
                "description": "Returns the calling user's link groups, optionally filtered by chain_type (?chain_type=). Scope: chain:read. group ids are what createChain's group_id references.",
                "parameters": [
                    {
                        "description": "filter by chain type (1 短链, 2 微信外链, ...)",
                        "in": "query",
                        "name": "chain_type",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "List chain groups",
                "tags": [
                    "Groups"
                ]
            },
            "post": {
                "description": "Creates a link group for the API key's user. Scope: chain:write. chain_type defaults to 1 (短链) when omitted. The returned id can be passed as createChain's group_id.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.createGroupIn",
                                        "summary": "body",
                                        "description": "group to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "group to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "created"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "validation error"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Create a chain group",
                "tags": [
                    "Groups"
                ]
            }
        },
        "/chainGroup/createChainGroup": {
            "post": {
                "description": "Creates a link group for the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/chainGroup/createChainGroup. Scope: chain:write. chain_type defaults to 1 (短链) when omitted. Also accepts the key as a `?apikey=` query parameter (in addition to the header/Bearer forms).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.afCreateGroupIn",
                                        "summary": "body",
                                        "description": "group to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "group to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afGroupCreateEnvelope"
                                }
                            }
                        },
                        "description": "created"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "validation error"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Create a chain group (aifabu wire)",
                "tags": [
                    "Aifabu Groups"
                ]
            }
        },
        "/chainGroup/getChainGroup": {
            "get": {
                "description": "Returns the calling user's link groups, optionally filtered by chain_type. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/chainGroup/getChainGroup. Scope: chain:read. Also accepts the key as a `?apikey=` query parameter. Note: unlike most aifabu endpoints, `result` here is the array directly (no {list,total} wrapper).",
                "parameters": [
                    {
                        "description": "filter by chain type (1 短链, 2 微信外链, ...)",
                        "in": "query",
                        "name": "chain_type",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afChainGroupListEnvelope"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "List chain groups (aifabu wire)",
                "tags": [
                    "Aifabu Groups"
                ]
            }
        },
        "/conversion": {
            "post": {
                "description": "Records a conversion_event for a chain owned by the API-key user and publishes conversion.created for the ad-callback pipeline. Scope: chain:write. Identify the chain via chain_id (numeric) or chain (short code). conv_type must be a known catalog biz-event code (form/register/purchase/…). Provide out_id for idempotent retries. Prefer this endpoint over /v1/landing/convert for external landings (API-key auth, no Host/CORS/cookie coupling).",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.reportConversionIn",
                                        "summary": "body",
                                        "description": "conversion to report"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "conversion to report",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "recorded (or idempotent replay)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "validation / unknown conv_type"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Report a conversion",
                "tags": [
                    "Conversions"
                ]
            }
        },
        "/data/getChainData": {
            "get": {
                "description": "Returns a chain's click analytics as an ARRAY of 15 single-key objects, in aifabu's documented order: conversion_curve, current_retrieval_ratio, visit_count, all_event_data, frequently_referer, field_net, field_os, field_is_new, hours, frequently_ip, visit_province, visit_curve, field_device, field_browser, week. aifabu-wire-compatible with openapi.aifabu.com's GET /v1/data/getChainData. Scope: chain:read. Populated from real click_event rows for click_url/field_os/field_device/field_browser/visit_province/hours/frequently_ip/visit_curve/week/field_is_new/current_retrieval_ratio, from landing_session marks for show_jump/show_qrcode, and from conversion_event for chat_seq_3/5/10; honestly empty (not fabricated) for field_net and for other event channels without a curve mapping. Identify the chain via chain_id (numeric, from getChainList) or the `chain` code alias; from/to default to the last 7 days when omitted. Also accepts the key as a `?apikey=` query parameter.",
                "parameters": [
                    {
                        "description": "chain id (numeric, from getChainList) — required unless chain is given",
                        "in": "query",
                        "name": "chain_id",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "chain code — alias for chain_id",
                        "in": "query",
                        "name": "chain",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "window start, epoch seconds (default: to - 7 days)",
                        "in": "query",
                        "name": "from",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "description": "window end, epoch seconds (default: now)",
                        "in": "query",
                        "name": "to",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuEnvelope"
                                }
                            }
                        },
                        "description": "ok — result is the ordered array described above (per-key shape omitted: heterogeneous single-key objects, see the buildChainData doc comment)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain_id/chain is required, or from must be less than to"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "404": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "chain not found"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Chain analytics (aifabu wire)",
                "tags": [
                    "Aifabu Analytics"
                ]
            }
        },
        "/domains": {
            "get": {
                "description": "Returns assignable platform domains and the calling user's approved domains. Scope: chain:read. The id is createChain/createWxChain's domain_id.",
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "List usable domains",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/templates": {
            "get": {
                "description": "Returns platform templates and the calling user's templates. Scope: chain:read. The id is the jump_template_id used when creating an external link (0 = generic).",
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "ok"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "List jump-page templates",
                "tags": [
                    "Chains"
                ]
            }
        },
        "/upload": {
            "post": {
                "description": "Uploads a PNG/JPEG image (multipart form field `file`, ≤5MiB) under the API key's user and returns its stored object key + a short-lived presigned URL — usable as avatar / scan_qr_url / guide image when creating a chain. Scope: chain:write.",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "title": "file",
                                        "type": "file"
                                    },
                                    {
                                        "title": "kind",
                                        "type": "string"
                                    }
                                ]
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    },
                    "description": "PNG/JPEG image, ≤5MiB | object kind tag (default: upload)"
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "stored"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "missing/too-large/non-image file"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "503": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "object storage unavailable"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Upload an image (QR / avatar)",
                "tags": [
                    "Upload"
                ]
            }
        },
        "/upload/uploadQrImg": {
            "post": {
                "description": "Uploads up to 20 PNG/JPEG images (multipart field `files[]`, repeat the field per file; the singular `file` form is also tolerated) under the API key's user. aifabu-wire-compatible with openapi.aifabu.com's POST /v1/upload/uploadQrImg. Scope: chain:write. Per-file failures are reported in upload_fail_data rather than failing the whole request. Also accepts the key as a `?apikey=` query parameter.",
                "requestBody": {
                    "content": {
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "title": "files[]",
                                "type": "file"
                            }
                        },
                        "multipart/form-data": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    },
                    "description": "PNG/JPEG image(s); repeat the field to send multiple (≤20)",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.afUploadEnvelope"
                                }
                            }
                        },
                        "description": "ok (per-file success/failure lists)"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "no files / too many files / expected multipart form"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "scope denied"
                    },
                    "503": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.aifabuErrorEnvelope"
                                }
                            }
                        },
                        "description": "object storage not configured"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "servers": [
                    {
                        "url": "/openapi/v1"
                    }
                ],
                "summary": "Upload QR/material images (aifabu wire)",
                "tags": [
                    "Aifabu Upload"
                ]
            }
        },
        "/wxchain": {
            "post": {
                "description": "Creates a 微信外链 (type=2) for the API key's user. Scope: chain:write. sub_type selects the WeChat surface (1 扫码 | 2 小程序 | 3 小商店 | 4 企微获客); set that surface's destination fields. A 微信外链 renders a 扫码引导/唤起页 (not a 302). user_id comes from the key principal; domain_id must be a usable platform domain or the user's approved domain. Omit `code` to auto-generate.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "type": "object"
                                    },
                                    {
                                        "$ref": "#/components/schemas/openapimod.createWxChainIn",
                                        "summary": "body",
                                        "description": "微信外链 to create"
                                    }
                                ]
                            }
                        }
                    },
                    "description": "微信外链 to create",
                    "required": true
                },
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/data"
                                        }
                                    ],
                                    "properties": {
                                        "code": {
                                            "example": 1,
                                            "type": "integer"
                                        },
                                        "data": {},
                                        "message": {
                                            "example": "ok",
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        },
                        "description": "created"
                    },
                    "400": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "validation error"
                    },
                    "401": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "invalid API key"
                    },
                    "403": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "domain is not available to this user / scope denied"
                    },
                    "409": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "custom code already exists for this domain"
                    },
                    "429": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "rate limit or quota exceeded"
                    },
                    "500": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/openapimod.openAPIError"
                                }
                            }
                        },
                        "description": "internal error"
                    }
                },
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "summary": "Create a WeChat external link (微信外链)",
                "tags": [
                    "Chains"
                ]
            }
        }
    },
    "openapi": "3.1.0",
    "servers": [
        {
            "url": "/v1/open/v1"
        }
    ]
}