# 修改 Webhook 端点 (/zh/docs/conta-digital/endpoints/webhooks/put_webhook)

## PUT /transactions/webhooks/{webhookId}

`PUT https://api.hub.payzu.com.br/api/v1/transactions/webhooks/{webhookId}`

Scope: `WEBHOOK_WRITE`. Changes the URL or the events of an endpoint, or deactivates and reactivates it. Send at least one field.

### Path params

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `webhookId` | string | yes | Endpoint identifier. |

### Body params

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `url` | string | no | New public HTTPS URL. — format: uri; maxLength: 2048 |
| `events` | string[] | no | New list of events. At least one. |
| `isActive` | boolean | no | `false` stops sending webhooks to the endpoint immediately. |

### Responses

**200** Endpoint updated.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string | yes | Endpoint identifier. |
| `url` | string | yes | Endpoint URL. |
| `events` | string[] | yes | Subscribed events. |
| `isActive` | boolean | yes | Whether the endpoint receives webhooks. |
| `createdAt` | string | yes | Date and time in ISO 8601, UTC. — format: date-time |
| `updatedAt` | string | yes | Date and time in ISO 8601, UTC. — format: date-time |

**400** Invalid request.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**401** Missing, invalid or expired credential.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**403** Not allowed: scope, IP or disabled operation.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**404** Not found, or from another account.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**409** Conflict with the current state.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |

**422** Business rule refusal.

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | yes | Description in Portuguese, ready to display. It may change at any time. |
| `code` | string | yes | Stable error code. Your system decides what to do based on it. |
| `details` | object | no | Structured error context, when available. |