Skip to main content
Version: Next

WebhookOptions

Index

Properties

optionaldescription

description?: string

A description of the webhook.

optionaldoNotRetry

doNotRetry?: boolean

If true, the webhook will not retry on failure.

eventTypes

eventTypes: readonly WebhookEventType[]

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

optionalheadersTemplate

headersTemplate?: string

Headers template is a JSON-like string that describes the HTTP headers to be sent with the webhook POST request. 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 headersTemplate is omitted, no extra headers are added (view docs).

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.

optionalignoreSslErrors

ignoreSslErrors?: boolean

If true, the webhook will ignore SSL errors when sending the request.

optionalisApifyIntegration

isApifyIntegration?: boolean

If true, indicates the webhook is an Apify integration.

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.

optionalshouldInterpolateStrings

shouldInterpolateStrings?: boolean

If true, the webhook will interpolate strings in the payloadTemplate and headersTemplate.