Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
    • Repair Yoast indexables
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning
Documentation/API & automation/Webhooks

Webhooks

LAST UPDATED

3 months ago

    WP Cloud sends webhooks when asynchronous platform work or a site event reaches a state that a partner may need to handle. For example, site_provisioned tells a partner that provisioning finished and its post-provisioning setup can begin.

    Webhook signing and validation are available to verify that events came from WP Cloud.

    Build the receiver to accept event types and data fields it does not recognize. WP Cloud can add events, and each event type can carry different data.

    Configure the webhook URL

    Set one HTTPS receiver URL for the WP Cloud host client account with the webhook_url client meta key. Add it with the Add Client Metadata endpoint:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode 'value=https://partner.example/webhooks/wp-cloud' \
      "https://atomic-api.wordpress.com/api/v1.0/client-meta/${WP_CLOUD_CLIENT}/webhook_url/add"Code language: JavaScript (javascript)

    If the key already exists, use the Update Client Metadata endpoint. Use the Remove Client Metadata operation when the account should no longer receive webhooks.

    The receiver should return HTTP 200 after it accepts an event. That response confirms delivery to the configured receiver; it does not prove that later application processing succeeded. A non-200 response causes WP Cloud to schedule up to two more delivery attempts.

    Read webhook events

    Every webhook has an event, timestamp, and event-specific data value:

    {
      "timestamp": 1751333700,
      "event": "site_provisioned",
      "atomic_site_id": 123456789,
      "data": []
    }Code language: JSON / JSON with Comments (json)

    atomic_site_id is present when the event applies to a particular site. The shape of data depends on the event. Store the complete event before dispatching known event types so an unfamiliar event or added field does not make the receiver fail.

    WP Cloud currently sends events including:

    • site_provisioned when site provisioning finishes;
    • over_quota for a site over its storage quota;
    • domain_name_changed after a primary domain or alias change;
    • wp_version_changed after a requested switch between managed WordPress version channels;
    • on-demand-backup, with data for acknowledged, created, and deleted states;
    • chroot_updates;
    • tasks; and
    • sasl_block for email abuse detection blocks.

    The list can change. Do not reject a webhook only because its event name is not in this list.

    Interpret common events

    The event name identifies what changed, while the event-specific data object provides the values needed to interpret it. The examples below show how that data changes by event.

    Site provisioned

    {
      "event": "site_provisioned",
      "timestamp": 1751333700,
      "atomic_site_id": 123456789,
      "data": []
    }Code language: JSON / JSON with Comments (json)

    Primary domain or alias changed

    {
      "event": "domain_name_changed",
      "timestamp": 1751333848,
      "atomic_site_id": 123456789,
      "data": {
        "passed_old": "old.example.com",
        "passed_new": "new.example.com",
        "then_api_current": "new.example.com",
        "then_db_siteurl": "old.example.com"
      }
    }Code language: JSON / JSON with Comments (json)

    WordPress version changed

    {
      "event": "wp_version_changed",
      "timestamp": 1751334043,
      "atomic_site_id": 123456789,
      "data": {
        "version": "previous"
      }
    }Code language: JSON / JSON with Comments (json)

    wp_version_changed reports a version-channel change requested through WP Cloud, such as switching from latest to previous. It does not report every WordPress release installed behind the latest channel.

    Sign webhook events

    Set a secret webhook_hmac_key with the Add Client Metadata endpoint. Choose a strong, random value and store it in the same secrets system used by the receiver:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --data-urlencode "value=${WP_CLOUD_WEBHOOK_HMAC_KEY}" \
      "https://atomic-api.wordpress.com/api/v1.0/client-meta/${WP_CLOUD_CLIENT}/webhook_hmac_key/add"Code language: JavaScript (javascript)

    After the key is set, each payload includes a signature object:

    {
      "signature": {
        "signature": "011958d09315f3b...92ab98e4ad12",
        "timestamp": "29848839199040411",
        "salt": "3cfd5d7d47e...b3f79d8890bd9b344db0"
      }
    }Code language: JSON / JSON with Comments (json)

    The HMAC key is write-only. The API cannot return its value after it is set, but a partner can update or remove it.

    Validate webhook signatures

    For each signed payload:

    1. Read the top-level event as the event type and the timestamp and salt values inside signature.
    2. Construct this input string exactly: {event_type}:{signature->timestamp}:{signature->salt}.
    3. Compute an HMAC-SHA256 digest of that string with the account’s webhook_hmac_key.
    4. Compare the computed digest with signature->signature. Process the event only when they match.

    Treat signature->timestamp, signature->salt, and signature->signature as strings. In particular, do not convert the timestamp to a JavaScript number before constructing the input string; doing so can change its value and make a valid signature fail.

    If events do not arrive, compare the receiver URL with the configured webhook_url, check the receiver’s deployment, authentication, and routing, and review the HTTP status it returned at the event time. A successful delivery does not imply that WP Cloud will replay the event after a later processing failure, so store accepted events before processing them.

    Update or remove the key with the corresponding Client Metadata operation. Coordinate a planned key change with the receiver because events signed with the new key will fail validation anywhere that still uses the old value.

    Previous WP Cloud API quick start
    Next Run bulk tasks across sites

    Related Guides

    • Manage and secure API keys

      Create, restrict, store, test, change, rekey, and revoke WP Cloud API keys through the Partner…

      3 Min.

      READ

    • Client SSH

      Configure and secure Client SSH for partner developers, support teams, panels, and automation that need…

      5 Min.

      READ

    • WP Cloud API quick start

      Use the WP Cloud API to create and inspect sites, manage domains and certificates, change…

      14 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications