Home assistant on RPI turning led on with a curl command

Dear users,

I have not much knowledge about using rest API’s and the configuration file in home assisstant. What I would like to do is by sending curl commands to activate a GPIO on the raspberry pi home assistant. I could configure an output on the RPI by adding the following lines in the configuration.yaml file.

switch:
  - platform: rpi_gpio
    ports:
      11: Fan Office
      12: Light Desk

But how do I change this configruation so these GPIO pins can be controlled with a curl commando?

Thanks in advance,

Irwin