Create Webhook Trigger
webhooks.create_webhook_trigger(WebhookCreateWebhookTriggerParams**kwargs) -> WebhookCreateWebhookTriggerResponse
POST/agent_api_keys/webhook-trigger
Wire a webhook trigger in one call.
Registers the source’s signature-verification key (github/slack) for the agent and returns the ready-to-paste forward webhook URL plus the signing secret (shown once). The webhook then flows through the existing /agents/forward ingress, which verifies the signature against this key. Bundles the existing key-create + URL composition so a UI (or a curl) can set up a trigger without two steps.
Create Webhook Trigger
import os
from agentex import Agentex
client = Agentex(
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
)
response = client.webhooks.create_webhook_trigger(
agent_name="agent_name",
forward_path="forward_path",
name="name",
)
print(response.key_id){
"agent_name": "agent_name",
"key_id": "key_id",
"name": "name",
"secret": "secret",
"source": "internal",
"webhook_path": "webhook_path",
"webhook_url": "webhook_url"
}Returns Examples
{
"agent_name": "agent_name",
"key_id": "key_id",
"name": "name",
"secret": "secret",
"source": "internal",
"webhook_path": "webhook_path",
"webhook_url": "webhook_url"
}