Docs
Send articles from Rankstan straight to your site. Each connection takes a few minutes to set up, and re-publishing an article always updates the same post instead of creating a second one.
Connections live on each project's Publishing page in the Rankstan dashboard, one tab per platform. Every connection has the same three settings:
Every article carries its title, slug, HTML body, SEO description, keywords and featured image. What each platform does with them is described below.
Publish straight into a WordPress site using the Rankstan plugin.
Rankstan for WordPress
https://example.com) and save.The plugin receives articles at /wp-json/rankstan/v1/articles. It only accepts signed POST requests, so opening that address in a browser shows a 404 even when everything works. Plain permalinks are supported too.
Publish straight into a Shopify store blog, through an app you create in the Shopify Dev Dashboard.
write_content and read_content Admin API scopes, then release the version. Nothing else is needed: Rankstan never reads orders, customers or products.https://your-store.myshopify.com. It is listed under Settings → Domains in Shopify.Uses the Shopify Admin API, version 2025-01. The app must belong to the same Shopify organisation as the store.
Publish straight into a Ghost site using an Admin API key.
You can revoke the key in Ghost at any time without affecting anything else.
Add each published article to a Notion database, with the body as page content.
ntn_.This step is easy to miss, and without it every publish is refused with "cannot see that database".
?v=.Each article becomes a page in the database. The title goes in your title column, whatever it is called, and the body becomes the page content, with headings, lists, quotes, bold, italics and links kept. Use a database with a single data source: Notion refuses new pages from connections on databases with several.
Send each published article to a URL of your choice, signed so you can verify it came from us.
For any other site or CMS. Enter your endpoint URL on the Custom webhook tab and save, and Rankstan generates a signing secret for you to copy. Every publish is then sent to your URL as a JSON POST, signed with that secret.
| X-Signature | sha256= followed by the hex HMAC of the timestamp, a dot, and the raw body. |
| X-Timestamp | Unix seconds. Reject anything more than 300 seconds old. |
| X-Integration-Id | Which connection sent it, so one endpoint can serve several projects. |
hmac_sha256(timestamp + "." + rawBody, secret) and hex-encode it. Use the raw body: parsing and re-encoding the JSON changes the bytes.<?php
$secret = getenv('RANKSTAN_SECRET');
$raw = file_get_contents('php://input'); // raw body, not json_decode'd
$signature = $_SERVER['HTTP_' . str_replace('-', '_', strtoupper('X-Signature'))] ?? '';
$timestamp = (int) ($_SERVER['HTTP_' . str_replace('-', '_', strtoupper('X-Timestamp'))] ?? 0);
if (abs(time() - $timestamp) > 300) {
http_response_code(401);
exit('stale');
}
$expected = 'sha256=' . hash_hmac('sha256', $timestamp . '.' . $raw, $secret);
if (! hash_equals($expected, $signature)) {
http_response_code(401);
exit('bad signature');
}
$article = json_decode($raw, true);
// … create or update your post, then reply with { "remote_id": "…" }
echo json_encode(['remote_id' => 'your-post-id']);import crypto from 'node:crypto';
import express from 'express';
const app = express();
// express.raw, not express.json: re-serialising the body changes the bytes
// and the signature will never match.
app.post('/articles', express.raw({ type: 'application/json' }), (req, res) => {
const secret = process.env.RANKSTAN_SECRET;
const signature = req.get('X-Signature') ?? '';
const timestamp = Number(req.get('X-Timestamp') ?? 0);
if (Math.abs(Date.now() / 1000 - timestamp) > 300) {
return res.status(401).send('stale');
}
const expected =
'sha256=' +
crypto.createHmac('sha256', secret)
.update(timestamp + '.' + req.body.toString('utf8'))
.digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(signature);
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
return res.status(401).send('bad signature');
}
const article = JSON.parse(req.body.toString('utf8'));
// … create or update your post
res.json({ remote_id: 'your-post-id' });
});import hashlib
import hmac
import os
import time
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.post("/articles")
def articles():
secret = os.environ["RANKSTAN_SECRET"].encode()
raw = request.get_data() # raw bytes, not request.json
signature = request.headers.get("X-Signature", "")
timestamp = int(request.headers.get("X-Timestamp", 0))
if abs(time.time() - timestamp) > 300:
return "stale", 401
expected = "sha256=" + hmac.new(
secret,
f"{timestamp}.".encode() + raw,
hashlib.sha256,
).hexdigest()
if not hmac.compare_digest(expected, signature):
return "bad signature", 401
article = request.get_json()
# … create or update your post
return jsonify(remote_id="your-post-id")package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"io"
"math"
"net/http"
"os"
"strconv"
"time"
)
func articles(w http.ResponseWriter, r *http.Request) {
secret := []byte(os.Getenv("RANKSTAN_SECRET"))
raw, err := io.ReadAll(r.Body) // raw body, before any decoding
if err != nil {
http.Error(w, "unreadable", http.StatusBadRequest)
return
}
signature := r.Header.Get("X-Signature")
timestamp, _ := strconv.ParseInt(r.Header.Get("X-Timestamp"), 10, 64)
if math.Abs(float64(time.Now().Unix()-timestamp)) > 300 {
http.Error(w, "stale", http.StatusUnauthorized)
return
}
mac := hmac.New(sha256.New, secret)
mac.Write([]byte(strconv.FormatInt(timestamp, 10) + "."))
mac.Write(raw)
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(expected), []byte(signature)) {
http.Error(w, "bad signature", http.StatusUnauthorized)
return
}
// … create or update your post
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(`{"remote_id":"your-post-id"}`))
}body is ready-to-use HTML, and publish_as is the connection's On arrival setting. Reply with { "remote_id": "…" } and Rankstan sends it back as remote_id whenever the article changes, so you can update the same post.
{
"id": 128,
"uuid": "8f1c3a2e-…",
"title": "How to rank for long-tail keywords",
"slug": "how-to-rank-for-long-tail-keywords",
"body": "<h2>Start with intent</h2><p>…</p>",
"seo_description": "A practical guide to…",
"image_url": "https://…/main-image.png",
"image_alt": "A desk with a laptop",
"keywords": ["long tail keywords", "seo basics"],
"published_at": "2026-08-14T09:30:00+00:00",
"publish_as": "draft",
"remote_id": null
}