curl -i -X PUT -H "Authorization: sso-key $MY_KEY:$MY_SECRET" -H "Accept: application/json" -H "Content-Type: application/json" --data [{"fqdn":"$fqdn","mask":{"title":"$title"},"type":{"MASKED","REDIRECT_TEMPORARY"},"url":"$url"}] "https://api.godaddy.com/v2/customers/$CustomerId/domains/forwards/$fqdn"
{"code":"INVALID_BODY","fields":[{"code":"INVALID_BODY","message":"invalid character 'q' in literal false (expecting 'a')","path":"body"}],"message":"Request body doesn't fulfill schema, see details in `fields`"}
What is the correct form of JSON here? Thanks for future answers
Solved! Go to Solution.
I solved the problem with making a data.json file that contains:
{"fqdn":"$fqdn","mask":{"title":"$title"},"type":"MASKED","url":"$url"}
and then access it,
curl -i -X PUT -H "Authorization: sso-key $MY_KEY:$MY_SECRET" -H "Accept: application/json" -H "Content-Type: application/json" --data @data.json "https://api.godaddy.com/v2/customers/$CustomerId/domains/forwards/$fqdn"
I solved the problem with making a data.json file that contains:
{"fqdn":"$fqdn","mask":{"title":"$title"},"type":"MASKED","url":"$url"}
and then access it,
curl -i -X PUT -H "Authorization: sso-key $MY_KEY:$MY_SECRET" -H "Accept: application/json" -H "Content-Type: application/json" --data @data.json "https://api.godaddy.com/v2/customers/$CustomerId/domains/forwards/$fqdn"