Skip to content
Docs
Developers

REST API reference

Everything BrandPilot produces is also a plain HTTP API under https://brandpilot.dev/api/v1. Published brand systems need no key; your own designs need an API key. The machine-readable description is at /api/v1/openapi.json.

Quick start

Quick start
# 1. List the published brand systems
curl https://brandpilot.dev/api/v1/systems

# 2. Get one system's manifest (token URLs, components, pages, assets)
curl https://brandpilot.dev/api/v1/systems/{name}/adoption

# 3. Download everything as one ZIP
curl -O https://brandpilot.dev/api/v1/systems/{name}/download

Public endpoints (no key)

MethodEndpointReturns
GET/api/v1/systemsThe published brand systems, ACTIVE only. Filter: platform (NEXTJS, WORDPRESS)
GET/api/v1/systems/{name}/adoptionThe manifest: tokens, components, pages, brand assets and export formats
GET/api/v1/systems/{name}/downloadA ZIP bundle with every file
GET/api/v1/systems/{name}/agent-promptMarkdown with copy-paste prompts for your coding agent
GET/api/systems/export/{name}?format={format}One token or component export (formats below)

Only systems with status ACTIVE have approved, ready-to-use files. A system served by these routes always resolves to one approved design: the one the owner pinned, else the newest published, else the newest approved.

Export formats

formatWhat you get
globals-cssCSS variables in the shadcn/ui shape, light and dark
colors-tsTypeScript color tokens (HEX and HSL)
tailwind-themeTailwind v3 theme extension
tailwind-v4Tailwind v4 @theme CSS with OKLCH colors, fonts, radius and spacing
dtcgW3C Design Tokens Community Group JSON
brand-manifestJSON brand manifest (colors, typography, spacing)
componentsZIP of component files
components-jsonComponents as JSON, with HTML code and variants per row
pagesZIP of page template files
assets-svgZIP of the vector brand assets with a manifest
allZIP of every token file, component, page and vector asset

ZIP bundle

Bundle contents
{name}-{version}-bundle.zip
  manifest.json          metadata, file list, brand asset URLs
  tokens/
    globals.css          CSS variables
    colors.ts            color tokens
    tailwind-theme.ts    Tailwind config extension
    tailwind-theme.css   Tailwind v4 @theme (OKLCH)
    tokens.dtcg.json     DTCG design tokens
    brand-manifest.json
  components/            one file per component
  pages/                 one file per page template
  ADOPTION_GUIDE.md

Raster brand assets (logo, images) are not inside the ZIP: manifest.json and the adoption manifest list their URLs, with WebP and thumbnail variants where they exist. Download them into your own public/ folder.

Your designs (API key)

These routes take an API key as Authorization: Bearer <key> and only reach designs in the key's own workspace; another workspace's design answers 404.

MethodEndpointPermissionReturns
GET/api/v1/meanyThe workspace, key name and permissions
GET/api/v1/designs/{id}/handoffREADThe design as JSON: tokens, direction, mark, imagery, the continuation rules and the import contract
GET/api/v1/designs/{id}/handoff-promptREADThe same contract as a markdown prompt for a text-first agent
GET/api/v1/designs/{id}/prompt-packREADAn ordered Claude Design prompt pack built from the design
POST/api/v1/designs/{id}/external-artifactsARTIFACTS_WRITEUploads components, pages and assets as drafts for your review
POST/api/v1/designs/{id}/finish-externalPIPELINEEnds the external design step and moves the project to review

Upload limits: each request body must stay under 4,000,000 bytes (a 413 otherwise). Send components and pages in their own request and each raster asset in its own request, at most 3 MB per asset, or pass an https image URL instead. Uploads land as drafts; nothing is approved without you.

Previews

Approved and published designs have public previews at /preview/d/{designId}, with /components/{name}, /landing and /pricing below it. The adoption manifest carries these links as previewUrl.

Errors, limits and caching

StatusMeaning
400Invalid parameters
401Missing, invalid or revoked key
403The key lacks the permission this route needs
404Unknown system or design, or one outside your workspace
429Rate limited; wait for the Retry-After header

Errors are JSON, for example { "error": "System 'unknown' not found" }. Token exports are generated on each request; the agent prompt is cached for about 5 minutes and carries an X-System-Updated-At header so you know when to fetch it again.