curl -X POST \ -d '{ "clients": [ { "enabled": true, "name": "apitest", "pubkey": "pub_key_value", "tunneladdress": "10.1.1.100/32", "serveraddress": "192.168.62.105", "serverport":51280, "keepalive": 25} ]}' \ -H "Content-Type: application/json" \ -k \ -u "key:secret" \ https://IP:443/api/wireguard/client/set
{"result":"saved"}
https://forum.opnsense.org/index.php?topic=33177.0