From c9067ec4bb5c14021a4eb16407d9e9f994ce194f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 7 Aug 2025 16:28:01 -0400 Subject: [PATCH] Add note about namespacing webhook data --- docs/plugins/development/webhooks.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/plugins/development/webhooks.md b/docs/plugins/development/webhooks.md index 42a515aca..755d19d42 100644 --- a/docs/plugins/development/webhooks.md +++ b/docs/plugins/development/webhooks.md @@ -43,6 +43,18 @@ The resulting webhook payload will look like the following: } ``` +!!! note "Consider namespacing webhook data" + The data returned from all webhook callbacks will be compiled into a single `context` dictionary. Any existing keys within this dictionary will be overwritten by subsequent callbacks which include those keys. To avoid collisions with webhook data provided by other plugins, consider namespacing your plugin's data within a nested dictionary as such: + + ```python + return { + 'my_plugin': { + 'foo': 123, + 'bar': 456, + } + } + ``` + ### Callback Function Arguments | Name | Type | Description |