> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helpgenie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Public Help Hub

> Unauthenticated endpoints for loading a Genie's public Help Hub and reading individual published guides.

These routes use `resource: "help-hub"` and require **no API key**. They are intended for consumer-facing surfaces — the public Help Hub page (`/help/:url_name`) and individual guide pages (`/help/:url_name/:documentId`).

Only Genies with `is_public: true` (or `is_marketplace_genie: true`) are served. A Help Hub can additionally be disabled per-Genie without making the Genie itself private.

Only documents the owner has explicitly marked `is_public` are included in any response from these endpoints.

***

## Get Help Hub

Returns the full public data for a Genie's Help Hub: branding, contact details, published guides grouped by topic, featured questions, downloadable resources, and quick-links.

<ParamField body="resource" type="string" required>
  `help-hub`
</ParamField>

<ParamField body="action" type="string" required>
  `public-get`
</ParamField>

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="url_name" type="string" required>
      The Genie's URL slug (e.g. `"acme-support"`). Also accepted as a query parameter.
    </ParamField>
  </Expandable>
</ParamField>

<ResponseField name="hub" type="object">
  <Expandable title="properties">
    <ResponseField name="genieId" type="string">Genie UUID.</ResponseField>
    <ResponseField name="urlName" type="string">Genie URL slug.</ResponseField>
    <ResponseField name="name" type="string">Genie display name.</ResponseField>
    <ResponseField name="description" type="string | null">Genie description.</ResponseField>
    <ResponseField name="welcomeMessage" type="string | null">Welcome message shown at the top of the hub.</ResponseField>

    <ResponseField name="branding" type="object">
      Hub branding derived from the Genie's configuration.

      <Expandable title="properties">
        <ResponseField name="primaryColor" type="string">Primary hex color (e.g. `"#4E9CFF"`). Defaults to `"#4E9CFF"` when unset.</ResponseField>
        <ResponseField name="secondaryColor" type="string | null">Secondary hex color, or `null` when unset.</ResponseField>
        <ResponseField name="logoUrl" type="string | null">HTTPS URL of the logo image, or `null`.</ResponseField>
        <ResponseField name="brandName" type="string | null">Brand name to display alongside the logo.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="phoneNumber" type="string | null">Live phone number for the Genie, or `null` if no active number is provisioned.</ResponseField>
    <ResponseField name="emailAddress" type="string | null">Provisioned support email address, or `null` if a mailbox is not active.</ResponseField>

    <ResponseField name="links" type="array">
      Quick-links curated by the owner. Maximum 12 links.

      <Expandable title="item properties">
        <ResponseField name="id" type="string">Link identifier.</ResponseField>
        <ResponseField name="label" type="string">Link display label.</ResponseField>
        <ResponseField name="url" type="string">Link destination URL (HTTPS or HTTP).</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="topics" type="array">
      Published guides grouped by folder topic, sorted by folder position then name. Empty when the owner has disabled the guide section. Unfoldered guides appear in a final topic named `"Everything else"`.

      <Expandable title="item properties">
        <ResponseField name="id" type="string">Topic (folder) ID, or `"unsorted"` for unfoldered guides.</ResponseField>
        <ResponseField name="name" type="string">Topic display name.</ResponseField>

        <ResponseField name="guides" type="array">
          Guides in this topic, sorted alphabetically by name.

          <Expandable title="item properties">
            <ResponseField name="id" type="string">Document UUID.</ResponseField>
            <ResponseField name="name" type="string">Guide title.</ResponseField>
            <ResponseField name="summary" type="string | null">One-line description from the document metadata.</ResponseField>
            <ResponseField name="updatedAt" type="string | null">ISO 8601 last-updated timestamp.</ResponseField>
            <ResponseField name="answers" type="string[]">Up to 8 questions this guide answers, used for hub search and the guide card preview.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="guideCount" type="number">Total number of published guides. `0` when the guide section is disabled.</ResponseField>
    <ResponseField name="headline" type="string | null">Optional custom headline for the hub page.</ResponseField>
    <ResponseField name="subheadline" type="string | null">Optional subheadline.</ResponseField>
    <ResponseField name="askPlaceholder" type="string | null">Custom placeholder text for the chat input.</ResponseField>

    <ResponseField name="questions" type="array">
      Featured questions shown on the hub. Curated by the owner when configured; otherwise derived from the questions declared by published guides. Maximum 24. Empty when the owner has disabled the FAQ section.

      <Expandable title="item properties">
        <ResponseField name="id" type="string">Question identifier.</ResponseField>
        <ResponseField name="question" type="string">Question text.</ResponseField>
        <ResponseField name="topic" type="string | null">Topic label the question belongs to.</ResponseField>
        <ResponseField name="documentId" type="string | null">UUID of the guide that answers this question, or `null` if not linked to a specific guide.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="downloads" type="array">
      Downloadable resources (manuals, PDFs). Maximum 24.

      <Expandable title="item properties">
        <ResponseField name="id" type="string">Resource identifier.</ResponseField>
        <ResponseField name="label" type="string">Display label.</ResponseField>
        <ResponseField name="fileUrl" type="string">HTTPS URL of the file.</ResponseField>
        <ResponseField name="fileName" type="string | null">Original filename.</ResponseField>
        <ResponseField name="mimeType" type="string | null">MIME type (e.g. `"application/pdf"`).</ResponseField>
        <ResponseField name="sizeBytes" type="number | null">File size in bytes.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="contact" type="object | null">
      Contact details configured by the owner. `null` when no contact information is set.

      <Expandable title="properties">
        <ResponseField name="hours" type="string | null">Business hours text.</ResponseField>
        <ResponseField name="address" type="string | null">Physical address.</ResponseField>
        <ResponseField name="mapUrl" type="string | null">URL to a map or directions page.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="searchEngineVisible" type="boolean">
      Whether this hub has opted into search-engine indexing. `true` only when the owner enabled indexing **and** the hub has at least 3 published guides.
    </ResponseField>

    <ResponseField name="showApp" type="boolean">
      Whether the "Get the app" band should be shown on the hub page. Defaults to `true`; the owner can disable it without affecting the rest of the hub.
    </ResponseField>
  </Expandable>
</ResponseField>

<CodeGroup>
  ```typescript Request theme={null}
  const response = await ApiService.invoke({
    resource: "help-hub",
    action: "public-get",
    data: { url_name: "acme-support" },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helpgenie.ai/v1 \
    -H "Content-Type: application/json" \
    -d '{
      "resource": "help-hub",
      "action": "public-get",
      "data": { "url_name": "acme-support" }
    }'
  ```

  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "hub": {
        "genieId": "550e8400-e29b-41d4-a716-446655440000",
        "urlName": "acme-support",
        "name": "Acme Support",
        "description": "Get answers fast.",
        "branding": {
          "primaryColor": "#4E9CFF",
          "secondaryColor": null,
          "logoUrl": "https://example.com/logo.png",
          "brandName": "Acme Corp"
        },
        "phoneNumber": "+15551234567",
        "emailAddress": "support@acme.helpgenie.ai",
        "topics": [
          {
            "id": "folder-uuid",
            "name": "Getting Started",
            "guides": [
              {
                "id": "doc-uuid",
                "name": "How to create your first account",
                "summary": "A step-by-step guide for new users.",
                "updatedAt": "2024-06-26T10:00:00.000Z",
                "answers": ["How do I sign up?", "What do I need to get started?"]
              }
            ]
          }
        ],
        "guideCount": 1,
        "questions": [
          {
            "id": "doc-uuid:How do I sign up?",
            "question": "How do I sign up?",
            "topic": "Getting Started",
            "documentId": "doc-uuid"
          }
        ],
        "downloads": [],
        "links": [],
        "contact": null,
        "searchEngineVisible": false,
        "showApp": true
      }
    }
  }
  ```
</CodeGroup>

***

## Get guide

Returns the full content of a single published guide attached to a Genie's Help Hub. Both the Genie and the document must be public.

<ParamField body="resource" type="string" required>
  `help-hub`
</ParamField>

<ParamField body="action" type="string" required>
  `public-guide`
</ParamField>

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="url_name" type="string" required>
      The Genie's URL slug.
    </ParamField>

    <ParamField body="document_id" type="string" required>
      UUID of the guide document to retrieve.
    </ParamField>
  </Expandable>
</ParamField>

<ResponseField name="guide" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">Document UUID.</ResponseField>
    <ResponseField name="name" type="string">Guide title.</ResponseField>
    <ResponseField name="summary" type="string | null">One-line description.</ResponseField>

    <ResponseField name="topic" type="object | null">
      The folder this guide belongs to, or `null` if unfoldered.

      <Expandable title="properties">
        <ResponseField name="id" type="string | null">Folder UUID.</ResponseField>
        <ResponseField name="name" type="string">Folder display name.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="content" type="string">
      Full guide text as plain prose. Sections are separated by blank lines. Truncated to 60,000 characters.
    </ResponseField>

    <ResponseField name="truncated" type="boolean">
      `true` when the content exceeded 60,000 characters and was trimmed.
    </ResponseField>

    <ResponseField name="updatedAt" type="string | null">ISO 8601 last-updated timestamp.</ResponseField>
    <ResponseField name="genieName" type="string | null">Display name of the Genie this guide belongs to.</ResponseField>

    <ResponseField name="genieDocument" type="object | null">
      Structured branded document. Present only for guides authored with a branded template (FAQ, how-to, or one-pager). `null` for all other guide types.

      <Expandable title="properties">
        <ResponseField name="title" type="string">Document title.</ResponseField>
        <ResponseField name="subtitle" type="string | null">Optional subtitle.</ResponseField>
        <ResponseField name="template" type="string">Template type: `"faq"`, `"how-to"`, or `"one-pager"`.</ResponseField>

        <ResponseField name="sections" type="array">
          Document sections, in order. Maximum 40 sections.

          <Expandable title="item properties">
            <ResponseField name="heading" type="string">Section heading.</ResponseField>
            <ResponseField name="body" type="string">Section body text. Line breaks are preserved. Maximum 8,000 characters per section.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<CodeGroup>
  ```typescript Request theme={null}
  const response = await ApiService.invoke({
    resource: "help-hub",
    action: "public-guide",
    data: {
      url_name: "acme-support",
      document_id: "770e8400-e29b-41d4-a716-446655440002",
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helpgenie.ai/v1 \
    -H "Content-Type: application/json" \
    -d '{
      "resource": "help-hub",
      "action": "public-guide",
      "data": {
        "url_name": "acme-support",
        "document_id": "770e8400-e29b-41d4-a716-446655440002"
      }
    }'
  ```

  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "guide": {
        "id": "770e8400-e29b-41d4-a716-446655440002",
        "name": "How to create your first account",
        "summary": "A step-by-step guide for new users.",
        "topic": { "id": "folder-uuid", "name": "Getting Started" },
        "content": "Visit our website and click Sign up.\n\nEnter your business details and follow the setup wizard.\n\nYou will receive a confirmation email within a few minutes.",
        "truncated": false,
        "updatedAt": "2024-06-26T10:00:00.000Z",
        "genieName": "Acme Support",
        "genieDocument": null
      }
    }
  }
  ```
</CodeGroup>

***

## Error responses

| Status | Code               | Description                                                                                                                                                 |
| ------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400    | `VALIDATION_ERROR` | `url_name` or `document_id` missing from the request                                                                                                        |
| 404    | `NOT_FOUND`        | Genie not found or not public; hub disabled by the owner; document not found, not public, or not attached to this Genie; guide content still being prepared |
| 500    | `INTERNAL_ERROR`   | Server error                                                                                                                                                |
