# Update a Webhook

## Update a Webhook

<mark style="color:orange;">`PUT`</mark> `https://{{accountSlug}}.myeshopbox.com/api/platform/v1/client-webhook`

This endpoint allows you to update a webhook.

#### Headers

| Name          | Type   | Description                         |
| ------------- | ------ | ----------------------------------- |
| Authorization | string | The Bearer token to access the API. |

#### Request Body

| Name          | Type   | Description                                                                   |
| ------------- | ------ | ----------------------------------------------------------------------------- |
| id            | string |                                                                               |
| webhookMethod | string | The CRUD format of API to be triggered by the webhook                         |
| webhookUrl    | string | The URL of the API which is supposed to be triggered outside Eshopbox domain. |

{% tabs %}
{% tab title="200 Webhook updated successfully." %}

```
{
    "id":"1",
    "resource": "channel_inventory",
    "eventType": "POST",
    "eventSubType": "updated",
    "version": "v1",
    "externalChannelID" : "CLARKS",
    "webhookUrl": "https://hooks.zapier.com/fake-subscription-url",
    "webhookMethod": "POST",
    "createdAt": "2020-02-27T18:32:15.528+05:30",
    "updatedAt": "2020-02-27T18:32:15.528+05:30"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="curl" %}

```
curl --location --request PUT 'localhost:8080/_ah/api/esb/v1/client-webhook' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{Access-Token}}'\
--data-raw '{
	
	
    "id":"1",
    "webhookUrl": "https://hooks.zapier.com/fake-subscription-url",
    "webhookMethod": "POST"
}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eshop.gitbook.io/eshopbox-developers/advanced/events-webhook/update-a-webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
