Quick Start
Get your first puzzle in under 5 minutes. This guide walks you through creating a tenant account, generating an API key, installing the TypeScript SDK, and making your first request.
Prerequisites
- A Puzzle Section tenant account (register here)
- Node.js 18+ and TypeScript 5.0+ (recommended)
Register Your Tenant
Sign up for a tenant account on the dashboard. Each tenant represents your organisation and scopes all API keys, users, and data.
Create Tenant AccountGenerate an API Key
Navigate to Dashboard → API Keys and create a new key. Keys are prefixed to indicate their environment:
ps_live_*Production — returns real puzzlesps_test_*Sandbox — returns sample data for developmentKeep your key secret
Install the TypeScript SDK
The official TypeScript SDK provides full type safety, automatic retries with exponential backoff, and typed error classes.
npm install @puzzle-section/sdkOr with your preferred package manager:
yarn add @puzzle-section/sdkpnpm add @puzzle-section/sdkInitialise the Client
Create a client instance with your API key. The SDK sends the key via the X-API-Key header on every request.
PUZZLE_SECTION_API_KEY=ps_live_xxxxxxxxxxxximport { PuzzleSectionClient } from '@puzzle-section/sdk';
export const client = new PuzzleSectionClient({ apiKey: process.env.PUZZLE_SECTION_API_KEY!,});Fetch Your First Puzzle
Every SDK method returns a ResponseWithRateLimit<T> containing data and rateLimit fields.
1import { client } from './puzzle-client';2
3// Fetch today's daily puzzles4const { data: dailyPuzzles, rateLimit } = await client.puzzles.getDaily();5
6console.log(dailyPuzzles);7// [8// {9// id: '550e8400-e29b-41d4-a716-446655440000',10// type: 'sudoku',11// difficulty: 'medium',12// date: '2026-03-05',13// estimatedTime: 480,14// isPremium: false,15// data: {16// grid: [[0, 0, 3, ...], ...],17// given: [[false, false, true, ...], ...],18// difficulty: 'medium'19// },20// createdAt: '2026-03-04T00:00:00Z',21// updatedAt: '2026-03-04T00:00:00Z'22// },23// ...24// ]25
26console.log(rateLimit);27// { limit: 1000, remaining: 999, reset: 1741219200 }28
29// Filter by type and difficulty30const { data: sudoku } = await client.puzzles.getDaily({31 types: ['sudoku'],32 difficulties: ['medium'],33});34
35// Fetch a specific puzzle by UUID36const { data: puzzle } = await client.puzzles.getById(37 '550e8400-e29b-41d4-a716-446655440000'38);39
40// List all available puzzle types41const { data: types } = await client.puzzles.getTypes();42console.log(types); // ['sudoku', 'wordsearch', 'crossword', ...]You are all set