Update Worker environment variable via the API

I want to update my environment variable(s) of my worker through the API but its not working and I’m not sure what I did wrong

Token: Created using the ‘Edit Cloudflare Workers’ template and is valid (used the /verify endpoint)

CURL Script: curl -X PATCH "https://api.cloudflare.com/client/v4/accounts/my_acc_number/workers/scripts/worker_name/" -H "Authorization: Bearer my_token" -H "Content-Type: application/json" -d "{"vars": {"your_environment_variable_name": "new_value"}}"
Error: {"success":false,"errors":[{"code":10000,"message":"PATCH method not allowed for the api_token authentication scheme"}]}

Thanks in advance