Webhooks

Webhooks allow you to subscribe to certain events happening at W3C. When one of these events is triggered, we'll send a HTTP POST payload to the webhook's configured URL.

You can configure your webhooks from your profile.

Events

When configuring a webhook, you can choose which events you would like to receive payloads for. You can change the subscribed events through the UI anytime.

Each event corresponds to a certain set of actions that can happen. For example, if you subscribe to the publication event you'll receive detailed payloads every time a technical report is published.

The available events are:

Name Description
Publication (tr.published, tr.updated) Any time a technical report is published or its metadata are updated
Group Participation (group.participant_joined, group.participant_left) Any time someone joins or leaves a group
Connected Accounts (connected_account.created, connected_account.deleted) Any time someone connects their W3C account to an external service such as GitHub, or removes such a connection

This list of events will be progressively augmented.

Headers and Payloads

HTTP requests made to your webhook's configured URL endpoint will contain several special headers:

Header Description
X-W3C-Webhook Link to the webhook that triggered the delivery
X-W3C-Webhook-Id ID of the webhook that triggered the delivery

Payload of HTTP requests consists in a JSON fragment including the event that triggered the webhook and one or several objects serialized in the same way as the API.

Example delivery

URL: http://example.org/my-webhook
Host: example.org
X-W3C-Webhook: https://www.w3.org/users/12345/webhooks/1
X-W3C-Webhook-Id: 1
    
{
    "event": "tr.published",
    "specVersion": {
        "status": "Working Draft",
        "uri": "http:\/\/www.w3.org\/TR\/2016\/WD-preload-20160120\/",
        "date": "2016-01-20",
        "informative": false,
        "title": "Preload",
        "shortlink": "http:\/\/www.w3.org\/TR\/preload\/",
        "editor_draft": "http:\/\/w3c.github.io\/preload\/",
        "process_rules": "http:\/\/www.w3.org\/2015\/Process-20150901\/",
        "_links": {
            "self": {
                "href": "https:\/\/api.w3.org\/specifications\/preload\/versions\/20160120"
            },
            "editors": {
                "href": "https:\/\/api.w3.org\/specifications\/preload\/versions\/20160120\/editors"
            },
            "deliverers": {
                "href": "https:\/\/api.w3.org\/specifications\/preload\/versions\/20160120\/deliverers"
            },
            "specification": {
                "href": "https:\/\/api.w3.org\/specifications\/preload"
            },
            "predecessor-version": {
                "href": "https:\/\/api.w3.org\/specifications\/preload\/versions\/20160120\/predecessors"
            }
        }
    }
}