Get Post Type Schema
GET
/api/v1/post-types/{key}/schema
Public schema for editors: field_schema, behaviors, icon, slug_prefix, color. Aggressive cache TTL (~86400s) unless fresh cache mode.
Parameters
Path Parameters
key*
type_key of the post type
Type
Requiredstring
Responses
Editor schema
application/json
JSON "data": { "type_key": "string", "type_name": "string", "field_schema": [ { "name": "string", "label": "string", "type": "string", "required": true, "options": [ "string" ], "max_length": 0, "placeholder": "string" } ], "behaviors": { "public_by_default": true, "enables_seo": true, "enables_comments": true, "enables_reactions": true, "enables_bookmarks": true, "enables_views": true, "enables_scheduling": true, "requires_approval": true, "allows_password_visibility": true, "default_visibility": "string", "allowed_body_formats": [ "string" ], "max_per_author": 0, "additionalProperties": "string" }, "icon": "string", "slug_prefix": "string", "color": "string" }
{
}
Public editor schema for a type: fields, behaviors, icon, slug prefix, color.
Auth: public.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | type_key |
Request Body
None.
Response 200
json
{
"data": {
"type_key": "case-study",
"type_name": "Case Study",
"field_schema": [
{
"name": "client",
"label": "Client",
"type": "text",
"required": true
}
],
"behaviors": {
"requires_approval": true,
"enables_seo": true
},
"icon": "briefcase",
"slug_prefix": "case-studies",
"color": "#2563eb"
}
}Response Errors
404type not found503MODULE_DISABLED
Notes
- Aggressive cache TTL (~86400s) unless
POST_TYPES_FRESH_CACHE_MODEis true. - Use this to drive dynamic forms in Admin / editors.