Skip to main content

Tags

Tags provide a flexible labeling system for your directory listings. Unlike categories which are hierarchical, tags are flat labels that can be applied to listings for filtering and visual identification. Tags support custom colors and icons for enhanced display.

Get Directory Tags

Retrieve all active tags for a specific directory.
Parameters:
  • directory_id (integer, required): The ID of the directory
Response:

Get Single Tag

Retrieve a specific tag by ID.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • tag_id (integer, required): The ID of the tag
Response:

Create Tag

Create a new tag in the directory.
Parameters:
  • directory_id (integer, required): The ID of the directory
Request Body:
Request Body Fields:
  • title (string, required): The tag title (max 255 characters)
  • slug (string, optional): URL-safe slug (lowercase letters, numbers, hyphens only). Auto-generated from title if not provided
  • is_active (boolean, optional): Whether the tag is active (default: true)
  • icon (string, optional): Custom uploaded icon path (max 255 characters)
  • heroicon (string, optional): Heroicon name to use as the tag icon (max 255 characters). Takes priority over icon when both are set
  • color (string, optional): Background color for the tag (max 255 characters, e.g. “#F59E0B”)
  • text_color (string, optional): Text/accent color for the tag display (max 255 characters, e.g. “#FF0000”)
  • show_title (boolean, optional): Whether to display the tag title (default: true)
  • show_icon (boolean, optional): Whether to display the tag icon (default: true)
Response:

Update Tag

Update an existing tag.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • tag_id (integer, required): The ID of the tag
Request Body:
Request Body Fields:
  • title (string, optional): The tag title (max 255 characters)
  • slug (string, optional): URL-safe slug (lowercase letters, numbers, hyphens only)
  • is_active (boolean, optional): Whether the tag is active
  • icon (string, optional): Custom uploaded icon path (max 255 characters)
  • heroicon (string, optional): Heroicon name to use as the tag icon (max 255 characters)
  • color (string, optional): Background color for the tag (max 255 characters)
  • text_color (string, optional): Text/accent color for the tag display (max 255 characters)
  • show_title (boolean, optional): Whether to display the tag title
  • show_icon (boolean, optional): Whether to display the tag icon
Response:

Delete Tag

Delete a tag from the directory.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • tag_id (integer, required): The ID of the tag
Response:

Key Features

Slug Generation

  • Slugs are automatically generated from the tag title if not provided
  • Slugs must be URL-safe (lowercase letters, numbers, and hyphens only)

Icon Support

  • Tags support two types of icons: custom uploaded icons (icon) and Heroicons (heroicon)
  • When both are set, heroicon takes priority for display
  • Use show_icon to control icon visibility

Display Customization

  • color sets the tag’s background color and text_color its text/accent color — pair them for color-coded labels
  • show_title and show_icon control which parts of the tag are visible
  • Combine these options to create icon-only tags, text-only tags, or full tags with both