What this is for
Rankdesk's Content API supplies the article HTML, metadata, table of contents, JSON-LD, and image URLs. The website syncs that content into its own site_content table before rendering it at /blog/<slug>.
Configure Rankdesk
- Set the endpoint URL to
https://www.autotouch.ai/api/rankdesk/sync. - Leave the signing secret blank. Publish webhooks are accepted on public
POSTwith article slugs; the route refetches canonical content with the server-onlyRANKDESK_API_KEY. - Publish or re-push an article. A successful sync response includes
synced, one persisted revision per item, and isolatederrors.
Auth model
- Rankdesk publish — public
POSTwith article slug(s); syncs only those articles. - Connection probe — unauthenticated
GETor emptyPOSTreturns{ ok: true }and does not sync. - Full sync — Vercel cron
GET(or emptyPOST) withAuthorization: Bearer $CRON_SECRET.
Keep RANKDESK_API_KEY, SUPABASE_API_KEY, SUPABASE_URL, and CRON_SECRET configured only on Vercel server environments. Do not use a VITE_ variable for these values.
Accepted payload
Named refresh:
{
"items": [
{ "slug": "how-to-rank-for-long-tail-keywords", "kind": "blog" }
]
}
Rankdesk publish_article envelopes are also accepted. The route extracts slugs from common shapes and refetches each item from the Content API. Webhook HTML is never trusted.
How publishing works here
- Named syncs call
GET /posts/<slug>. Authorized full syncs paginateGET /posts?kind=blog&limit=100&offset=.... - Rankdesk-owned rows are upserted by
(kind, slug). Repeated syncs are safe and never delete existing content. - Public rendering reads only the persisted row. A Rankdesk outage does not take down the hub or existing blog sources.
Response example
{
"synced": 1,
"items": [{ "slug": "how-to-rank-for-long-tail-keywords", "updated_at": "2026-09-01T14:00:00.000Z" }],
"errors": []
}
Local testing
Publish style: curl -X POST https://www.autotouch.ai/api/rankdesk/sync -H 'content-type: application/json' -d '{"items":[{"slug":"your-slug","kind":"blog"}]}'
Full sync: curl -X GET https://www.autotouch.ai/api/rankdesk/sync -H "Authorization: Bearer $CRON_SECRET"
