# &#x20;Ed-Tech

## Add webhook destination

Log in to your Segment account, open workspace, and select source. Click on **Add Destination** and search and select [**Webhooks**](https://segment.com/docs/connections/destinations/catalog/webhooks/).&#x20;

<figure><img src="https://1173113760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYEKIeE9xnHLXuuwEs8zo%2Fuploads%2FOyvB25s76JNFb7baGIgo%2Fimage.png?alt=media&#x26;token=a431ac68-9b40-447e-b0d8-c3e6bddb1654" alt=""><figcaption></figcaption></figure>

## Create Mapping

Next after creating the destination, click the **Mappings** tab and add a new mapping

<figure><img src="https://1173113760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYEKIeE9xnHLXuuwEs8zo%2Fuploads%2FREUTn1hRccz8Qhz7zo0X%2Fimage.png?alt=media&#x26;token=b7f188fa-9325-406d-b3db-1258d1c8471e" alt=""><figcaption></figcaption></figure>

## Set Event types to send to Quest

Select the event types that you want to send to Quest. In this example, we select identify, group, and track, but you can select any event type you want to send to Quest.

<figure><img src="https://1173113760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYEKIeE9xnHLXuuwEs8zo%2Fuploads%2Fdn9GBIgBMLodAa3WjPQc%2Fimage.png?alt=media&#x26;token=dc6cbe17-43f9-45fd-bcc7-c74ba82d2bd5" alt=""><figcaption></figcaption></figure>

## Add Webhook URL

Fill the Select mappings with using:

* `POST` as Method
* `PROD - https://api.questprotocol.xyz/api/segment/get-data` as the URL
* `STAGING -` \
  `https://staging.questprotocol.xyz/api/segment/get-data` as the URL
* 100 as **Batch Size**. Note: if you send fewer than 100 events per day, it is recommended to set this to a lower value to avoid delays in sending events to Quest.
* Request format\
  `{ userId, event, properties } = req.body`\
  &#x20;`entityId is included in properties`&#x20;
* `Pass headers - apikey`\
  `apikey can be found in` [`Settings`](https://staging.questlabs.ai/admin/settings)

<figure><img src="https://1173113760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYEKIeE9xnHLXuuwEs8zo%2Fuploads%2F21Sq2Bnbg6Ix8AX6dbLD%2Fimage.png?alt=media&#x26;token=9c19c748-995a-4723-bb06-b6d5847f9bbd" alt=""><figcaption></figcaption></figure>

Finally, set **Enable Batching?** to **No**. \
Optionally, you can send a test event to verify that the webhook is working. Click **Save** to save the webhook.

## Save & enable webhooks destination

Open the **Settings** tab and enable the Destination & save the changes.

<figure><img src="https://1173113760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYEKIeE9xnHLXuuwEs8zo%2Fuploads%2FhdeHQ9oPlAhtFypXwRT6%2Fimage.png?alt=media&#x26;token=dc6b72f4-d77b-4a02-8134-2d90655e9fcd" alt=""><figcaption></figcaption></figure>

Congratulations! You have successfully set up Quest as a destination for Segment.
