If our integrations with the most popular CI systems don't fit your use case, you can always fall back to custom webhooks.โโโโโ๏ปฟโ๏ปฟโโโโโโ๏ปฟ๏ปฟโ๏ปฟโโโโโโโโโ๏ปฟโโโโโโ๏ปฟโโโโโโ๏ปฟโโโโโโโโโโโโโโโ๏ปฟโโโโ๏ปฟ๏ปฟโโโ๏ปฟโโ๏ปฟโโ๏ปฟโ๏ปฟโโ๏ปฟโโโโ๏ปฟโโ๏ปฟ๏ปฟโโ๏ปฟโโโโโโโ๏ปฟโโโโโโโโโโ๏ปฟโโโโโโโโโโโโโโโ๏ปฟโโโโโโโโโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโ๏ปฟโ๏ปฟโโโโ๏ปฟ๏ปฟโโ๏ปฟ๏ปฟโโโ๏ปฟโโ๏ปฟโโ๏ปฟโ๏ปฟโโ๏ปฟโโโโโโโโโโ๏ปฟโโโโ๏ปฟ๏ปฟโโโ๏ปฟโโ๏ปฟโโ๏ปฟโ๏ปฟโโ๏ปฟโโโโ๏ปฟโโ๏ปฟ๏ปฟโโ๏ปฟโโโ๏ปฟ๏ปฟโโโโโโโโโโโโโ๏ปฟโโโโ๏ปฟ๏ปฟโ๏ปฟโโโโ๏ปฟ๏ปฟโโโโโ๏ปฟโโโโโโโโ๏ปฟโโโ๏ปฟ๏ปฟโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโโโโโ๏ปฟโ๏ปฟโโ๏ปฟ๏ปฟโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโโ๏ปฟ๏ปฟโโโโโ๏ปฟโโโโโโโโ๏ปฟโโ๏ปฟโ๏ปฟโโ๏ปฟ๏ปฟโ๏ปฟโ๏ปฟโ๏ปฟโโโ๏ปฟโโโ๏ปฟโ๏ปฟโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโ๏ปฟโโโโโโโ๏ปฟ๏ปฟโ
With custom webhooks, every time an editor requires a new publication of the website with the Publish changes button, a POST request will be performed to a custom-endpoint you are in charge of specifying in the settings. The endpoint must respond with a 200 status code, and react producing a new publication of the website.
Once you complete the publication process, you need to let DatoCMS how did it go, so we can in turn notify the editor. To do this, you need to make a POST request to a specific endpoint with a different JSON body depending on whether the publication was completed with success or it failed.
# Successful build notification examplecurl -n -X POST https://webhooks.datocms.com/XXXXXXXXXXXXXXXXXXXX/deploy-results -H 'Content-Type: application/json' -d '{ "status": "success" }'# Failed build notification examplecurl -n -X POST https://webhooks.datocms.com/XXXXXXXXXXXXXXXXXXXX/deploy-results -H 'Content-Type: application/json' -d '{ "status": "error" }'