Error when deploying to Netlify DNS via Netlify API

I have this JS Code below that creates a subdomain. It deploys it to the Netlify DNS and is successful but it shows the error in the picture below:

fetch('https://api.netlify.com/api/v1/dns_zones/upmeet_me/dns_records', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer abcdefg-123456-1234-1-123456789'
    },
    body: JSON.stringify({
        'hostname': 'enterprise.test.upmeet.me',
        'type': 'NETLIFY',
        'value': 'https://enterprise--upmeet.netlify.app',
        'site_id': 'c79d33dc-7dee-4080-ae3a-28932c68eacf'
    })
});

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can! Helpful information would be:

  1. what your build settings are
  2. a full copy of your latest deploy log
  3. your package.json, etc.