API update site domain alias, adding jsut the alst one from the list


I try to update my domain aliases through Netlify API.
I create a PATCH request to https://api.netlify.com/api/v1/sites/xxxxx
with the body containing access_token and domain_aliases which is a list ["first.example.com", "second.example.com"]. Every time I make that call, just the last domain from the list, second.example.com, is added to netlify, the rest are ignore.

Since that’s the only way we use our own API (adding one at a time), that may be intended. I’d suggest iterating one at a time (but that will create problems around lets encrypt rate limits for provosioning certificates if you add more than about 10 to a site within a week), or that you let us know all the names you want to add to a site so we can do it at once.

To self-serve, you could create multiple sites from the same repo and apply no more than 10 names to each site (serially).

One at the time is not working via API, it will overwrite all the domain aliases,

ah, ok, I see.

When I add a second alias to a site, this is what the call looks like.

HTTP PUT to /api/v1/sites/my-site-id-here


I was adding only “alias-test.cyclocrass.com” in that post and it seemed to work well.