Skip to content

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
string
Required

Responses

Type deleted

Playground

Server
Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

Delete a user-defined post type.

Auth: session + post-types admin role.

Parameters

NameInTypeRequiredDescription
keypathstringYestype_key

Request Body

None.

Response 200

json
{
	"data": { "deleted": true, "type_key": "case-study" }
}

Response Errors

  • 400 built-in type, or posts still exist for this type
  • 401 missing session
  • 403 insufficient role
  • 404 type not found
  • 503 MODULE_DISABLED

Notes

  • Built-in types cannot be deleted.
  • Reassign or delete posts of this type before deleting the definition.