In about five minutes, you fetch published posts from a Lynkow site, first with curl, then with the
lynkowSDK. You need no account. Next: Which API Should I Use?
Reference - This guide is a tutorial. For exhaustive, always-current signatures and field lists, see the auto-generated reference:
SDK:
ContentsServiceAPI: Storefront: Content
Prerequisites
A terminal with
curlNode.js 18 or later, with npm, for steps 2 and 3
Your first request
The steps use the docs demo site, a read-only Lynkow site anyone can read. Its Site ID is a779c43c-430e-45d1-8749-2144d7f60a0f.
1. Call the API with curl
curl "https://api.lynkow.com/storefront/a779c43c-430e-45d1-8749-2144d7f60a0f/contents?limit=3&locale=en"The answer is JSON. data holds the three most recent published posts, and meta tells you where you are in the list:
{
"data": [
{ "title": "...", "slug": "...", "publishedAt": "...", ... },
...
],
"meta": { "total": ..., "perPage": 3, "currentPage": 1, "lastPage": ..., ... }
}The response is shortened here: Pagination explains meta. Reading published content needs the Site ID only: no key and no token.
2. Install the SDK
mkdir lynkow-first-request && cd lynkow-first-request
npm init -y
npm install lynkow3. Fetch the same posts with the SDK
Create first-request.mjs:
import { createClient } from 'lynkow'
const lynkow = createClient({ siteId: 'a779c43c-430e-45d1-8749-2144d7f60a0f', locale: 'en' })
const { data, meta } = await lynkow.contents.list({ limit: 3 })
console.log(`${meta.total} posts in total`)
for (const post of data) {
console.log(`- ${post.title} (${post.slug})`)
}Run it:
node first-request.mjsYou get the same posts as in step 1. The SDK builds the URL, parses the JSON, retries a read that failed for a temporary reason, and throws a LynkowError on an error (Errors).
Read products with the publishable key
Shop data (products, cart, checkout) also needs the site's publishable key, in the X-Lynkow-Pk header. The demo's key is lkw_pk_w5vgnv06vf4y8vg4xc8ast9p. It is public by design:
curl "https://api.lynkow.com/storefront/a779c43c-430e-45d1-8749-2144d7f60a0f/products?limit=3" \
-H "X-Lynkow-Pk: lkw_pk_w5vgnv06vf4y8vg4xc8ast9p"With the SDK, pass it to the client:
const lynkow = createClient({
siteId: 'a779c43c-430e-45d1-8749-2144d7f60a0f',
publishableKey: 'lkw_pk_w5vgnv06vf4y8vg4xc8ast9p',
})
const { data } = await lynkow.products.list({ limit: 3 })
console.log(data.map((product) => product.title))Use your own site
Create an account and a site at app.lynkow.com/register. The last screen of site creation shows the Site ID and a
.envfile for your project.Find the Site ID later under Settings > Developers > Storefront. The publishable key is on the same page, under Storefront keys.
Install the SDK in your project with
npm install lynkow, and replacea779c43c-430e-45d1-8749-2144d7f60a0fwith your Site ID.
The examples above call the API from a terminal or a server. A browser call to the content routes is refused with 403 unless it comes from the site's domain or from a hostname listed under Allowed origins, on the same settings page. Add localhost there to call the API from your browser during development.
Authentication and Keys lists every credential, where to find it, and which ones to keep secret.
Start a new site from a template
create-lynkow-app generates a complete site wired to your Lynkow site: blog, pages, forms, reviews, search, a shop, sitemap and llms.txt. The code is yours to change.
npx create-lynkow-app@latest my-site --site-id <your-site-id>It needs Node.js 20.9 or later, or 22.23.4 or later with --template astro. The main options:
Option | What it does |
|---|---|
| The starter to generate. Default: |
| The site's public origin, such as |
| The publishable key ( |
| Install the Lynkow AI skills for your assistant. Default: |
| Use the defaults and never prompt |
npx create-lynkow-app@latest --help lists every option. The pages read their content from site blocks: the generated AGENTS.md explains how to create them, and the project's README.md covers deployment. Build a Site with Astro walks through the Astro starter.
To add Lynkow to a project you already have, follow Add Lynkow to an Existing Project.
Optional: let your AI assistant do it
An AI coding assistant can generate the site and create its content blocks for you through the Lynkow MCP server, https://mcp.lynkow.com/mcp.
Connect the server. In Claude Code, add it, then run
/mcpand sign in with your Lynkow account, selecting only the site you are building:Bashclaude mcp add --transport http lynkow https://mcp.lynkow.com/mcpAn assistant that cannot sign in uses an API token instead, sent as
Authorization: Bearer <token>. Create it under Settings > Developers > API with onlysites.view,contents.view,site_blocks.view,site_blocks.createandsite_blocks.publish, and avoid the MCP (Model Context Protocol) preset, which grants full access. Put the token in your user-level MCP configuration, never in a file inside the project, and revoke it once the setup is done.Give it this prompt, with your values:
textCreate my Lynkow site with create-lynkow-app, using the options listed in https://docs.lynkow.com/sdk/getting-started/quick-start.md Then follow the AGENTS.md of the generated project to create and publish its site blocks. - Lynkow site (its name or its ID): <your-site> - Folder to create: my-site
MCP Tools lists what the assistant can do on your site. Non-developers can connect Claude or ChatGPT from the dashboard: see Connect Claude or ChatGPT.
Next Steps
Which API Should I Use? - the Storefront API, the Admin API, the SDK and the MCP server, side by side
Authentication and Keys - the Site ID, the keys and the tokens
Build a Blog with Next.js - a blog with lists, categories and article pages
Complete Integration Checklist - every Lynkow feature, with its guide