Rasa HTTP API intent <-> template mapping


Use case:

Using Rasa to implement a conversation between our users and product via text messages.

  1. User sends a text message.
  2. We receive it and right now manually reply back.
  3. Instead we have used all the incoming data to train Rasa models to detect multiple intents.
  4. We have defined our intents <-> actions mapping in our stories.md file.
  5. We have defined our actions <-> template mapping in our domain.yml file.


  1. Rasa server is up and running.
  2. Text message comes in.
  3. We make an HTTP call to the parse endpint (HTTP API) to fetch the intent.
  4. And now with this intent, I need to fetch the appropriate action, and the template text corresponding to that action defined in domain.yml.
  5. How do I do that with the HTTP API?


  1. Once I got the intent from the API, I tried to use the /domain endpoint (HTTP API) hoping I could get the intent <-> template mapping from there. But that isn’t possible from the way the API responses are implemented from the Rasa server.

Just use the /webhooks/rest/webhook endpoint! You will need to send the user message and a unique conversation id to this endpoint like this: {“sender”: “rnbdvkdvb823or2nkf”, “message”: “hi”}. As response you will get an array of responses you defined in the stories.md and domain.yaml. But with this solution you will not get any NLU results.

Yes! I had just stumbled upon https://rasa.com/docs/rasa/user-guide/connectors/your-own-website/#restinput (which seems to be hidden in the user guide Introduction to Rasa Open Source) and your answer just validated it! :slight_smile:

Could you quickly mention what you mean by But with this solution you will not get any NLU results?

Does that mean I won’t get the entities, confidence levels, etc?

Thats right. You will just get the responses and neither extracted entities or the confidence level.

1 Like

Gotcha, thank you so much for helping out and for being so prompt. As long as the rest webhook uses the intent training data we provided and maps it to the corresponding template response using the trained model, I think we should be good. :slight_smile: