response="$(_post "{\"domain\":\"$domainUpdate\",\"update\": {\"type\":\"TXT\",\"name\":\"$fullchallengedomain\",\"content\":\"$txtvalue\",\"ttl\":0}}"$JAPIendpoint"" POST "application/json")"
response="$(_post "{\"domain\":\"$_domain\",\"update\": {\"type\":\"TXT\",\"name\":\"$fullchallengedomain\",\"content\":\"$txtvalue\",\"ttl\":0}}"$JAPIendpoint"" POST "application/json")"
if ! printf"%s""$response"| grep \"code\":0>/dev/null;then
if ! printf"%s""$response"| grep \"code\":0>/dev/null;then
_err "There was an error updating the TXT record..."
_err "There was an error updating the TXT record..."
response="$(_post "{\"domain\":\"$domainUpdate\",\"delete\": {\"type\":\"TXT\",\"name\":\"$fullchallengedomain\",\"content\":\"$txtvalue\",\"ttl\":0}}"$JAPIendpoint"" POST "application/json")"
response="$(_post "{\"domain\":\"$_domain\",\"delete\": {\"type\":\"TXT\",\"name\":\"$fullchallengedomain\",\"content\":\"$txtvalue\",\"ttl\":0}}"$JAPIendpoint"" POST "application/json")"
if ! printf"%s""$response"| grep \"code\":0>/dev/null;then
if ! printf"%s""$response"| grep \"code\":0>/dev/null;then
_err "There was an error deleting the TXT record..."
_err "There was an error deleting the TXT record..."