# Webhook<!-- -->

An Apify webhook definition used by the Actor SDK.

The same instance can be passed as an ad-hoc webhook to `Actor.start()` / `Actor.call()`, or to `Actor.add_webhook()`, which registers it as an ad-hoc webhook for the current run (the `condition.actor_run_id` is set automatically).

## Index[](#Index)

### Methods

* [\_\_post_init\_\_](https://docs.apify.com/sdk/python/reference/class/Webhook.md#__post_init__)

### Properties

* [do_not_retry](https://docs.apify.com/sdk/python/reference/class/Webhook.md#do_not_retry)
* [event_types](https://docs.apify.com/sdk/python/reference/class/Webhook.md#event_types)
* [headers_template](https://docs.apify.com/sdk/python/reference/class/Webhook.md#headers_template)
* [idempotency_key](https://docs.apify.com/sdk/python/reference/class/Webhook.md#idempotency_key)
* [ignore_ssl_errors](https://docs.apify.com/sdk/python/reference/class/Webhook.md#ignore_ssl_errors)
* [payload_template](https://docs.apify.com/sdk/python/reference/class/Webhook.md#payload_template)
* [request_url](https://docs.apify.com/sdk/python/reference/class/Webhook.md#request_url)

## Methods<!-- -->[](#Methods)

### [](#__post_init__)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L46)\_\_post_init\_\_

* **\_\_post_init\_\_**(): None

- #### Returns None

## Properties<!-- -->[](#Properties)

### [](#do_not_retry)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L43)do_not_retry

do_not_retry: bool | None

Whether to skip retrying the request on failure.

### [](#event_types)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L25)event_types

event_types: list\[WebhookEventType]

Events that trigger the webhook.

### [](#headers_template)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L34)headers_template

headers_template: str | None

Template for the HTTP headers sent by the webhook.

### [](#idempotency_key)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L37)idempotency_key

idempotency_key: str | None

Key that prevents creating duplicate webhooks.

### [](#ignore_ssl_errors)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L40)ignore_ssl_errors

ignore_ssl_errors: bool | None

Whether to ignore SSL errors when sending the request.

### [](#payload_template)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L31)payload_template

payload_template: str | None

Template for the JSON payload sent by the webhook.

### [](#request_url)[](https://github.com/apify/apify-sdk-python/blob/c674a4d42ade9c1a07f33062b6702497cd34b19d//src/apify/_webhook.py#L28)request_url

request_url: str

URL the webhook sends its payload to.
