Docs

Resources & responses

Native and CMS resources, collections vs. singletons, and the JSON:API response shape.

Everything you can read through the API is a resource. There are two kinds, distinguished by their URL namespace:

  • Native resources — built-in Einblick modules exposed at /api/v1/{slug}. Currently buildings, events, festivals, jobs, and products.
  • CMS resources — the CMS collections and singletons of your workspace, exposed at /api/v1/cms/{slug}.

Each resource is either a collection (many records) or a singleton (exactly one record, for example a settings page). GET /api/v1 tells you the slug, mode, and source type of every resource your key can access.

Collection responses

curl "https://actions.einblick.xyz/api/v1/events?limit=2" \
  -H "Authorization: Bearer api_YOUR_KEY"
{
  "jsonapi": { "version": "1.1" },
  "links": {
    "self": "https://actions.einblick.xyz/api/v1/events?limit=2",
    "next": "https://actions.einblick.xyz/api/v1/events?limit=2&cursor=..."
  },
  "meta": {
    "resource": { "name": "Events", "slug": "events", "mode": "collection" },
    "fields": [
      {
        "key": "title",
        "label": "Title",
        "type": "string",
        "required": true,
        "readable": true,
        "writable": true,
        "inlineEditable": true,
        "sortable": true,
        "expandable": false
      }
    ],
    "page": { "nextCursor": "..." }
  },
  "data": [
    {
      "type": "events",
      "id": "evt_1",
      "attributes": { "title": "Open House 2026" },
      "meta": {
        "slug": "open-house-2026",
        "createdAt": 1767222000000,
        "updatedAt": 1767222000000,
        "publishedAt": 1767222000000
      }
    }
  ]
}

The parts worth knowing:

  • data — the records. Each has type (the resource slug), a stable id, attributes (the readable fields your key is granted), and meta.
  • meta.fields — machine-readable field metadata: type, whether the field is required, readable, writable, sortable, or expandable, plus options for select fields and allowed MIME types for file fields. Use this to build dynamic clients without hardcoding a schema.
  • meta.page.nextCursor / links.next — pagination, see Pagination & sorting.
  • Record meta carries system values: slug, sort, createdAt, updatedAt, and publishedAt (all timestamps are Unix milliseconds).

Singleton resources return a single-record document (data is an object, not an array) from GET /api/v1/{slug} directly.

Fetching one record

curl https://actions.einblick.xyz/api/v1/events/open-house-2026 \
  -H "Authorization: Bearer api_YOUR_KEY"

Records are addressed by their public identifier — the record slug by default; some resources also accept the record id. The key-scoped OpenAPI schema documents the accepted identifier modes per resource (x-einblick.identifier).

Field types

meta.fields[].type uses Einblick field types. The most relevant mappings:

Field typeJSON value
string, text, textarea, markdownstring
richtextstructured rich-text document ({ "type": "doc", "content": [...] })
numbernumber
boolean, switch, checkboxboolean
date / datetimeISO date / date-time string
selectstring (one of options[].value)
tags, multiselectarray of strings
image, fileasset object or null — see Assets & files
images, filesarray of asset objects
relation{ "id", "slug", "collection" } reference or null
relationsarray of relation references

Relation references can be expanded into full records with the include query parameter — see Includes.

Localized content

Pass locale to read localized fields in a specific language where the resource supports it:

curl "https://actions.einblick.xyz/api/v1/cms/pages?locale=de" \
  -H "Authorization: Bearer api_YOUR_KEY"