venue

Build on the Venue API

Venue CMS is API-first. Everything the admin interface can read is available to your site. Events and calendars, artist profiles, locations, pages, memberships, products, etc. We provide a REST API and two TypeScript SDKs. You don't need our template to use our back end but they are there as a starting point.

Quick start

Install @venuecms/sdk-next, put your site key and API key in the environment, and fetch published content:

VENUE_SITE_KEY=your-site-key
VENUE_API_KEY=your-api-key
import { getEvents } from "@venuecms/sdk-next";

const { data } = await getEvents({ upcoming: true, dir: "asc" });

for (const event of data?.records ?? []) {
  console.log(event.slug, event.startDate, event.location?.city);
}

OpenAPI specification

The complete API spec. Generate a typed client from it in any language or use our SDK which is optimized.

View the OpenAPI document

Public endpoints

The read-only surface a public website is built from. Each is authenticated with an API token, where the site key identifies your organisation.

Reference
REST API documentation
Authentication
Authorization: Bearer <api-key>
EndpointReturnsSDK
GET /siteSite settings, locales and themegetSite()
GET /eventsPublished events, paginatedgetEvents()
GET /events/datesYears and dates that have events, for calendar UIgetEventDates()
GET /events/{slug}A single eventgetEvent()
GET /newsNews and blog postsgetNews()
GET /news/datesYears and dates that have news posts, for archive UIgetNewsDates()
GET /news/{slug}A single news postgetNewsArticle()
GET /pagesPublished pagesgetPages()
GET /pages/{slug}A single page with its content treegetPage()
GET /profilesArtist and staff profilesgetProfiles()
GET /profiles/{slug}A single profilegetProfile()
GET /profiles/{slug}/eventsEvents for one artistgetProfileEvents()
GET /profiles/{slug}/productsMerchandise and releases for one artistgetProfileProducts()
GET /productsMerchandise and releasesgetProducts()
GET /products/{slug}A single productgetProduct()
GET /searchFull-text searchsearchSite()
GET /tagsTag taxonomygetTags()

SDKs

Two published packages updated regularly. Reach for the SDK Next.js library unless you are building outside Next.js as it is heavily optimized.

  • @venuecms/sdk-next

    A library optimised for Next.js. It bundles @venuecms/sdk, so there is nothing else to install, and adds React server components for rendering Venue content.

    npm install @venuecms/sdk-next

    https://docs.venuecms.com/developers/sdk-next

  • @venuecms/sdk

    The TypeScript client for the Venue API, for builds outside Next.js. Runs in any fetch-capable runtime.

    npm install @venuecms/sdk

    https://docs.venuecms.com/developers/sdk

Starter template

template-minimal is a working Next.js website for a venue or artist — events, artist profiles, pages and localisation are wired via the SDK. It's a fast starting point for a new build to get you going.

git clone https://github.com/venuecms/template-minimal.git

View on GitHub

Full documentation

Guides, reference and both SDKs in full. Every documentation page also serves Markdown by appending .md to its URL, and the entire spec is available in a single request for agents to build with.

Read the docs

llms.txt — this platform as a machine-readable index