// Contentstack Integration

AI ready structured data for
Contentstack.

Contentstack is a headless content management system built for enterprise environments. It follows an API-first, MACH-certified architecture with strict separation between content management and content delivery. Content is created once and delivered via APIs to multiple channels simultaneously.

enhancely adds page-specific JSON-LD to Contentstack-driven sites so search engines see clean, consistent schema without manual markup. enhancely fits perfectly into the MACH reference architecture and embraces real composability. Read more about this in our blog about how enhancely fits in a composable architecture.

graph LR
  A["Browser"] --> B["Next.js / Nuxt App"]
  B --> C["enhancely Plugin"]
  C --> D["enhancely API"]
  D --> E["JSON-LD"]
  E --> C
  C --> F["Cache"]
  B --> G["HTML + JSON-LD"]
  H["Contentstack Webhook"] -.-> I["Cache Invalidation"]
  I -.-> F
Fig. 1 — Contentstack integration with webhook-based cache invalidation
// How it works

Fetch. Inject. Cache.

The integration is delivered as an npm package and operates with any Node.js frontend framework.
01

Send URL

Your app sends the current page URL to the enhancely API.
02

Receive JSON-LD

enhancely returns ready-made JSON-LD for that URL.
03

SSR Injection

The plugin injects it as <script type="application/ld+json"> during SSR.
04

ETag Caching

Built-in caching with ETag support prevents repeated fetches.
05

Webhook Refresh

Contentstack webhooks invalidate cache on content publish.
// Features

What you get.

SSR
Server-Side Rendering
JSON-LD injected during SSR for maximum visibility to search engines and AI bots.
API
Cache-Aware
ETag-based caching with Memory, File, or Redis backends for production traffic.
WH
Webhook Support
Contentstack webhooks refresh schema automatically after content publish.
// Getting started

Quick setup.

01
Install package
npm install from GitHub release tarball
02
Copy recipe bundle
Copy from recipes/contentstack/next-app-router/template/
03
Set environment variables
ENHANCELY_API_KEY, NEXT_PUBLIC_SITE_URL, CONTENTSTACK_WEBHOOK_SECRET
04
Deploy
Follow step-by-step guide in recipes/contentstack/README.md

Installation

npm install @enhancely/headless-cms-plugin

Caching included

  • ETag-aware caching to reduce API calls
  • Cache backends: Memory, File, or Redis
  • Redis recommended for multi-instance or serverless deployments

API Response Codes

200: JSON-LD ready—structured data returned

201: URL queued—submitted for processing

202: Processing—URL currently being analyzed

304: Not modified—ETag match, cached version valid

429: Rate limited—retry later

Compatibility & Requirements

Node.js: >= 18

Next.js: >= 13 (App Router recommended)

Nuxt: >= 3

CMS: Contentstack (webhook supported)

// FAQ

Contentstack & enhancely
FAQ.

Contentstack is an API-first, MACH-certified headless CMS built for enterprise environments. Unlike traditional CMS platforms that couple content management with presentation, Contentstack separates the two entirely. Content is created once in a central hub and delivered to any channel — websites, mobile apps, IoT devices, digital signage — via REST and GraphQL APIs. This architecture makes it ideal for organizations managing multi-channel, multi-brand, and multi-language content at scale.
As a headless CMS, Contentstack delivers raw content via APIs without generating frontend markup — including Schema.org structured data. The frontend framework consuming the API is responsible for rendering schema. This means development teams must build and maintain JSON-LD generation logic themselves. enhancely bridges this gap by connecting via webhooks — when content is published or updated in Contentstack, enhancely automatically generates and deploys validated JSON-LD markup without requiring changes to your frontend code.
enhancely connects to your Contentstack frontend via a small JavaScript or server-side snippet. When content is published in Contentstack, a webhook notifies enhancely to regenerate schema for the affected pages. ETag-aware caching ensures minimal API calls — only pages with actual content changes are reprocessed. Redis caching is recommended for serverless or multi-instance production deployments. Compatible with Next.js 13+ (App Router) and Nuxt 3+.
Yes. Once the webhook is configured, every publish event in Contentstack triggers an automatic schema regeneration. enhancely scans the updated page, generates fresh JSON-LD markup validated through the 3-layer pipeline (validity, factuality, compliance), and deploys it — all within minutes. No manual re-tagging, no developer intervention. The system supports ETag caching so only changed content triggers new API calls, keeping costs and latency low.
Every piece of markup passes through a 3-layer curation pipeline before deployment. Layer 1 (Validity) checks against the full Schema.org specification — all 806 types, every property, every value range. Layer 2 (Factuality) cross-references structured data against your actual page content — no hallucinated data, no invented prices, no phantom opening hours. Layer 3 (Compliance) verifies Rich Result eligibility against Google, Bing, and AI search engine guidelines. Peer-reviewed research (Dang et al., Semantic Web Journal, IOS Press, 2025) showed that without such a pipeline, 40–50% of AI-generated markup is invalid or non-compliant.
Yes. Multiple JSON-LD blocks on a single page are valid and supported by all major search engines — Google, Bing, and others evaluate and merge all structured data blocks they find. enhancely adds additional, validated markup without conflicting with or overwriting your existing schema. If enhancely detects invalid or outdated markup from other sources, Schema Healing can automatically identify and repair it — so legacy schema from previous tools or manual implementations gets fixed and kept current.

Stop leaving
bots hungry.

Your content is already great for humans. Let us make it perfect for bots.