Docs

Publishing integrations

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.

How publishing works

Connections live on each project's Publishing page in the Rankstan dashboard, one tab per platform. Every connection has the same three settings:

On arrival
Whether articles land as a draft for you to review, or go live straight away. Draft is the default.
Publish automatically
When on, an article is sent here as soon as it is published or edited. When off, only when you pick this site with Publish to….
Test connection
Checks the credentials and the address without publishing anything. Use it after every change.

Every article carries its title, slug, HTML body, SEO description, keywords and featured image. What each platform does with them is described below.

WordPress

Publish straight into a WordPress site using the Rankstan plugin.

Rankstan for WordPress

Download the plugin

Set it up

  1. In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip, then install and activate it.
  2. In Rankstan, open the project's Publishing page, choose the WordPress tab, enter your site's address (e.g. https://example.com) and save.
  3. Copy the signing secret Rankstan shows.
  4. In WordPress, go to Settings → Rankstan, paste the secret, pick the author and category for new posts, and save.
  5. Back in Rankstan, click Test connection.

What arrives

  • A post with the title, slug and body, and the featured image downloaded into your Media Library with its alt text.
  • The SEO description and focus keyword, written to Yoast SEO or Rank Math if either is active.
  • Changes you make on the WordPress side, such as the author, category or featured image, are kept when the article is re-published.

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.

Shopify

Publish straight into a Shopify store blog, through an app you create in the Shopify Dev Dashboard.

Create an app for your store

  1. Open the Shopify Dev Dashboard, signed in with the account that owns the store.
  2. Choose Create app and name it (Rankstan, say).
  3. Give it the write_content and read_content Admin API scopes, then release the version. Nothing else is needed: Rankstan never reads orders, customers or products.
  4. Choose Install app and pick your store.
  5. From the app's Settings, copy the Client ID and Client secret.

Connect it in Rankstan

  1. On the Shopify tab, enter your permanent store address, not your custom domain: https://your-store.myshopify.com. It is listed under Settings → Domains in Shopify.
  2. Paste the Client ID and secret, and save. Your blogs then appear in the Blog field, so you can choose where articles go.
  3. Click Test connection.

What arrives

  • A blog article with its HTML body and main image, and its keywords as tags.
  • The SEO description, in the search-engine listing field your theme reads.
  • "As a draft" creates an unpublished article that stays hidden on your storefront until you publish it in Shopify.

Uses the Shopify Admin API, version 2025-01. The app must belong to the same Shopify organisation as the store.

Ghost

Publish straight into a Ghost site using an Admin API key.

Set it up

  1. In your Ghost admin, go to Settings → Advanced → Integrations.
  2. Choose Add custom integration and name it (Rankstan, say).
  3. Copy the Admin API key: a long id, a colon, then a longer secret. The Content API key will not work.
  4. In Rankstan, on the Ghost tab, enter your site address (the one you log in to) and the key, save, then click Test connection.

What arrives

  • A post converted to Ghost's editor format, with the main image as its feature image.
  • Keywords become tags, and the SEO description becomes the excerpt and meta description.

You can revoke the key in Ghost at any time without affecting anything else.

Notion

Add each published article to a Notion database, with the body as page content.

Create a connection

  1. Open Notion's developer portal and go to Build → Internal connections. You need to be a workspace owner.
  2. Choose Create a new connection, name it, and pick the workspace your database lives in.
  3. On the Configuration tab, copy the API token. It starts with ntn_.

Give it access to your database

This step is easy to miss, and without it every publish is refused with "cannot see that database".

  1. On the connection's Content access tab, choose Edit access and tick your database. Or, in Notion, open the database's ••• menu and choose Connections → Add connection.
  2. Open the database as a full page and copy its ID from the address bar: the 32 characters after your workspace name and before ?v=.
  3. In Rankstan, on the Notion tab, paste the database ID and the token, save, then click Test connection.

What arrives

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.

Custom webhook

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.

Headers

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.

Verifying a request

  1. Reject the request if the timestamp is more than 300 seconds from now. This stops an old request being replayed.
  2. Compute hmac_sha256(timestamp + "." + rawBody, secret) and hex-encode it. Use the raw body: parsing and re-encoding the JSON changes the bytes.
  3. Compare it with the signature header using a constant-time comparison.
<?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"}`)) }

The payload

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 }