Content model
Every collection and map in the organization with its fields. The generated client is typed from this.
GET
/modelResponses
200OK
typesobject[]requiredShow propertiesHide properties
Array of
objectslugstringrequirednamestringrequiredkindstringrequiredAllowed:
collectionmapfieldsobject[]requiredShow propertiesHide properties
Array of
objectkeystringrequirednamestringrequiredtypestringrequiredAllowed:
textrich_textnumbercheckboxdateselectmulti_selectlinkpersonassetreferencemulti_referenceoptionsobject[]requiredShow propertiesHide properties
Array of
objectnamestringrequiredcolorstringrequiredcollectionstring401401
One of:
object
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "Authentication required. Pass an organization API key in the `x-api-key` header."
dataanyobject
definedanyrequiredcodestringrequiredstatusnumberrequiredmessagestringrequireddataany429429
One of:
object
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "The organization's API request limit for this period has been reached."
dataanyobject
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "Too many requests. Try again shortly."
dataanyobject
definedanyrequiredcodestringrequiredstatusnumberrequiredmessagestringrequireddataanyRequest
curl -X GET "https://stetcms.com/api/v1/model"const response = await fetch("https://stetcms.com/api/v1/model", {
method: "GET"
});Response
{
"types": [
{
"slug": "string",
"name": "string",
"kind": "collection",
"fields": [
{
"key": "string",
"name": "string",
"type": "text",
"options": [
{
"name": "string",
"color": "string"
}
],
"collection": "string"
}
]
}
]
}{
"defined": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "Authentication required. Pass an organization API key in the `x-api-key` header.",
"data": "string"
}{
"defined": true,
"code": "QUOTA_EXCEEDED",
"status": 429,
"message": "The organization's API request limit for this period has been reached.",
"data": "string"
}