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
ParamInDescription
versionpathCanonical version or alias.
localesqueryComma-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

CodeHTTPMeaning
bad_request400Malformed :version.
not_found404Version is not registered.

Example

curl -s "https://api.dtpr.io/api/v2/schemas/ai@2026-04-16-beta/categories?locales=en"

See also

Copyright © 2026