REST API (v2)
REST API (v2)
Overview of the DTPR v2 REST API — base URL, headers, authentication, CORS.
REST API (v2)
The DTPR v2 REST API is a public, read-only JSON + SVG API hosted at:
https://api.dtpr.io/api/v2
It is the underlying HTTP contract behind the MCP server — every MCP tool has a REST equivalent. Integrate against whichever surface fits your client.
In this section
GET /schemas— list schema versions and aliases.GET /schemas/:version/manifest— schema manifest (title, description, content hash).GET /schemas/:version/categories— category list for a version.GET /schemas/:version/elements— paginated element list with filters.GET /schemas/:version/elements/:element_id— single element with variants + symbol.POST /schemas/:version/validate— validate a datachain instance.- Icon routes — shapes, symbols, composed icons.
- Pagination + fields + locales — cursor semantics, projection.
- Errors — shared error shape and codes.
Conventions
- Authentication: none. All endpoints are public. Optional
DTPR-Client: <name>header moves you to a dedicated rate-limit bucket. - CORS: requests from an explicit allow-list (
dtpr.io,docs.dtpr.io,studio.nuxt.com, localhost, preview subdomains) are permitted. No wildcard. Exposed response headers:X-Request-Id,DTPR-Content-Hash,Retry-After. - Response headers: version-scoped reads stamp
DTPR-Content-Hash(hex content hash) andCache-Control. The canonical version is echoed inside the JSON body as"version"— there is noX-DTPR-Versionheader. - Versioning: the
:versionpath segment accepts a canonical id likeai@2026-04-16-betaor an alias likeai@latest. - Errors: see Errors for the shared shape.
Related
- MCP server — JSON-RPC surface over the same schema.
- Icon composition — conceptual background for the icon routes.