Skip to content
Esc
navigateopen⌘Jpreview

Content model

Every collection and map in the organization with its fields. The generated client is typed from this. Deleted fields and old rename aliases carry a deprecated record so regeneration keeps downstream clients compiling until the matching Action is completed.

GET/model
Responses
200OK
typesobject[]required
Show properties
Array of object
slugstringrequired
namestringrequired
kindstringrequired
Allowed:collectionmap
fieldsobject[]required
Show properties
Array of object
keystringrequired
namestringrequired
typestringrequired
Allowed:textrich_textnumbercheckboxdateselectmulti_selectlinkpersonassetreferencemulti_reference
optionsobject[]required
Show properties
Array of object
namestringrequired
colorstringrequired
collectionstring
deprecatedobject
Show properties
reasonstringrequired
Allowed:deletedrenamed
atstring<date-time>required
bystring
notestring
renamedTostring
401401
One of:
object
definedanyrequired
codeanyrequired
statusanyrequired
messagestringrequired
default: "Authentication required. Pass an organization API key in the `x-api-key` header."
dataany
object
definedanyrequired
codestringrequired
statusnumberrequired
messagestringrequired
dataany
Request
curl -X GET "https://stetcms.com/api/v1/model"
Response
{
  "types": [
    {
      "slug": "string",
      "name": "string",
      "kind": "collection",
      "fields": [
        {
          "key": "string",
          "name": "string",
          "type": "text",
          "options": [
            {
              "name": "string",
              "color": "string"
            }
          ],
          "collection": "string",
          "deprecated": {
            "reason": "deleted",
            "at": "2024-01-01T00:00:00Z",
            "by": "string",
            "note": "string",
            "renamedTo": "string"
          }
        }
      ]
    }
  ]
}