Extracting command data from a REST API
What's the point of string input = value;? Why not work with value directly?



Comments should tell me why,  not what. If you suspect I cannot detect //splitting of string into substrings from your code, then your code is bad.



testModel is a class and thus should be PascalCase;.



cmdText is a collection of commands? That variable name doesn't suggest so at all. No wonder you need to preface it with //list of commands. If it is a list of commands, call it commands. Or considering the context, validCommands.



What's the point of this:

if(cmdText.Contains(payload.CommandText))
{
    //return valid
}


This doesn't do anything. 



You start out using var, yet later on you get more explicit: HttpResponseMessage message, string result. Be consistent.

Same for your if...else:

if (message.IsSuccessStatusCode)
{
    string result = message.Content.ReadAsStringAsync().Result;
    return message.Content.ReadAsStringAsync().Result;
}
else
return message.StatusCode+"kindly contact to administrator";


The bad indentation hide that return message.StatusCode+"kindly contact to administrator"; is actually your else. Always use brackets!



What's the point of string result = message.Content.ReadAsStringAsync().Result;? Why not simply return message.Content.ReadAsStringAsync().Result;?



Quite frankly this code looks very unfinished. Your style is inconsistent, indentation is all over the place, there are superfluous blank lines (after using (var httpClient = new HttpClient()) for instance), the comments are superfluous, there's code in there that doesn't do anything,...

This also looks like a method in a Controller, and that's worrying. Because even if it's a mere 50 lines, if you have several methods like this pretty soon your controller class will be very bloated. Moreover this one method does three things:


convert the incoming data into a payload
checking the payload against a list of values
posting the payload to another API


Each of these should be their own method, and thus the body of this controller should be its own class, split into multiple methods. Look for instance at MediatR to "un-bloat" your controllers.