Forwarding a JSON through Home assistant

Hello there, so I started working with home assistant only recently and am still learning the ropes. I feel that I hit a wall and don’t know what to do at this point. My issue is that I would like to send a simple JSON to home assistant from a voice recognition app that I made and then make home assistant send that JSON to another app running on a different device.

My code that sends the JSON in the voice recog. app in c# :

var httpWebRequest = (HttpWebRequest)WebRequest.Create(“http://hassIPaddress:8123/api/?api_password=PASS”);
httpWebRequest.ContentType = “application/json”;
httpWebRequest.Method = “POST”;

        using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            string json = "{\"number\":\"4\"}";


So this part should be fine, my problem starts down here.
I included a rest sensor in my configuration file but it doesn’t create an entity so I am not sure how to call on him
looks like this in my configuration.yaml file ↓


but I admit that I do not quite understand the REST API. I would like to make an automation on the home assistant side something like:

alias: Send JSON to a web server
(Rest api detects a sent JSON)
(Rest api sends the JSON at an ip address)
service: persistent_notification.create
message: “JSON was accepted and sent”

I thought maybe some of you already did something like this. I would be really grateful for any help or comments about what am I doing wrong.

Just use a shell command. The json send in the body to a shell command is available within the shell command. So you could make a shell command like this:

  replay_json: 'curl -H "Content-Type: application/json" -X POST -d \'{{ json_value }}\' THE_IP:PORT'