Skip to main content
Version: 3.2

WebhookOptions

Index

Properties

eventTypes

eventTypes: readonly WebhookEventType[]

Array of event types, which you can set for Actor run, see the Actor run events in the Apify doc.

optionalidempotencyKey

idempotencyKey?: string

Idempotency key enables you to ensure that a webhook will not be added multiple times in case of an Actor restart or other situation that would cause the addWebhook() function to be called again. We suggest using the Actor run ID as the idempotency key. You can get the run ID by calling Actor.getEnv function.

optionalpayloadTemplate

payloadTemplate?: string

Payload template is a JSON-like string that describes the structure of the webhook POST request payload. It uses JSON syntax, extended with a double curly braces syntax for injecting variables {{variable}}. Those variables are resolved at the time of the webhook's dispatch, and a list of available variables with their descriptions is available in the Apify webhook documentation. If payloadTemplate is omitted, the default payload template is used (view docs).

requestUrl

requestUrl: string

URL which will be requested using HTTP POST request, when Actor run will reach the set event type.