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-keyimport { 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.
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>
| Endpoint | Returns | SDK |
|---|---|---|
GET /site | Site settings, locales and theme | getSite() |
GET /events | Published events, paginated | getEvents() |
GET /events/dates | Years and dates that have events, for calendar UI | getEventDates() |
GET /events/{slug} | A single event | getEvent() |
GET /news | News and blog posts | getNews() |
GET /news/dates | Years and dates that have news posts, for archive UI | getNewsDates() |
GET /news/{slug} | A single news post | getNewsArticle() |
GET /pages | Published pages | getPages() |
GET /pages/{slug} | A single page with its content tree | getPage() |
GET /profiles | Artist and staff profiles | getProfiles() |
GET /profiles/{slug} | A single profile | getProfile() |
GET /profiles/{slug}/events | Events for one artist | getProfileEvents() |
GET /profiles/{slug}/products | Merchandise and releases for one artist | getProfileProducts() |
GET /products | Merchandise and releases | getProducts() |
GET /products/{slug} | A single product | getProduct() |
GET /search | Full-text search | searchSite() |
GET /tags | Tag taxonomy | getTags() |
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-nextA 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@venuecms/sdkThe TypeScript client for the Venue API, for builds outside Next.js. Runs in any fetch-capable runtime.
npm install @venuecms/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.gitFull 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.