Object types
Create an Object type
Create a new Object type, defining the content model that its Objects will follow. Only title is required; the slug is derived from the title when omitted. Define metafields here so that Objects created in this type can carry the corresponding metadata values.
post/buckets/{slug}/object-types
Request
- Base URLhttps://api.cosmicjs.com/v3
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"metafields": [
{
"type": "text",
"media_validation_type": "image"
}
]
}Response
The created Object type.
Example response
{
"object_type": {
"metafields": [
{
"type": "text",
"media_validation_type": "image"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.