Showing results for 
Show  only  | Search instead for 
Did you mean: 

update name servers to null or different values with godaddy api and bash

I am writing a bash script that will help manage several hundred domains at once by accepting a list of domains via text file, then run it through a curl that in this case will null the name servers for that domain.  I have tried this and adding a couple active servers, so far neither of which work.  I believe it is a formatting issue with the --data.




curl -X PATCH "${dom}" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -H "$HEADERS" \ -d "{ \"nameServers\": [ null ]}";




I am receiving the following errors when running the above curl:



{"code":"INVALID_BODY","fields":[{"code":"UNEXPECTED_TYPE","message":"is not a string","path":"body.nameServers[0]"}],"message":"Request body doesn't fulfill schema, see details in `fields`"}