Skip to main content
Version: 3.0

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.