Skip to content

Webhooks

System webhooks let admins configure global outbound HTTP notifications that fire when events occur across the platform. This enables integrations with external services like Slack, n8n, Zapier, or monitoring dashboards without building native connectors.

How It Works

When an event occurs in TeamWeb AI (e.g. a task completes or fails), the system broadcasts the event to all active webhook endpoints whose event type filters match. Each delivery is a JSON POST to the configured URL.

Navigate to Admin > Webhooks in the sidebar to manage system webhooks.

Creating a Webhook

Click New Webhook and fill in:

FieldDescription
NameA label to identify the webhook (e.g. “Slack alerts”)
URLThe endpoint URL that receives POST requests
Signing SecretOptional HMAC-SHA256 secret for payload verification
Event TypesWhich events to deliver (leave all unchecked for all events)
DescriptionOptional notes about what the webhook is used for

Event Types

EventFires When
task_completedA scheduled or triggered task finishes successfully
task_failedA task encounters an error
task_awaiting_reviewA task produces draft content that needs review
content_readyGenerated content is ready for review
content_status_changedContent status changes (e.g. approved, rejected)

Payload Format

Each event is delivered as a JSON POST with this structure:

{
  "event": "task_completed",
  "title": "Task 'Weekly Report' completed",
  "body": "The task finished successfully.",
  "url": "/tasks/runs/42",
  "source_type": "task_run",
  "source_id": 42,
  "timestamp": "2026-03-19T10:00:00+00:00"
}

Signature Verification

If a signing secret is configured, each delivery includes an X-TeamWebAI-Signature header containing an HMAC-SHA256 hex digest of the request body.

To verify in your receiving application:

import hashlib
import hmac

def verify_signature(payload_body: bytes, secret: str, signature: str) -> bool:
    expected = hmac.new(secret.encode(), payload_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)

Automatic Disabling

Endpoints are automatically disabled after 10 consecutive delivery failures. This prevents TeamWeb AI from repeatedly hitting an endpoint that is down or misconfigured.

To re-enable a disabled endpoint, click the enable button on the webhooks list page. The failure counter resets when the endpoint is re-enabled.

Testing

Use the Test button on any webhook endpoint to send a test payload. This verifies your endpoint is reachable and correctly processing events.