# Using API, createSite method result with an error

**URL:** <https://answers.netlify.com/t/using-api-createsite-method-result-with-an-error/38911>\
**Category:** Support\
**Tags:** netlify-api\
**Created:** [June 6, 2021, 10:02am UTC](https://answers.netlify.com/t/using-api-createsite-method-result-with-an-error/38911 "2021-06-06T10:02:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [June 15, 2021, 9:36pm UTC](https://answers.netlify.com/t/using-api-createsite-method-result-with-an-error/38911/4 "2021-06-15T21:36:50Z")

</div>

Hey @HadarLetsApp,  
You should be able to use [Netlify API documentation](https://open-api.netlify.com/#operation/updateSite) for that!

It’ll be a PATCH request with this JSON payload:

```json
{
custom_domain: "example.com"
}

```

And in general, this is our best guide to using our API: [[Support Guide] Understanding and using Netlify's API](https://answers.netlify.com/t/support-guide-understanding-and-using-netlifys-api/160)

---

_[View the full topic](https://answers.netlify.com/t/using-api-createsite-method-result-with-an-error/38911)._
