Using API to get response

Is there any way we can implement API to get a response from the RASA bot?if yes can I get some examples

  1. run rasa server
rasa run 
  1. initiating a request
curl -X POST  \
  'http://localhost:5005/webhooks/rest/webhook' \
 \
  -d '{
    "sender": "xxxxx",
    "message": "hi"
}'