createDataType
Define a new content-type template for your directory. Verify unique category name to prevent admin UI corruption and ensure proper post organization.
Instructions
Create a data type - Define a new content-type template. Only do this when the user explicitly wants a new post type - most sites come pre-configured with the types they need.
Use when: adding a new data-type classifier. Rare - usually preconfigured.
Required: category_name, category_active.
Pre-check before create: BD does NOT enforce uniqueness on category_name or the derived system_name. Duplicate data types corrupt the post-type admin UI, break post-listing widgets that bind by name, and risk posts landing under the wrong type. Do a server-side filter-find: listDataTypes property=category_name property_value=<proposed> property_operator==. Zero rows = name free; >=1 row = taken. Do NOT paginate unfiltered lists - filtered lookup is one tiny response. If taken: reuse via updateDataType, OR ask the user, OR pick an alternate category_name and re-check. Never silently create a duplicate.
Enums: category_active: 1=active and available for members to use, 0=inactive; limit_available: 0, 1.
See also: updateDataType (modify existing).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category_name | Yes | Display name for this content type (e.g. "Single Photo Post", "Multi-Photo Post", "Video Post") | |
| category_active | Yes | 1 = active and available for members to use; 0 = inactive | |
| limit_available | No | 1 = membership-plan posting limits apply to this data type; 0 = no per-plan limits |