Cpanel DNS update

Hi, i am trying to create a script that automaticaly updates a dns record on the server using https api but i am having problems can anyone help?
i am trying to use
Cpanel documentation:
https://api.docs.cpanel.net/cpanel/introduction
this is how far ihave got

tool fetch mode=https url="https://wifialgarve.com/json-api/setsiteip?
domain=yourclient.wifialgarve.com&ip=newip" port=2087 http-method=post http-header-field=
"Authorization:  cpanel  username:APITOKEN"

but gives-me this error
failure: closing connection: <403 Forbidden Access denied> 130.185.84.202:2087 (4)

Do not expect than I study how the API works, this is just a example to fix what you have wroted, but I can nnot check if you have wroted the right commands.

/tool fetch url="https://wifialgarve.com:2087/json-api/setsiteip?domain=yourclient.wifialgarve.com&ip=newip" \
    http-method=post http-header-field="Authorization: cpanel,username: APITOKEN"