<NME> urls_api_v2.py
<BEF> """External API urls."""

from django.urls import include, path

from modoboa.core.extensions import exts_pool

app_name = "api"

urlpatterns = [
    path('', include("modoboa.core.api.v2.urls")),
    path('', include("modoboa.admin.api.v2.urls")),
    path('', include("modoboa.parameters.api.v2.urls")),
    path('', include("modoboa.limits.api.v1.urls")),
    path('', include("modoboa.relaydomains.api.v1.urls")),
    path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('token/refresh/', TokenRefreshView.as_view(),
         name='token_refresh'),
    path('', include("modoboa.core.urls_api")),
    path('', include("modoboa.admin.urls_api")),
    path('', include("modoboa.parameters.urls_api")),
    path('', include("modoboa.limits.urls_api")),
    path('', include("modoboa.relaydomains.urls_api")),
    path('', include("modoboa.dnstools.urls_api")),
]

urlpatterns += exts_pool.get_urls(category="api")

<MSG> Make a clear distinction between v1 and v2 API endpoints.

<DFF> @@ -15,12 +15,12 @@ urlpatterns = [
     path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
     path('token/refresh/', TokenRefreshView.as_view(),
          name='token_refresh'),
-    path('', include("modoboa.core.urls_api")),
+    path('', include("modoboa.core.api.v2.urls")),
     path('', include("modoboa.admin.urls_api")),
-    path('', include("modoboa.parameters.urls_api")),
+    path('', include("modoboa.parameters.api.v2.urls")),
     path('', include("modoboa.limits.urls_api")),
     path('', include("modoboa.relaydomains.urls_api")),
-    path('', include("modoboa.dnstools.urls_api")),
+    path('', include("modoboa.dnstools.api.v2.urls")),
 ]
 
 urlpatterns += exts_pool.get_urls(category="api")

Make a clear distinction between v1 and v2 API endpoints.