Deploy hooks
A URL that deploys one app when something calls it, for a headless CMS, a build service or any tool that can send a webhook.
A deploy hook is a URL. When something sends a POST to it, launchroom deploys one app. Use it when a headless CMS
(Contentful, Sanity, Strapi, Storyblok) should rebuild your site after you publish, or for a tool that can call a
webhook but can't run the CLI.
Create one
Owners and admins open Settings → Tokens & CLI, go to For CI and press Create deploy hook. Give it a name (deployments it starts show that name, for example "Deployed by Contentful") and pick the app and environment it deploys. Only apps and image services of lasting environments that have been deployed once are offered.
You can also create one from the app itself: open its Settings → Deploy and press Create deploy hook under Deploy hooks. That card lists the hooks of this app in this environment.
The URL is shown once. Copy it into your CMS's deploy hook or webhook setting. It looks like this:
https://launchroom.example.com/api/v1/hooks/dhk_01J…?token=lr_hook_…Try it from a terminal:
curl -X POST "https://launchroom.example.com/api/v1/hooks/dhk_01J…?token=lr_hook_…"What a call does
- An app built from a repository builds the newest commit of its branch again and deploys it. That's what a CMS rebuild needs: the content is fetched during the build.
- An image service deploys again, pulling the image's tag.
- The answer is
202with the deployment's id. When the app can't deploy (it was never deployed, or a variable points nowhere), the answer is409with the reason.
A hook takes no input. Whoever has the URL can start a deploy of that app and nothing else: no settings, no other apps, no API.
Limits and safety
- A hook deploys at most 6 times a minute. More calls answer
429. - A wrong or revoked URL answers
404, the same as one that never existed. - launchroom stores only a hash of the secret. Every call is in the audit log.
- Hooks don't expire. Revoke one on the same page and its URL stops working at once.
Every team member sees the team's hooks, with what each deploys and when it was last called.