Skip to content

Webhooks

Webhooks enable real-time HTTP callbacks when specific events occur in your DeepWorkZone sessions. Configure webhook endpoints to receive event notifications and integrate with external systems.


Overview

Webhooks push event data to your own HTTP endpoint whenever a supported event fires. This allows external systems to react to session activity without polling the API.


Admin Panel

Configure and manage webhooks directly from the DeepWorkZone admin panel:

EnvironmentAdmin Panel URL
Productionapi.deepworkzone.ai
Developmentapi-dev.deepworkzone.ai

Navigate to Settings → Webhooks to create, test, and monitor your webhook integrations.


Statistics Dashboard

Monitor webhook performance with real-time metrics:

MetricDescription
Total SentTotal number of webhook deliveries attempted
SuccessSuccessfully delivered webhooks (2xx responses)
FailedFailed delivery attempts (non-2xx or timeout)
Success RatePercentage of successful deliveries

Webhook Levels

Control webhook scope with three access levels:

LevelScopeUse Case
globalAll sessions across the platformSystem-wide integrations
orgSessions within your organizationTeam-specific workflows
userSessions where you are a participantPersonal notifications

Configuration

Creating a Webhook

  1. Navigate to Settings → Webhooks
  2. Click Create new
  3. Configure the following fields:

Required Fields

FieldDescription
EventCurrently supported: session.completed — triggered when a session participant completes a session
URLYour HTTPS endpoint that will receive webhook POST requests. Example: https://api.yourapp.com/webhooks/deepworkzone
Levelglobal · org · user — controls which sessions trigger this webhook (see Webhook Levels above)
Secret32+ character string for HMAC-SHA256 signature verification. Auto-generated if not provided.

Webhook Payload

Event: session.completed

Sent when a participant completes a session.

json
{
  "event": "participation.completed",
  "participant_id": 123,
  "multiplai_id": 71123,
  "session_id": 456,
  "status": "completed",
  "actual_score": 95.5,
  "presence_score": 98.2,
  "timestamp": "2024-01-15T14:30:00+00:00"
}

Payload Fields

FieldTypeDescription
eventstringEvent type identifier
participant_idintegerID of the session participant
multiplai_idintegerGoTeam / Multiplai primary user ID
session_idintegerID of the completed session
statusstringParticipant completion status
actual_scorefloatParticipant's performance score
presence_scorefloatParticipant's presence / attendance score
timestampstringISO 8601 timestamp of the event

Security

Signature Verification

All webhook requests include an X-Webhook-Signature header containing an HMAC-SHA256 signature.

Verification Steps

  1. Extract the signature from the X-Webhook-Signature header
  2. Compute HMAC-SHA256 of the raw request body using your webhook secret
  3. Compare the computed signature with the received signature using a timing-safe comparison function

Use sha256 algorithm and compare on the raw body, not the parsed JSON.


Response Requirements

Your endpoint must:

  1. Respond quickly (< 10 seconds) — process asynchronously if needed
  2. Return appropriate status codes
    • 200–299 → logged as successful delivery
    • 400–599 → logged as failed delivery
  3. Handle retries gracefully — webhooks are not automatically retried; implement idempotency using timestamp or participant_id

Testing Webhooks

  1. Navigate to the webhook detail page
  2. Click Test Webhook
  3. Check the logs for delivery status

Test Payload

json
{
  "event": "session.completed",
  "timestamp": "2024-01-15T14:30:00+00:00",
  "test": true,
  "data": {
    "message": "This is a test webhook event"
  }
}

Webhook Logs

Each log entry contains:

FieldDescription
EventThe event type that triggered the webhook
Statussuccess or failed
Status CodeHTTP response code from your endpoint
PayloadThe JSON payload sent
ResponseResponse body from your endpoint
Error MessageError details (if failed)
Sent AtTimestamp of the delivery attempt

Best Practices

  1. Use HTTPS — secure your webhook endpoint with TLS
  2. Verify signatures — always validate the X-Webhook-Signature header
  3. Return quickly — respond within 10 seconds, queue heavy processing
  4. Log everything — keep audit logs of received webhooks
  5. Handle duplicates — use participant_id + timestamp for idempotency

Troubleshooting

Webhook Not Triggering

Check that:

  • Webhook is_active is set to true
  • Event type matches session.completed
  • Level configuration is correct:
    • global → always triggers
    • org → organization ID must match the session
    • user → user ID must match the participant

Delivery Failures

Possible causes:

  • Endpoint timeout (> 10 seconds)
  • Invalid SSL certificate
  • Endpoint returning 4xx/5xx status codes
  • Network connectivity issues

Signature Verification Fails

Check that:

  • You are using the correct webhook secret
  • HMAC is computed on the raw request body (not parsed JSON)
  • You are using the sha256 algorithm
  • You are comparing signatures with a timing-safe function

Limits & Quotas

ConstraintValue
Timeout10 seconds per delivery
RetriesNo automatic retries
Log RetentionIndefinite (monitor storage usage)

Future Events

Currently in development:

EventDescription
session.createdTriggered when a new session is created
session.deletedTriggered when a session is deleted
session.startedTriggered when a session begins
participant.joinedTriggered when a user joins a session

Changelog

Current Version

  • session.completed event support
  • Three-level access control (global, org, user)
  • HMAC-SHA256 signature verification
  • Webhook testing functionality
  • Detailed logging and statistics

Coming Soon

  • Additional event types
  • Webhook retry mechanism
  • Rate limiting configuration
  • Custom headers support

Built with VitePress