The WordPress REST API is more than just a set of default routes. It is also a tool for creating custom routes and endpoints. The WordPress front-end provides a default set of URL mappings, but the tools used to create them (e.g….
Source: https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/