> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy Failure Webhook

> Updates the webhook URL for proxy connection failure callbacks

## Overview

Method used to update the webhook URL where proxy connection failure callbacks will be received.

***

## Parameters

<ParamField path="instanceId" type="string" required>
  Your instance ID. Available in the Z-API panel under **Instances**.
</ParamField>

<ParamField path="token" type="string" required>
  Your Z-API instance token.
</ParamField>

## Attributes

<ParamField body="value" type="string" required>
  Webhook URL that will receive the failure callbacks.
</ParamField>

***

## Request Body

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "value": "http://localhost:3001/api/webhook"
}
```

***

## Callback Behavior

If an error occurs while connecting using the configured proxy, **3 retry attempts** will be made.

If the connection fails on the third attempt, the instance is connected **without using any proxy**, and a webhook is triggered to the URL configured at this endpoint, with the following payload:

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "type": "ProxyCallback",
  "instanceId": "3F2XXXXXXXXXXXXXXXXXXXA2FF",
  "error": "The instance was connected without proxy, the configured proxy (socks5://user:senha123@localhost:1080) failed 3 times to connect."
}
```

***

## Response

### 200

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "value": true
}
```

### 405

In this case, make sure you are sending the correct method specification, i.e., check whether you sent the PUT request as specified at the beginning of this topic.

### 415

If you receive a 415 error, make sure to add the "Content-Type" header of the object you are sending in the request, in most cases "application/json".
