REST API (v2)
GET /schemas/:version/categories
List the categories defined in a schema version.
GET /schemas/:version/categories
Small, cheap response. Use for populating category pickers or learning the schema's category order.
Summary
Returns every category in the schema version, in declaration order. Supports locale filtering.
Request
GET https://api.dtpr.io/api/v2/schemas/:version/categories
| Param | In | Description |
|---|---|---|
version | path | Canonical version or alias. |
locales | query | Comma-separated locale codes. E.g. ?locales=en,fr. Omit for every locale. |
Response
HTTP/1.1 200 OK
Content-Type: application/json
DTPR-Content-Hash: sha256-…
Cache-Control: no-store
{
"ok": true,
"version": "ai@2026-04-16-beta",
"categories": [
{
"id": "purpose",
"name": [{"locale":"en","value":"Purpose"}],
"description": [{"locale":"en","value":"Why the technology is deployed."}],
"shape": "hexagon",
"context": {
"values": [
{ "id": "commercial", "color": "#…", "label": [{"locale":"en","value":"Commercial"}] }
]
}
}
]
}
Errors
| Code | HTTP | Meaning |
|---|---|---|
bad_request | 400 | Malformed :version. |
not_found | 404 | Version is not registered. |
Example
curl -s "https://api.dtpr.io/api/v2/schemas/ai@2026-04-16-beta/categories?locales=en"
GET /api/v2/schemas/ai@2026-04-16-beta/categories?locales=en HTTP/1.1
Host: api.dtpr.io
See also
- MCP
list_categories GET /schemas/:version/elements— filter bycategory_id.- Elements & categories