Skip to content

How to stop create customer via rest API in magento 2?

I do not know how to stop to create customers via REST API in magento 2. I have magento 2 instance in 2.4.0 version

I found a below code in vendor/magento/module-customer/etc/webapi.xml path

<route url="/V1/customers" method="POST">
        <service class="MagentoCustomerApiAccountManagementInterface" method="createAccount"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>

Above code to create customer via rest api, how can I disable this flow?