Du musst zuerst die ID des Records herausfinden. Dazu kannst du alle DNS Records der Zone abrufen.
curl -X GET "https://api.cloudflare.com/client/v4/zones/xxx/dns_records" -H "Authorization: Bearer xxx" -H "Content-Type: application/json"
Das Ergebnis enthält die ID's der Einträge, z.B:
{
"result": [
{
"id": "abc123def456",
"type": "TXT",
"name": "example_key",
"content": "example_value"
}
],
"success": true
}
Anhand dieser ID kannst du den Record löschen.
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/xxx/dns_records/abc123def456" -H "Authorization: Bearer xxx" -H "Content-Type: application/json"