> For the complete documentation index, see [llms.txt](https://docs.nymcard.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nymcard.com/get-started/webhooks/steps-to-configure-a-webhook.md).

# Steps to configure a webhook

Following are the steps to configure a webhook.

**1. Webhook event selection:**

Select the webhook event for which you want to receive the notification as given below.

> &#x20;   **`"events": [`**\
> `        `**`"CARD_STATUS_CHANGE"`**\
> `  `**`]`**

**2. Decide the endpoint:**

Decide the endpoint where you want to receive the webhook notification.&#x20;

Note that the endpoint should be hosted in your destination system.&#x20;

> **"endpoint": "**[**https://example.com**](https://nymcard.com/)**"**

&#x20;

**3. Security configuration:**

Determine the security characteristics as given below, choose the security credentials (username and password).&#x20;

> **`"config": {`**\
> `    `**`"basic_auth_username": "username",`**\
> `    `**`"basic_auth_password": "password",`**\
> `    `**`"custom_headers": [`**\
> `    `**`{`**\
> `        `**`"header_name": "apikey",`**\
> `        `**`"header_value": "306e38e4-54be-469f-beca-4297129289d6"`**\
> `    `**`}`**
>
> **`]`**

&#x20;

**4. Create a webhook:**

You can create a webhook now by sending a **POST** request to **/webhooks** endpoint as given below.

<details>

<summary><a href="https://portal.stg.platform.ae-1.nymcard.com/default/documentation/02_api_specs#tag/Webhooks/operation/createWebhookNotification">POST /webhooks</a></summary>

**`{`**\
`    `**`"endpoint": "`**[**`https://example.com/`**](https://example.com/)**`",`**\
`    `**`"events": [`**\
`        `**`"CARD_STATUS_CHANGE"`**\
`  `**`],`**\
`    `**`"config": {`**\
`        `**`"basic_auth_username": "username",`**\
`        `**`"basic_auth_password": "password",`**\
`        `**`"custom_headers": [`**\
`        `**`{`**\
`            `**`"header_name": "apikey",`**\
`            `**`"header_value": "306e38e4-54be-469f-beca-4297129289d6"`**\
`        `**`}`**\
`        `**`],`**\
`        `**`"created": "2021-05-27T18:48:00.074Z",`**\
`        `**`"modified": "2021-05-27T18:48:00.074Z"`**\
`    `**`}`**\
**`}`**

</details>

{% hint style="info" %}
It is possible to link more than one event with a single endpoint.
{% endhint %}
