Skip to content

Webhook

The Webhook class enables you to view, test, and modify custom event notifications with webhooks.

webhook = up42.initialize_webhook(webhook_id="d290f1ee-6c54-4b01-90e6-d701748f0851")
To learn how to create a webhook, see the up42 class.

Webhooks

info

The info attribute returns metadata of a specific webhook.

The returned data type is dict

Example
webhook.info

update()

The update() function allows you to modify a specific webhook.

The returned data type is dict.

Arguments
Argument Overview
name str
The name of the webhook.
url str
The URL of the webhook.
events list[str]
A list of events that trigger the webhook. The allowed value is order.status.
active bool
Whether this webhook should be active after the update:
  • True: webhook is active.
  • False: webhook isn't active.
The default value is False.
secret str
The secret used to generate webhook signatures.
Example
webhook.update(
    name="new-name",
    url="https://new-receiving-url.com",
    events=["order.status"],
    active=True,
    secret="RFZTJnNAChqZKNmo",
)

delete()

The delete() function allows you to delete a registered webhook.

Example
webhook.delete()

Events

trigger_test_events()

The trigger_test_events() allows you to trigger a webhook test event to test your receiving side. The UP42 server will send test messages for each subscribed event to the specified webhook URL.

The returned data type is dict.

Example
webhook.trigger_test_events()