diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
index f4c659e1b82af..d70e2578d4528 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/config.py
@@ -36,7 +36,6 @@
     "warn_deployment_exposure",
     "default_wrap",
     "require_confirmation_dag_change",
-    "enable_swagger_ui",
     "instance_name_has_markup",
 ]
 
@@ -54,6 +53,7 @@ def get_configs() -> ConfigResponse:
         "instance_name": conf.get("webserver", "instance_name", fallback="Airflow"),
         "audit_view_included_events": conf.get("webserver", "audit_view_included_events", fallback=""),
         "audit_view_excluded_events": conf.get("webserver", "audit_view_excluded_events", fallback=""),
+        "enable_swagger_ui": conf.get("api", "enable_swagger_ui"),
         "test_connection": conf.get("core", "test_connection", fallback="Disabled"),
         "dashboard_alert": DASHBOARD_UIALERTS,
     }
diff --git a/airflow-core/src/airflow/cli/commands/config_command.py b/airflow-core/src/airflow/cli/commands/config_command.py
index b8c9d352195ce..7e755c63dd14a 100644
--- a/airflow-core/src/airflow/cli/commands/config_command.py
+++ b/airflow-core/src/airflow/cli/commands/config_command.py
@@ -442,6 +442,10 @@ def message(self) -> str | None:
         config=ConfigParameter("webserver", "access_logfile"),
         renamed_to=ConfigParameter("api", "access_logfile"),
     ),
+    ConfigChange(
+        config=ConfigParameter("webserver", "enable_swagger_ui"),
+        renamed_to=ConfigParameter("api", "enable_swagger_ui"),
+    ),
     ConfigChange(
         config=ConfigParameter("webserver", "error_logfile"),
         was_deprecated=False,
diff --git a/airflow-core/src/airflow/config_templates/config.yml b/airflow-core/src/airflow/config_templates/config.yml
index 6223253e1d3b3..f597843aa3c1b 100644
--- a/airflow-core/src/airflow/config_templates/config.yml
+++ b/airflow-core/src/airflow/config_templates/config.yml
@@ -1318,6 +1318,13 @@ secrets:
 api:
   description: ~
   options:
+    enable_swagger_ui:
+      description: |
+        Boolean for running SwaggerUI in the webserver.
+      version_added: 2.6.0
+      type: boolean
+      example: ~
+      default: "True"
     secret_key:
       description: |
         Secret key used to run your api server. It should be as random as possible. However, when running
@@ -1825,13 +1832,6 @@ webserver:
       type: string
       example: "dagrun_cleared,failed"
       default: ~
-    enable_swagger_ui:
-      description: |
-        Boolean for running SwaggerUI in the webserver.
-      version_added: 2.6.0
-      type: boolean
-      example: ~
-      default: "True"
     require_confirmation_dag_change:
       description: |
         Require confirmation when changing a DAG in the web UI. This is to prevent accidental changes
diff --git a/airflow-core/src/airflow/configuration.py b/airflow-core/src/airflow/configuration.py
index 8dc3a6353196e..2bf3df9816387 100644
--- a/airflow-core/src/airflow/configuration.py
+++ b/airflow-core/src/airflow/configuration.py
@@ -363,6 +363,7 @@ def sensitive_config_values(self) -> set[tuple[str, str]]:
         ("fab", "navbar_hover_color"): ("webserver", "navbar_hover_color", "3.0.2"),
         ("fab", "navbar_text_hover_color"): ("webserver", "navbar_text_hover_color", "3.0.2"),
         ("api", "secret_key"): ("webserver", "secret_key", "3.0.2"),
+        ("api", "enable_swagger_ui"): ("webserver", "enable_swagger_ui", "3.0.2"),
     }
 
     # A mapping of new section -> (old section, since_version).
diff --git a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
index d6841feb1ad88..931fceb1ae563 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_config.py
@@ -51,7 +51,7 @@ def mock_config_data():
             ("webserver", "hide_paused_dags_by_default"): "false",
             ("webserver", "instance_name"): "Airflow",
             ("webserver", "instance_name_has_markup"): "false",
-            ("webserver", "enable_swagger_ui"): "true",
+            ("api", "enable_swagger_ui"): "true",
             ("webserver", "require_confirmation_dag_change"): "false",
             ("webserver", "default_wrap"): "false",
             ("webserver", "audit_view_excluded_events"): "",
diff --git a/providers/fab/src/airflow/providers/fab/www/constants.py b/providers/fab/src/airflow/providers/fab/www/constants.py
index 263caf1576c4c..69e1a1965bf96 100644
--- a/providers/fab/src/airflow/providers/fab/www/constants.py
+++ b/providers/fab/src/airflow/providers/fab/www/constants.py
@@ -24,5 +24,5 @@
 # There is a difference with configuring Swagger in Connexion 2.x and Connexion 3.x
 # Connexion 2: https://connexion.readthedocs.io/en/2.14.2/quickstart.html#the-swagger-ui-console
 # Connexion 3: https://connexion.readthedocs.io/en/stable/swagger_ui.html#configuring-the-swagger-ui
-SWAGGER_ENABLED = conf.getboolean("webserver", "enable_swagger_ui", fallback=True)
+SWAGGER_ENABLED = conf.getboolean("api", "enable_swagger_ui", fallback=True)
 SWAGGER_BUNDLE = WWW.joinpath("static", "dist", "swagger-ui")
diff --git a/providers/fab/www-hash.txt b/providers/fab/www-hash.txt
index 2df879f9871bd..a4653920a2c97 100644
--- a/providers/fab/www-hash.txt
+++ b/providers/fab/www-hash.txt
@@ -1 +1 @@
-dcce95d1f3f0f8e01c1e94c3915367e3acc00c022f76ebb8efad935cafe36d03
+99f91c091b6b4111598d007b2cd771a35383bbd19a69f13652d44cce3d26bf99
