Connect your existing site

The five-minute wire-up - works with any stack that can make an HTTP request

You already have a frontend. Here is the five-minute wire-up to read kura content from it. Works with any stack that can make an HTTP request.

1. Set two values

Keep these in your environment (e.g. .env):

KURA_BASE_URL=https://kuracms.com
KURA_TOKEN=kr_live_your_token

Get the token from your project page (/app/{slug}, the Developer section, Create token - shown once). Confirm the project's free trial is started, or the API returns 402 and serves nothing.

2. Read a content type

const res = await fetch(
  `${process.env.KURA_BASE_URL}/api/v1/your-project/listing?sort=-published_at&limit=20`,
  { headers: { Authorization: `Bearer ${process.env.KURA_TOKEN}` } }
);
const { data, meta } = await res.json();

data is the array of published entries; meta has count, limit, offset. Call this server-side: the project token is full-access (it can write as well as read), so it must never reach the browser.

Don't know your type slugs? GET /api/v1/your-project/types lists every content type and its fields.

3. Handle the three field shapes that need a step

  • Images come back as a relative path, /media/{key}. Prefix it: ${KURA_BASE_URL}${entry.photo}. A gallery is a list of these paths.
  • Relations come back as the linked entry's slug string, not the object. Fetch it with a second request: GET /api/v1/your-project/agent/{slug}. There is no ?expand.
  • Coordinates come back as { lat, lon }.

rich_text is already rendered HTML - drop it straight in.

4. Draft preview (optional)

Add ?preview to any read (same token) to get unpublished drafts, and wire it to a /preview route so your editor can check changes before publishing. Published reads are edge-cached; preview reads are not.

That's the whole integration. Full parameter and response detail is in the REST API reference.