Support Forums

Rollback API endpoint returns 404

In the Netlify API reference it is stated that there is a rollbackSiteDeploy endpoint that one can assumably use to rollback the production deploy of a site to a previous deployment.

However whenever I try to hit that endpoint it replies with 404. All other endpoints work fine, I’m able to list sites, deploys and even to restore specific deploys using the restoreSiteDeploy endpoint - which indicates that Auth is working fine, and there are indeed other deploys to rollback to.

I’ve noted that the endpoint is not described in the regular documentation site, which leads me to believe that maybe the endpoint is not active at all and it is a mistake that it is listed in the API reference. This would sadden me, as I really need that endpoint.

I’ve tried with the following site ID: ac550218-d90d-46c4-914a-4b09fff4d0d5
So POST https://api.netlify.com/api/v1/sites/ac550218-d90d-46c4-914a-4b09fff4d0d5/rollback

(I’m not comfortable sharing the site name publicly)

hey there @JReinhold , i think i have some good news for you. It seems like the endpoint is valid, but a request needs to come as PUT not POST like it says in the reference. We are filing an issue to get that corrected (thanks for alerting us to this!) but in the mean time, can you try as a PUT and see if it works for you?

Thank you! It works well and I can see now that the documentation has been updated.