# Configure a Webhook in GitHub

{% hint style="info" %}
After the 25.3.9 release, the structure of the webhook payload URL was updated. Customers need to update the webhook URL in the repository settings of their remote repo. Some customers are still using the old webhook URL containing **autorabitrest**, which should now be replaced with api.

Example:

Old URL: [https://na25.autorabit.com/**autorabitrest/**&#x77;ebhook/triggerSCMPushrequest](https://na25.autorabit.com/autorabitrest/webhook/triggerSCMPushrequest)

Updated URL:[ ](https://na25.autorabit.com/api/webhook/v2/%3COrgName%3E/trigger-scm-push-request)[https://na25.autorabit.com/api/webhook/v2/\<OrgName>/trigger-scm-push-request](https://na25.autorabit.com/api/webhook/v2/%3COrgName%3E/trigger-scm-push-request)

Unless you update the Payload URL, you might face pull request/trigger build-on-commit jobs triggering.
{% endhint %}

## A. Create a Webhook API Token from ARM

Follow the steps below to create a webhook API token in ARM:

1. Log in to ARM.
2. Navigate to the **Admin** section and select **API Token**.
3. Click **Create API Token**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F2Ok9j5MJ910NKlY1eJe1%2Fimage.png?alt=media&#x26;token=83b473af-d2bc-4467-9d08-e527dc5e5793" alt=""><figcaption></figcaption></figure>

4. Enter a **Token Name**.
5. Select **Type** as **webhook**.
6. (Optional) Add a **Description**.
7. Click **Create Option**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fxr7V9t1vKFT4CWvSBpnC%2Fimage.png?alt=media&#x26;token=fb715da2-0674-4251-9871-4ea04c948e98" alt=""><figcaption></figcaption></figure>

8. Your API token is now created.

## B. Create Webhook with Authentication on GitHub

Webhooks allow external services to receive notifications about repository events. GitHub sends a POST request to the configured URL when those events occur.

### Steps to Configure:

1. Go to <https://github.com/login> and log in.
2. Open your target repository.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FYnBwooWLJkfXEKrixPNd%2Fimage.png?alt=media&#x26;token=9f398b43-82ea-4633-a47c-7659bd086fc7" alt=""><figcaption></figcaption></figure>

3. Click **Settings** in the right panel.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FeIIDSyCK6CeYh6fOVXA8%2Fimage.png?alt=media&#x26;token=0dc630b8-a734-44e6-bf84-dd4bfaee4ff2" alt=""><figcaption></figcaption></figure>

4. In the left menu, click **Webhooks & Services**, then **Add Webhook**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FGjAlngNHnFFjGhPzOdxX%2Fimage.png?alt=media&#x26;token=e458282e-34ee-4180-80c7-0851123c0285" alt=""><figcaption></figcaption></figure>

5. In the **Payload URL**, enter the webhook endpoint:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fvitsu8A1W16GIXqPWWv0%2Fimage.png?alt=media&#x26;token=58e280c1-f556-4e82-ae1d-2a714597b60e" alt=""><figcaption></figcaption></figure>

6. Enter the **Secret Key** from ARM’s API token.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fc7JMwsBCJqRfy100cg17%2Fimage.png?alt=media&#x26;token=c37dadf7-1321-423d-9e1f-b82e4ea7a410" alt=""><figcaption></figcaption></figure>

7. Set **Content Type** to `application/json`.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FVBxkeaze98g40Y2QxLZ5%2Fimage.png?alt=media&#x26;token=3a15036b-6455-46bd-aac4-33451a9a8af3" alt=""><figcaption></figcaption></figure>

8. Choose **Just the push events**.
9. Click **Add Webhook**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FvxGLRoUHkr3XiayC01FB%2Fimage.png?alt=media&#x26;token=e724eec1-3ae0-46ad-9f19-7ee3c5dafb82" alt=""><figcaption></figcaption></figure>

10. To trigger webhooks for pull requests, select **Let me select individual events** and check **Pull requests**.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fz7eJ8vebWlQDrVjgJzJn%2Fimage.png?alt=media&#x26;token=b5fc9492-e0cd-4b74-845d-ba5b0d404399" alt=""><figcaption></figcaption></figure>

11. Click **Add webhook** to finalize.

## Smart Commits

Smart Commits allow linking commits to ALM stories using custom comment patterns. For example:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FhN4c0Xh8yUBorsg4iv23%2Fimage.png?alt=media&#x26;token=1c2c9b7e-9707-4ce1-9093-365e0f6eb6d8" alt=""><figcaption></figcaption></figure>

To configure a webhook in your repository:

* Enable the **Enable auto update on webhook** checkbox to reveal the webhook URL.
* For more repository-specific instructions, refer to the [Webhook Configuration Guide](file://product-guides/arm/arm-features/webhooks).
* You may also choose to [Sync External Smart Commits](file://product-guides/arm/arm-features/version-control/introduction-to-version-control/version-control-repositories-summary).

## For Enterprise Customers

Use the following endpoints for enterprise-specific integrations: /api/webhook/v2//enterprise/trigger-scm-push-request /api/webhook/v2//enterprise/sync-alm-commits
