# Register webhook endpoint (/en/docs/conta-digital/endpoints/webhooks/post_webhook)

## POST /transactions/webhooks

`POST https://api.hub.payzu.com.br/api/v1/transactions/webhooks`

Scope: `WEBHOOK_WRITE`. Registers a URL to receive the webhooks of the chosen events. The response carries the secret that signs the webhooks, and it only appears there.

### Body params

| Field | Type | Required | Details |
| --- | --- | --- | --- |
| `url` | string | yes | Public HTTPS URL of the endpoint. Up to 2048 characters. — format: uri; maxLength: 2048 |
| `events` | string[] | yes | Events the endpoint receives. At least one. |
| `isActive` | boolean | no | Whether the endpoint receives webhooks. — default: true |

### Responses

**201** Endpoint registered.

**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. |

**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. |