Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. API & Developers
  6. /
  7. Api Webhooks
GUIDEAPI & Developers

Webhooks — Real-Time Event Notifications

4 min read

Webhooks provide real-time, push-based notifications when events occur in your Data Mammoth account. Instead of repeatedly polling the API to check for changes, webhooks deliver event data directly to your application as soon as something happens.

How Webhooks Work

  • You register a webhook URL — An HTTPS endpoint on your server that receives event data.
  • An event occurs — A server status change, new invoice, or ticket update happens.
  • Data Mammoth sends a POST request — Event details are sent to your webhook URL as a JSON payload.
  • Your application processes the event — Your code handles the notification (send alerts, update dashboards, trigger workflows).
  • Setting Up a Webhook

    Via the API

    bash
    curl -X POST "https://api.datamammoth.com/v1/webhooks" \
      -H "Authorization: Bearer dm_key_abc123def456" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://yourapp.example.com/webhooks/datamammoth",
        "events": ["server.status_changed", "billing.invoice_created"],
        "secret": "your_webhook_secret_key"
      }'

    Via the Dashboard

  • Navigate to Account Settings > Webhooks or API Settings.
  • Click Add Webhook.
  • Enter your webhook URL.
  • Select the events you want to receive.
  • Optionally set a webhook secret for signature verification.
  • Click Save.
  • Available Events

    Server Events

    EventDescription
    server.createdA new server was provisioned
    server.deletedA server was permanently deleted
    server.status_changedServer status changed (started, stopped, etc.)
    server.upgradedServer plan was upgraded
    server.backup_completedA backup was created successfully
    server.backup_failedA backup attempt failed

    Billing Events

    EventDescription
    billing.invoice_createdA new invoice was generated
    billing.invoice_paidAn invoice was paid
    billing.invoice_overdueAn invoice is past due
    billing.payment_failedAn automatic payment failed
    billing.subscription_cancelledA subscription was cancelled

    Support Events

    EventDescription
    support.ticket_createdA new ticket was opened
    support.ticket_repliedA reply was added to a ticket
    support.ticket_resolvedA ticket was resolved
    support.ticket_closedA ticket was closed

    Webhook Payload

    Each webhook delivers a JSON payload with the event details:

    json
    {
      "event": "server.status_changed",
      "timestamp": "2026-03-17T14:30:00Z",
      "data": {
        "server_id": "srv_abc123",
        "name": "web-production",
        "previous_status": "running",
        "new_status": "stopped",
        "ip": "203.0.113.10"
      },
      "webhook_id": "wh_xyz789"
    }

    Verifying Webhook Signatures

    To ensure webhook requests are genuinely from Data Mammoth, verify the signature included in each request header:

    text
    X-Webhook-Signature: sha256=abc123...

    Verify by computing the HMAC-SHA256 of the request body using your webhook secret:

    python
    import hmac
    import hashlib

    def verify_signature(payload, signature, secret): expected = hmac.new( secret.encode('utf-8'), payload.encode('utf-8'), hashlib.sha256 ).hexdigest() return hmac.compare_digest(f"sha256={expected}", signature)

    Always verify signatures before processing webhook data to prevent spoofed requests.

    Managing Webhooks

    List Webhooks

    bash
    GET /v1/webhooks

    Update a Webhook

    bash
    PATCH /v1/webhooks/{webhook_id}

    Delete a Webhook

    bash
    DELETE /v1/webhooks/{webhook_id}

    View Webhook Delivery History

    bash
    GET /v1/webhooks/{webhook_id}/deliveries

    This shows recent delivery attempts, including status codes, timestamps, and any failures.

    Webhook Best Practices

  • Use HTTPS — Always use an HTTPS endpoint for security.
  • Verify signatures — Check the webhook signature on every request.
  • Respond quickly — Return a 200 OK response within 5 seconds. Process the data asynchronously if needed.
  • Handle retries — If your endpoint returns an error, Data Mammoth retries the delivery. Make your handler idempotent.
  • Log deliveries — Log incoming webhook data for debugging and auditing.
  • Monitor failures — Check webhook delivery history for failed deliveries.
  • Retry Policy

    If your endpoint returns a non-2xx status code or times out:

    • Retries occur with exponential backoff.
    • Up to 5 retry attempts over several hours.
    • After all retries fail, the delivery is marked as failed.
    • You can view failed deliveries in the webhook delivery history.

    What to Do Next

    • API Overview — Full API reference.
    • API Rate Limits & Best Practices — Optimize API usage.
    • API Code Examples — Python — Webhook handler examples.
    • Server Management API — Server event details.

    Was this article helpful?

    ← Back to API & DevelopersBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket