---
title: "Read a Space's live content model"
method: GET
path: "/v1/spaces/{spaceId}/zero/content-model"
tags: ["Spaces"]
---

# Read a Space's live content model

`GET /v1/spaces/{spaceId}/zero/content-model`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/zero/content-model`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `spaces:read`)

Returns the compiled content model the Space's live version publishes, with its schema table and revision. This is the build input `sf zero types` generates types from; for browsing what a Space can do, list its Abilities instead. A Space with no live version, or one that declares no content model, answers with nulls.

## Path parameters

- `spaceId` string, required

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `versionId` string, nullable, required: The live version this content model came from, or null when there is none.
    - `model` object, nullable, required: The compiled content model release, or null when the live version declares none.
      - `format` 'spacefast.zero-wordpress', required
      - `version` 1, required
      - `revision` string, required
      - `schemas` object[], required
        - `id` string, required
        - `sha256` string, required
        - `schema` union, required
          - string
          - number
          - boolean
          - unknown[]
            - unknown
          - object
      - `wordpress` object, required
        - `format` 'spacefast.wordpress-content-model', required
        - `version` 1, required
        - `resources` object[], required
          - `id` string, required
          - `name` string, required
          - `label` string, required
          - `kind` 'posts' | 'pages' | 'media' | 'collection', required
          - `fields` object[], required
            - `id` string, required
            - `name` string, required
            - `label` string, required
            - `required` boolean, required
            - `value` union, required
              - …
          - `publicRead` boolean, required
      - `tables` object[], required
        - `id` string, required
        - `name` string, required
        - `columns` object[], required
          - `id` string, required
          - `name` string, required
          - `nullable` boolean, required
          - `value` union, required
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
        - `indexes` object[], required
          - `id` string, required
          - `fields` string[], required
          - `unique` boolean, required
      - `abilities` union[], required
        - union
          - object
            - `id` string, required
            - `input` object, required
              - …
            - `output` object, required
              - …
            - `permits` string[], required
            - `reads` string[], required
            - `writes` string[], required
            - `exposure` union, required
              - …
            - `cache` union, required
              - …
            - `kind` 'query', required
            - `mode` 'read', required
          - object
            - `id` string, required
            - `input` object, required
              - …
            - `output` object, required
              - …
            - `permits` string[], required
            - `reads` string[], required
            - `writes` string[], required
            - `exposure` union, required
              - …
            - `cache` union, required
              - …
            - `kind` 'mutation', required
            - `mode` 'write', required
          - object
            - `id` string, required
            - `input` object, required
              - …
            - `output` object, required
              - …
            - `permits` string[], required
            - `reads` string[], required
            - `writes` string[], required
            - `exposure` union, required
              - …
            - `cache` union, required
              - …
            - `kind` 'endpoint', required
            - `mode` 'read' | 'write', required
      - `pages` object[], required
        - `id` string, required
        - `sourceKey` string, required
        - `path` string, required
        - `title` string, required
        - `blockName` 'zero/component', required
        - `componentId` string, required
        - `props` object, required
          - `id` string, required
          - `sha256` string, required
      - `hooks` object[], required
        - `id` string, required
        - `runtime` 'php' | 'quickjs', required
        - `artifact` string, required
        - `export` string, required
      - `syncBindings` unknown[], required
        - unknown
      - `materializations` object[], required
        - `resourceId` string, required
        - `fieldId` string, required
        - `directory` string, required
        - `suffix` string, required
        - `format` 'md' | 'html' | 'blocks' | 'tsx', required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
