# Using Deploy Hooks

### About this export

| Field | Value |
| --- | --- |
| **content_type** | lesson |
| **platform** | contentstack-academy |
| **source_url** | https://www.contentstack.com/academy/courses/launch-foundations/using-deploy-hooks |
| **course_slug** | launch-foundations |
| **lesson_slug** | using-deploy-hooks |
| **markdown_file_url** | /academy/md/courses/launch-foundations/using-deploy-hooks.md |
| **generated_at** | 2026-04-28T06:55:46.618Z |

> Part of **[Launch Foundations](https://www.contentstack.com/academy/courses/launch-foundations)** on Contentstack Academy. **Academy MD v3** — structured for retrieval; no quiz or assessment keys.

<!-- ai_metadata: {"lesson_id":"11","type":"text","duration_minutes":1,"topics":["Using","Deploy","Hooks"]} -->

#### Lesson text

## Using Deploy Hooks

A deploy hook allows you to trigger a deployment using a unique URL.

The following are some of the example use cases for Deploy Hooks:

*   Rebuilding your site to reflect changes in a Headless CMS
    
*   Scheduling deployments with Cron Jobs
    

This document guides you through the process of creating, triggering, renaming, and deleting a deploy hook in Launch.

## Prerequisites

1.  [Contentstack account](https://www.contentstack.com/login/)
    
2.  Access to Launch for your organization
    
3.  A project already deployed in Launch
    

## Create a Deploy Hook

Follow the steps given below to create a deploy hook in your project:

1.  From the Launch landing page, click the project card to open your project.
    
2.  In the Environments screen, hover over the **environment** where you created the project and then click the **Environment Settings** icon to configure the deploy hook. For this tutorial, we will be adding a deploy hook to the **Default** environment.
    
      
    
3.  In Environments under Settings, click **Deploy Hooks**.
    
      
    
4.  Click the **\+ New Deploy Hook** button.
    
5.  Enter a name for your deploy hook.
    
    **Note**: The deploy hook name is for your reference. This name will display in your list of deploy hooks.  
    
      
    
6.  Click the **Create Deploy Hook** button.  
    Launch provides you with a unique URL for this deploy hook.
    
      
    

## Trigger a Deploy Hook

Follow the steps given below to trigger a deploy hook:

1.  Click the **Environments** icon in the left panel.
    
2.  Hover over the **Default** environment and click the **Environment Settings** icon to go to the Settings page.
    
      
    
3.  In Environments under Settings, click **Deploy Hooks**.
    
4.  Click the **ellipses** under Actions and then click **Copy URL** to copy the deploy hook URL.
    
      
    
5.  Send a **POST** request to this URL to trigger the deploy hook you created.
    
    **Example Request**  
    curl -X POST
    
    https://cs-domain.com/Launch-path/manage/deploy/deploy-hook-id  
    
    **Example Response**
    
    { "message": "Deployment triggered successfully" }
    
6.  Click the **Environments** icon in the left panel and then go to your environment.
    

You will see that it has triggered a deployment successfully.  

  
If you used a git repository to import your project, then by default, the deploy hook uses the latest commit from the git branch for the deployment.

## Parameter used in a Deploy Hook

Deploy hooks accept the following optional URL query parameter:

*   commit: Parameter that specifies which git commit to deploy on triggering the deploy hook.
    

Here's an example where a deploy hook URL uses the commit parameter:  
curl -X POST https://cs-domain.com/Launch-path/manage/deploy/h83y7hreohuuererh7343?commit=rbg734

The commit can be the full SHA or just the **first seven characters** of your full SHA.

**Note**: When you import a project by uploading a file, you should not pass the commit parameter.

## Rename a Deploy Hook

Follow the steps given below to rename a deploy hook:

1.  Click the **Environments** icon in the left panel.
    
2.  Hover over the **Default** environment and click the **Environment Settings** icon to go to the Settings page.
    
      
    
3.  In Environments under Settings, click **Deploy Hooks**.
    
      
    
4.  Click the **ellipses** under Actions and then click **Edit** to edit the deploy hook URL.
    
      
      
    

## **Delete a Deploy Hook**

Follow the steps given below to delete a deploy hook:

1.  Click the **Environments** icon in the left panel.
    
2.  Hover over the **Default** environment and click the **Environment Settings** icon to go to the Settings page.
    
      
      
    
3.  In Environments under Settings, click **Deploy Hooks**.
    
      
      
    
4.  Click the **ellipses** under Actions and then click **Delete** to delete the deploy hook URL.
    
      
      
    

## Redeploy Automatically when Content is Published on CMS

Launch allows you to set up a site to redeploy automatically when its content is modified in the CMS.

Prerequisites

1.  [Contentstack account](https://www.contentstack.com/login/)
    
2.  Access to Launch for your organization
    
3.  A site on Launch that fetches data from the CMS
    

## Steps for execution

Follow the steps to redeploy automatically when content is published.

1.  Create a [deploy hook](https://www.contentstack.com/docs/developers/launch/deploy-hooks) in Launch.
    
2.  Follow the steps to add the deploy hook as a Webhook to Contentstack CMS.  
    ![Launch\_AutoRedeploy\_CMS\_Content\_CopyURL.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt5812c201178618cb/64a65e74f5591f7bd0e5812f/Launch_AutoRedeploy_CMS_Content_CopyURL.png)
    
    1.  Copy the deploy hook URL.
        
    2.  Go to your stack and then go to **Settings > Webhooks**.  
          
        ![Launch-Auto\_Redeploy-Webhooks.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9553633720b751f0/6434fd345a10e41114ae9343/Launch-Auto_Redeploy-Webhooks.png)  
          
        
    3.  Click the **New Webhook** button.
        
    4.  In the **Name** field, enter a suitable name for the Webhook.
        
    5.  In the **URL To Notify** field, paste the deploy hook URL.  
          
        ![Launch-Auto\_Redeploy-URL\_to\_Notify.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9c5c5c5e2cf1f312/6434fd3435650a1107644370/Launch-Auto_Redeploy-URL_to_Notify.png)  
          
        
    6.  In the **When** field, enter the conditions for the deploy hook to trigger.
        
    7.  Mark the **Enable Webhook** checkbox.
        
    8.  Click the **Save** button.  
          
        ![Launch-Auto\_Redeploy-Save.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blte4701ca95494da8b/6434fd33aa312f114ba7dfc9/Launch-Auto_Redeploy-Save.png)  
          
        
    
    You will see the conditions updated on the deploy hook page in Launch.
    
      
      
      
    
3.  Go to the entry where you want to make the update.
    
4.  Make the necessary updates, and click the **Save** button.
    
5.  Click the **Publish** button, select Environment(s) and Language(s), and then click the **Send** button.  
      
    ![Launch-Auto\_Redeploy-PublishEntry.png](https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blted5a225421cef7d3/6434fd33ab116a10dd6a4253/Launch-Auto_Redeploy-PublishEntry.png)  
      
    On clicking **Publish**, the Webhook gets triggered and the project gets automatically redeployed in Launch.

#### Key takeaways

- Connect **Using Deploy Hooks** back to your stack configuration before moving to the next module.
- Capture one concrete artifact (screenshot, Postman call, or code snippet) that proves the step works in your environment.
- Re-read the delivery versus management boundary for anything you changed in the entry model.

## Supplement for indexing

### Content summary

Using Deploy Hooks. Using Deploy Hooks A deploy hook allows you to trigger a deployment using a unique URL. The following are some of the example use cases for Deploy Hooks: Rebuilding your site to reflect changes in a Headless CMS Scheduling deployments with Cron Jobs This document guides you through the process of creating, triggering, renaming, and deleting a deploy hook in Launch. Prerequisites 1. Contentstack account (https://www.contentstack.com/login/) 2. Access to Launch for your organization 3. A project already deployed in Launch Create a Deploy Hook Follow the steps given below to create a deploy hook in your project: 1. From the Launch landing page, click the project card to open your project. 2. In

### Retrieval tags

- Using
- Deploy
- Hooks
- launch-foundations
- lesson 11
- Using Deploy Hooks
- launch-foundations lesson

### Indexing notes

Index this lesson as a primary chunk tagged with lesson_id "11" and topics: [Using, Deploy, Hooks].
Parent course slug: launch-foundations. Use asset_references URLs as thumbnail hints in search results when present.
Never surface LMS quiz content or assessment answers from this file.

### Asset references

| Label | URL |
| --- | --- |
| Launch\_AutoRedeploy\_CMS\_Content\_CopyURL.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt5812c201178618cb/64a65e74f5591f7bd0e5812f/Launch_AutoRedeploy_CMS_Content_CopyURL.png` |
| Launch-Auto\_Redeploy-Webhooks.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9553633720b751f0/6434fd345a10e41114ae9343/Launch-Auto_Redeploy-Webhooks.png` |
| Launch-Auto\_Redeploy-URL\_to\_Notify.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9c5c5c5e2cf1f312/6434fd3435650a1107644370/Launch-Auto_Redeploy-URL_to_Notify.png` |
| Launch-Auto\_Redeploy-Save.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blte4701ca95494da8b/6434fd33aa312f114ba7dfc9/Launch-Auto_Redeploy-Save.png` |
| Launch-Auto\_Redeploy-PublishEntry.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blted5a225421cef7d3/6434fd33ab116a10dd6a4253/Launch-Auto_Redeploy-PublishEntry.png` |

### External links

| Label | URL |
| --- | --- |
| Contentstack Academy home | `https://www.contentstack.com/academy/` |
| Training instance setup | `https://www.contentstack.com/academy/training-instance` |
| Academy playground (GitHub) | `https://github.com/contentstack/contentstack-academy-playground` |
| Contentstack documentation | `https://www.contentstack.com/docs/` |
| Contentstack account | `https://www.contentstack.com/login/` |
| deploy hook | `https://www.contentstack.com/docs/developers/launch/deploy-hooks` |
| Launch\_AutoRedeploy\_CMS\_Content\_CopyURL.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt5812c201178618cb/64a65e74f5591f7bd0e5812f/Launch_AutoRedeploy_CMS_Content_CopyURL.png` |
| Launch-Auto\_Redeploy-Webhooks.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9553633720b751f0/6434fd345a10e41114ae9343/Launch-Auto_Redeploy-Webhooks.png` |
| Launch-Auto\_Redeploy-URL\_to\_Notify.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt9c5c5c5e2cf1f312/6434fd3435650a1107644370/Launch-Auto_Redeploy-URL_to_Notify.png` |
| Launch-Auto\_Redeploy-Save.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blte4701ca95494da8b/6434fd33aa312f114ba7dfc9/Launch-Auto_Redeploy-Save.png` |
| Launch-Auto\_Redeploy-PublishEntry.png | `https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blted5a225421cef7d3/6434fd33ab116a10dd6a4253/Launch-Auto_Redeploy-PublishEntry.png` |
