# 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/sdk/python/reference/class/Webhook.md#__post_init__)

### Properties

* [**do\_not\_retry](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#do_not_retry)
* [**event\_types](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#event_types)
* [**headers\_template](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#headers_template)
* [**idempotency\_key](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#idempotency_key)
* [**ignore\_ssl\_errors](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#ignore_ssl_errors)
* [**payload\_template](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#payload_template)
* [**request\_url](https://docs.apify.com/sdk/python/sdk/python/reference/class/Webhook.md#request_url)

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

### [**](#__post_init__)[**](https://github.com/apify/apify-sdk-python/blob/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//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/14c90cbcc1116aa33e55199428603393b364dcf3//src/apify/_webhook.py#L28)request\_url

**request\_url: str

URL the webhook sends its payload to.
