You have most of the pieces you need, but not all.
You need a patch config
<processor patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']"
MapRoute is meant for MVC controllers whereas MapHttpRoute is meant for Web API controllers.
ServiceApiController is ApiController, and you should register your route with MapHttpRoute instead of MapRoute.
Just register your route with:
config.Routes.MapHttpRoute("botroutes", "api/messages", new
As described in this blog post -https://letsdositecore.wordpress.com/2018/11/13/possibly-simplest-way-of-enabling-dependency-injection-in-sitecore-controllers-and-apicontrollers/ , you can use a ServiceConfigurator to register your API controllers using Sitecore DI. Don't forget to patch it in.
public class ...
It is not supported.
They both are used only for accessing items content, CRUD operations over an item and items searching.
You can find full API overview in official developer guides:
Sitecore Service Client
Item Web API
From the exception it looks like it's ViewContext missing.
I'm not sure why it happens in your scenario but to fix this you can try the following code:
It will make sure that ViewContext is pushed to the ContextService.