Webhooks & Notifications

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://apidocs.lwolf.com/doc/spacio-api/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Spacio API MCP server": {
    "url": "https://apidocs.lwolf.com/doc/spacio-api/mcp"
  }
}

Close

Webhooks (Beta)

Enable real-time notifications instead of polling.

Supported Events

  • lead.registered - New lead captured
  • lead.status_changed - Lead status updated
  • property.status_changed - Property listing status changed
  • property.price_changed - Price updated
  • open_house.scheduled - Open house created
  • open_house.cancelled - Open house cancelled

Webhook Setup

  1. Configure endpoint in Spacio dashboard
  2. Spacio will POST events to your URL
  3. Respond with 200 status within 10 seconds

Webhook Payload

{
  "event": "lead.registered",
  "timestamp": "2024-01-15T14:30:00Z",
  "data": {
    "registrant_id": "reg_123",
    "property_id": "prop_456",
    "email": "buyer@example.com"
  },
  "signature": "sha256_hash"
}

Verification

Verify webhook authenticity:

import hmac
import hashlib

def verify_webhook(payload, signature, secret):
    expected = hmac.new(
        secret.encode(),
        payload.encode(),
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)

Retry Policy

Spacio retries failed deliveries:

  • First attempt: Immediate
  • 2nd-4th attempts: Exponential backoff
  • Max 24 hour window

Notification Preferences

Configure which events to receive in dashboard:

  • Email notifications
  • SMS alerts
  • Webhook deliveries
  • Frequency preferences

Best Practices

  1. Respond quickly - 10 second timeout
  2. Idempotency - Handle duplicate events
  3. Queue processing - Don't process synchronously
  4. Verify signature - Ensure authenticity
  5. Log all webhooks - For debugging