logo Switchboard

Publishing

To publish content using Switchboard as your hub, add the following tags to your HTML feeds:

<link rel="self" href="https://example.com/">
<link rel="hub" href="https://switchboard.p3k.io/">

When you add a new item to the feed, send a POST request to https://switchboard.p3k.io/ with the following parameters:

Switchboard will send notifications to every subscriber that your feed has been updated. The request that Switchboard sends to your subscribers will be a POST request with no body. This is known as a "thin ping". Your subscribers will then request your feed to find updates.

Subscribing

If you are subscribing to a feed that uses Switchboard as its hub, here is what you can expect.

Verification

When you first request the subscription, Switchboard will send a verification request to your callback URL. The verification request will be a GET request to your callback URL with the following query parameters:

To confirm the subscription, you will need to respond with HTTP 200 and the body of the response must be exactly equal to the challenge string. Any other response will not activate your subscription.

Notifications

When there is new content available from the topic URL, Switchboard will send a POST request to your callback URL.

This POST request will have no body, and is meant to be an indication that the URL has been updated, and that you can fetch the new contents from there.