Categories
Categories help you organize listings in your directory into logical groups. Categories support hierarchical structures with parent-child relationships, allowing you to create nested category trees (e.g., “Web Development” > “Frontend” > “React”).Get Directory Categories
Retrieve all active categories for a specific directory.directory_id(integer, required): The ID of the directory
Get Single Category
Retrieve a specific category by ID.directory_id(integer, required): The ID of the directorycategory_id(integer, required): The ID of the category
Create Category
Create a new category in the directory.directory_id(integer, required): The ID of the directory
title(string, required): The category title (max 255 characters)slug(string, optional): URL-safe slug (lowercase letters, numbers, hyphens only). Auto-generated from title if not provideddescription(string, optional): Category descriptioncontent(string, optional): Markdown content displayed on the category pageicon(string, optional): Icon identifier (max 255 characters)custom_icon_url(url, optional): URL to a custom icon image (max 2048 characters)parent_id(integer, optional): ID of the parent category for nested hierarchies. Must reference an existing categoryis_active(boolean, optional): Whether the category is active (default: true)show_on_sidebar(boolean, optional): Whether to display in the sidebar navigation (default: true)order(integer, optional): Sort order for display (min: 0)seo_title(string, optional): SEO meta title (max 255 characters)seo_description(string, optional): SEO meta description (max 500 characters)head_html(string, optional): Custom HTML injected into the page<head>section, e.g. hreflang tags (max 10000 characters)
Update Category
Update an existing category.directory_id(integer, required): The ID of the directorycategory_id(integer, required): The ID of the category
title(string, optional): The category title (max 255 characters)slug(string, optional): URL-safe slug (lowercase letters, numbers, hyphens only)description(string, optional): Category descriptioncontent(string, optional): Markdown content displayed on the category pageicon(string, optional): Icon identifier (max 255 characters)custom_icon_url(url, optional): URL to a custom icon image (max 2048 characters)parent_id(integer, optional): ID of the parent category. Must reference an existing categoryis_active(boolean, optional): Whether the category is activeshow_on_sidebar(boolean, optional): Whether to display in the sidebar navigationorder(integer, optional): Sort order for display (min: 0)seo_title(string, optional): SEO meta title (max 255 characters)seo_description(string, optional): SEO meta description (max 500 characters)head_html(string, optional): Custom HTML injected into the page<head>section (max 10000 characters)
Delete Category
Delete a category from the directory. When a parent category is deleted, its child categories will have theirparent_id set to null (they become top-level categories).
directory_id(integer, required): The ID of the directorycategory_id(integer, required): The ID of the category
Key Features
Hierarchical Categories
- Categories support parent-child relationships via the
parent_idfield - You can create multi-level category trees for organizing listings
- When a parent category is deleted, child categories are automatically promoted to top-level
Slug Generation
- Slugs are automatically generated from the category title if not provided
- Slugs must be URL-safe (lowercase letters, numbers, and hyphens only)
Sidebar Visibility
- Use
show_on_sidebarto control whether a category appears in the directory’s sidebar navigation - Use
orderto control the display order of categories in the sidebar
SEO & Custom Head HTML
- Use
seo_titleandseo_descriptionto set per-category meta tags for search engines - Use
head_htmlto inject custom HTML into the<head>section of category pages (e.g., hreflang tags for multi-language directories) - Use
contentto add rich markdown content displayed on the category page
Custom Icon
- Use
custom_icon_urlto set a custom icon image URL for the category (displayed in category grids and navigation)
