DNS Validation Error when creating new DNS

Hello,
I am currently trying to create DNS records with the cloudflare API, for this I use this code

But I get the following error with this:

{
  "result": null,
  "success": false,
  "errors": [
    {
      "code": 1004,
      "message": "DNS Validation Error", (truncated...)
 in /var/www/pterodactyl/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

I don’t get to see anything more.

$subdomain = test
$protocol = TCP
$allocation[0]->port = the port of the server
$allocation[0]->ip_alias = my domain

Since I don’t get information about what is wrong, I hope someone can help me with this.

Thanks in advance!

You didn’t mention the domain, but it could be this:

Thanks for your reply,

No thats not the problem, its mydomain.net and its proxyt with cloudflare

But i think the problem is that the site where im trying to make the DNS is an DNS of mydomain.net (panel.mydomain.net) so it can’t get the IP of mydomain.net as thats not the site where im doing this on