Security advice for simple data transfer

I know very little about web site software, which makes me a potential liability.

I want to create a simple way to transfer a small amount of information between a dedicated PC and a mobile phone. I can write the software for both. I don’t want to use port forwarding for the PC.

My thought is to transfer data like this-

The PC can send a GET or a PUT request to the web address (https://www.blahblah) using an API key type of code. The server can send a reply with data as needed.

The phone does the same maybe with another key.

The speed of updating the data is not critical, if there is a 10 second delay that’s fine. There will be no visual aspect to the website and any requests without the correct key will be rejected.

How safe, or not, is this approach? If it is a bad idea I would welcome any suggestions on what I should learn, or where I should look.