Delete Post Type
DELETE
/api/v1/post-types/{key}
Deletes a type. Built-in types cannot be deleted. Types that still have posts cannot be deleted.
Authorizations
SessionAuth
Session ID for authenticated requests
Type
API Key (header: X-Session-ID)
Parameters
Path Parameters
key*
type_key of the post type
Type
Requiredstring
Responses
Type deleted
Delete a user-defined post type.
Auth: session + post-types admin role.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | type_key |
Request Body
None.
Response 200
json
{
"data": { "deleted": true, "type_key": "case-study" }
}Response Errors
400built-in type, or posts still exist for this type401missing session403insufficient role404type not found503MODULE_DISABLED
Notes
- Built-in types cannot be deleted.
- Reassign or delete posts of this type before deleting the definition.