# \[Deprecated] Update Webhook Endpoint

{% hint style="warning" %}
`This API is deprecated, please reference to` [`update a live webhook endpoint`](https://docs.uiza.io/api-reference/webhook_endpoints/update-webhook-endpoint) `API instead.`
{% endhint %}

## /v1/webhook\_endpoints/:id

<mark style="color:orange;">`PUT`</mark> `/v1/webhook_endpoints/:id`

#### Path Parameters

| Name | Type   | Description                                     |
| ---- | ------ | ----------------------------------------------- |
| id   | string | The identifier of the live event to be updated. |

#### Request Body

| Name   | Type   | Description                                                                         |
| ------ | ------ | ----------------------------------------------------------------------------------- |
| url    | string | The URL of the webhook endpoint.                                                    |
| secret | string | The token used to validate the communication between Uiza and the webhook endpoint. |

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

```
{
 "id": "f0f207af-b338-4b7f-8d32-fe9cfa9566eb",
 "url": "https://webhook-test.com/live/updated-route",
 "status": "enabled",
 "secret": "updated-secret",
 "created_at": "2019-12-16T11:31:13Z",
 "updated_at": "2019-12-16T11:31:13Z"
}
```

{% endtab %}

{% tab title="401 " %}

```
{
 "message": "You are unauthorized to access the requested resource. Please verify and resubmit.",
 "error_type": "invalid_request_error"
}
```

{% endtab %}

{% tab title="404 " %}

```
{
 "message": "You are unauthorized to access the requested resource. Please verify and resubmit.",
 "error_type": "invalid_request_error"
}
```

{% endtab %}

{% tab title="500 " %}

```
{
 "message": "An unexpected error occurred on Uiza's end.",
 "error_type": "api_error"
}
```

{% endtab %}
{% endtabs %}

{% code title="Sample Request" %}

```
curl -X PUT https://api.uiza.sh/v1/webhook_endpoints/f0f207af-b338-4b7f-8d32-fe9cfa9566eb 
     -H 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64' 
     -d '{"url": "https://webhook-test.com/live/updated-route", "secret": "updated-secret"}'
```

{% endcode %}
