Create/update Workers environment variables by API

hi, i was using the below endpoint to update workers secret with curl and it was working until recently, am getting “workers.api.error.missing_param”

/accounts/${accountId}/workers/scripts/${scriptName}/secrets`

curl -X PUT
-H “Content-Type: application/json”
-H “Authorization: Bearer $apiToken”
“\https://api.cloudflare.com/client/v4/accounts/$accountId/workers/scripts/$scriptName/secrets”
-d ‘{“name”:“test”,“text”:“‘test’”,“type”:“secret_text”}"’

{
“result”: null,
“success”: false,
“errors”: [
{
“code”: 10003,
“message”: “workers.api.error.missing_param”
}
],
“messages”:
}

any ideas?

thanks