Skip to main content

Custom Pages

In Directify, custom pages are standalone pages that appear in your directory’s navigation (navbar, footer, sidebar) or as unlisted pages accessible via URL. They’re ideal for static content like About, Terms, comparison pages, and programmatic SEO content. Pages support Markdown content and full SEO metadata.

List Pages

Retrieve all custom pages for a directory, ordered by sort order.
Parameters:
  • directory_id (integer, required): The ID of the directory
Response:

Get Single Page

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

Create Page

Create a new custom page. Uses updateOrCreate based on slug to prevent duplicates.
Parameters:
  • directory_id (integer, required): The ID of the directory
Request Body:
Request Body Fields:
  • title (string, required): The page title (max 255 characters)
  • slug (string, optional): URL-safe slug (lowercase letters, numbers, hyphens only). Auto-generated from title if not provided
  • markdown (string, optional): Page content in Markdown format
  • placement (string, optional): Where the page link appears in navigation. One of:
    • navbar - Appears in the top navigation
    • footer - Appears in the footer
    • sidebar - Appears in the sidebar
    • unlisted - Not shown in navigation, accessible only via direct URL (default)
  • is_published (boolean, optional): Whether the page is published (default: true)
  • is_external (boolean, optional): Whether this is a link to an external URL (default: false)
  • external_url (string, optional): External URL if is_external is true (must be a valid URL)
  • new_tab (boolean, optional): Whether external links open in a new tab (default: false)
  • order (integer, optional): Sort order for navigation placement (default: 0)
  • seo (object, optional): SEO metadata object:
    • title (string, optional): SEO title (max 255 characters)
    • description (string, optional): Meta description (max 500 characters)
Response:

Update Page

Update an existing page. Only pass fields you want to change. If the title changes and no slug is provided, a new slug is auto-generated.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • page_id (integer, required): The ID of the page
Request Body:
Request Body Fields: Same as Create Page, all fields optional. Response: Returns the updated page object (same format as Create Page response).

Toggle Page Status

Toggle a page between published and unpublished.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • page_id (integer, required): The ID of the page
Response: Returns the updated page object with toggled is_published status.

Delete Page

Delete a custom page from the directory.
Parameters:
  • directory_id (integer, required): The ID of the directory
  • page_id (integer, required): The ID of the page
Response:

Use Cases

Programmatic SEO Pages

Create comparison pages, location pages, or “X vs Y” pages at scale using the API:

Static Content Pages

Create About, Terms, Privacy Policy, or FAQ pages that appear in your navigation:
Add external links to your directory’s navigation: