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

# Public Share Links

> Publish a chat at a public URL. Password-protect, set an expiry, revoke any time.

<Note>
  **Share links** publish a Chat with Your Documents project to a public URL. There are two modes: a **public chatbot** (visitors get a fresh chat each time, drawing on the project's knowledge bases and SQL sources) and a **conversation snapshot** (a frozen, read-only view of one specific chat). Optional password gate, expiry date, and per-visitor rate limit. Owners and admins can read back every visitor session.
</Note>

## Reaching this page

The **Share links** entry sits in the Chat with Your Documents sidebar. The topbar breadcrumb reads **Chat with Your Documents / `{project name}` / Share links**.

The page is gated by your role. Analysts and viewers see no entry; owners and admins see the full surface. The backend re-checks every action regardless.

## Two share modes

<CardGroup cols={2}>
  <Card title="Public chatbot" icon="comments">
    *Visitors can chat against this project's knowledge bases and SQL sources without a Wittify account. Each visitor gets their own private conversation.*

    Visitors who open the link get a fresh session each time. They can ask questions, see citations, and (if enabled) continue across messages.
  </Card>

  <Card title="Conversation snapshot" icon="bookmark">
    *Publish a read-only view of this chat at a public URL. Replies are off by default; turn them on only if visitors should be able to continue the conversation.*

    A frozen pin of one specific conversation. Use this to send a finished investigation to a stakeholder, with optional read-only or follow-up replies.
  </Card>
</CardGroup>

## Page header

| Element                        | What you see                                                                           |
| ------------------------------ | -------------------------------------------------------------------------------------- |
| Title                          | **Share links**                                                                        |
| Subtitle                       | *Publish a chat at a public URL. Password-protect it, set an expiry, revoke any time.* |
| **+ Create share link** button | Brand-gradient pill on the end edge. Opens a dropdown with two items.                  |

### Create share link dropdown

| Item                          | Behavior                                                                                                                                                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Public chatbot (template)** | Opens the chatbot create dialog.                                                                                                                                                                                                     |
| **Conversation snapshot**     | Disabled in this dropdown. Snapshots are created from the **Share as snapshot** entry in any chat's overflow menu, in the [Chat Canvas](/en/Systems/Chat-with-Documents/Chat-Canvas) header. The disabled item is a hint, not a bug. |

The button is replaced by a single **Create your first share link** call to action when the project has zero share links.

## Empty state

| Element | What you see                                                                                                     |
| ------- | ---------------------------------------------------------------------------------------------------------------- |
| Icon    | A share icon in a tinted square.                                                                                 |
| Title   | **No share links yet**                                                                                           |
| Hint    | *Create a share to publish either a public chatbot for this project or a read-only view of a past conversation.* |
| Button  | **Create your first share link** (brand-gradient). Opens the public chatbot dialog.                              |

While the list is loading, three pulsing placeholder cards render in place of the rows.

## Share row

Each row is a card with a stack of metadata chips and an end-edge actions menu.

| Element                      | What it shows                                               |
| ---------------------------- | ----------------------------------------------------------- |
| Title                        | The author-supplied title. Long titles truncate.            |
| Mode chip                    | **Chatbot** or **Snapshot**.                                |
| Password chip                | **Password protected** or **No password**.                  |
| Expiry chip                  | **Expires in {relative}**, **No expiry**, or **Expired**.   |
| Status chip                  | **Revoked** is red and overrides every other chip when set. |
| Replies chip (snapshot only) | **Replies on** or **Read only**.                            |
| Created by                   | *Created by {user}*.                                        |
| Per-row menu                 | A three-dot button.                                         |

### Per-row menu items

| Item                   | Behavior                                                                                                                                                                                                                           |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Copy link**          | Copies the public URL to the clipboard. Toast on success: *Link copied.* Toast on failure: *Couldn't copy to clipboard.*                                                                                                           |
| **Open in new tab**    | Opens the visitor view in a separate, isolated tab so you can preview what visitors see.                                                                                                                                           |
| **View conversations** | Opens the admin read-back surface for that share. See **Visitor conversations** below.                                                                                                                                             |
| **Rotate password**    | Generates a new password for this share. Toast: *Password rotated.*                                                                                                                                                                |
| **Remove password**    | Converts the share to **No password**.                                                                                                                                                                                             |
| **Revoke link**        | Opens a confirmation dialog. Title: *Revoke this share link?* Body: *Visitors with the URL will immediately see a "not available" page. This cannot be undone.* The confirm button is red. Toast on success: *Share link revoked.* |

The **Rotate password** and **Remove password** items only appear when the share already has a password set; the row's password chip flips accordingly.

## Public chatbot create dialog

The dialog is opened from **+ Create share link → Public chatbot (template)** or from the empty state's **Create your first share link** button.

### Title and body

| Element | What it says                                                                                                                                            |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title   | **Publish as public chatbot**                                                                                                                           |
| Body    | *Visitors can chat against this project's knowledge bases and SQL sources without a Wittify account. Each visitor gets their own private conversation.* |

If the project has no knowledge bases, a red strip is pinned above the form: *This project has no knowledge bases yet. Add one first to publish a public chatbot.* The dialog still lets you submit (the agent can answer with SQL alone), but the strip is the recommended path.

### Form fields

| Field                             | Notes                                                                                                                                                                                              |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Title**                         | Plain text, capped at 255 characters. Placeholder *e.g. Marketing Q\&A*. Optional.                                                                                                                 |
| **Knowledge bases to include**    | Checkbox list. Every knowledge base in the project is checked by default.                                                                                                                          |
| **SQL sources to include**        | Checkbox list. Every SQL source is checked by default.                                                                                                                                             |
| **Agent instructions (optional)** | Multi-line text area. Capped at 4,000 characters. Helper text: *Appended to the project's default instructions. Security rules always take precedence.*                                            |
| **Password protect** toggle       | Off by default. When on, reveals a password input. *4 to 72 characters. Visitors enter this before the chat loads.* The dialog blocks submit until the password has at least 4 trimmed characters. |
| **Set expiry** toggle             | Off by default. When on, reveals a date input. Placeholder *YYYY-MM-DD*. *Link stops working after this time. Leave off for no expiry.* The dialog blocks submit until a date is filled.           |
| **Rate limit per visitor** toggle | Off by default. When on, reveals a number input. *Messages per minute, per visitor. Defaults to 30 when off.*                                                                                      |

### Footer

| Button                | Behavior                                                                                                                                                                                                                           |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Cancel**            | Closes the dialog without creating. Disabled while submitting.                                                                                                                                                                     |
| **Create share link** | Brand-gradient submit. While submitting, label becomes **Creating** with a spinner. Toast on success: *Share link created.* Toast on failure: *Couldn't create share link.* (verbatim backend message if the server returned one). |

### Success screen

After a successful create, the dialog body swaps to a confirmation screen.

| Element                    | What it shows                                                                                      |
| -------------------------- | -------------------------------------------------------------------------------------------------- |
| Title                      | **Share link created**                                                                             |
| Body                       | *Anyone with this URL can reach it. You can copy it now or find it later in the Share links page.* |
| URL field                  | Read-only, monospaced, left-to-right text.                                                         |
| **Copy link** button       | Copies the URL. Toasts as above.                                                                   |
| **Open in new tab** button | Opens the visitor view in a separate tab so you can preview it.                                    |
| **Create another** button  | Resets the form so you can publish another share without closing the dialog.                       |
| **Done** button            | Closes the dialog and returns to the list.                                                         |

## Conversation snapshot create dialog

This dialog is reached from any chat's overflow menu (Chat Canvas → **Share as snapshot**), not from this page. The shape mirrors the chatbot dialog with two differences.

| Element                                                | Notes                                                                                                                                                           |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title                                                  | **Share this conversation**                                                                                                                                     |
| Body                                                   | *Publish a read-only view of this chat at a public URL. Replies are off by default; turn them on only if visitors should be able to continue the conversation.* |
| **Allow visitors to continue the conversation** toggle | Off by default. Helper text: *New messages bill against your tenant's spend cap.*                                                                               |
| Knowledge base / SQL pickers                           | Hidden. The snapshot binds the chat's existing sources.                                                                                                         |

Otherwise the password, expiry, rate-limit, and submit affordances are identical to the chatbot dialog.

## Admin read-back, Visitor conversations

Click **View conversations** on any share row to open the read-back surface. The page lists every visitor session that has at least one message (sessions with zero messages are materialised lazily, opening the link without sending a message does not create a row).

### Header

| Element     | What you see                       |
| ----------- | ---------------------------------- |
| Back button | **Back to share links**            |
| Title       | **Visitor conversations**          |
| Subtitle    | *Read-back of chats from {title}.* |

### Toolbar

| Element                                   | What it does                                                                                            |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Search chats by content** field         | Filters server-side.                                                                                    |
| **Hide empty** / **Showing empty** toggle | Controls whether sessions with zero messages render. The label flips based on the current state.        |
| **Per page** label                        | Page-size dropdown. The available sizes are server-whitelisted.                                         |
| Page range                                | *{from}–{to} of {total}*.                                                                               |
| **Previous page** button                  | Aria label *Previous page*. Disabled at page 1.                                                         |
| **Next page** button                      | Aria label *Next page*. Disabled at the last page.                                                      |
| **See more ({remaining} left)** button    | Loads additional rows when the list is partially loaded. While loading, the label flips to **Loading**. |

### List rows

| Element            | What it shows                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| Visitor label      | *Visitor {id}* (or *Pinned session* on a snapshot's original chat).                                                 |
| Message count      | *`{count}` messages*. The singular form is *1 message*. *No messages yet* when zero.                                |
| Last activity      | *Last activity {relative}*.                                                                                         |
| Selection          | Click any row to populate the transcript pane. Default state shows: *Select a conversation to view its transcript.* |
| Search empty state | *No conversations match. Try a different term, or clear the search.*                                                |

### Per-row Delete

Each row carries a **Delete conversation** action. Confirmation dialog:

| Element                        | What it says                                                                                                                                       |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title                          | **Delete this conversation?**                                                                                                                      |
| Body                           | *The visitor session and every message in it will be removed permanently. This cannot be undone.*                                                  |
| **Cancel** button              | Closes without deleting.                                                                                                                           |
| **Delete conversation** button | Destructive (red, white text) per the global rule. Toast on success: *Conversation deleted.* Toast on failure: *Couldn't delete the conversation.* |

Snapshot mode rejects per-row delete on the share's original-author session. The action stays in the menu but the backend returns an error you cannot work around from this surface; this is intentional so the snapshot's source-of-truth chat survives.

### Errors

If the conversation list fails to load: *Couldn't load conversations.* If a transcript fails to load: *Couldn't load transcript.*

## Visitor experience

The visitor surface lives at `/{lang}/share/{share id}` in a route that does not include the dashboard chrome. Visitors do not need a Wittify account.

### Password gate

If the share is password-protected, the first visit shows a small card.

| Element             | What it says                                                                                              |
| ------------------- | --------------------------------------------------------------------------------------------------------- |
| Title               | **This chat is password protected**                                                                       |
| Body                | *Enter the password shared with you to continue.*                                                         |
| Field               | **Password**                                                                                              |
| **Continue** button | Submits to the server.                                                                                    |
| Wrong password      | *Incorrect password*                                                                                      |
| Rate-limited        | *Too many attempts. Try again in a minute.* The submit button disables for the window the server returns. |

### Unavailable

When the share is **Revoked** or **Expired**, the visitor sees a single message: *This link is no longer available.* No further action is possible.

### Chat surface

When the gate is cleared (or the share has no password), the visitor sees the full chat surface, including the same composer, scope filter, and tool-transparency tags as the authenticated [Chat Canvas](/en/Systems/Chat-with-Documents/Chat-Canvas).

| Mode         | Behavior                                                                                                                                                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Chatbot**  | Each visitor gets a fresh session. Sessions persist for that visitor through the same browser, so they can come back later if their session cookie has not been cleared.                                                                                                                                                  |
| **Snapshot** | Read-only by default. The visitor sees the original conversation pinned at the top. If the author has flipped *Allow visitors to continue the conversation* on, the composer renders and visitors can ask follow-up questions. Otherwise a strip reads *Read-only view. The author hasn't allowed replies on this share.* |

The visitor footer reads **Powered by Wittify** in both languages.

## Permissions

| Action                            | Owner | Admin | Analyst | Viewer |
| --------------------------------- | ----- | ----- | ------- | ------ |
| Open Share links                  | Yes   | Yes   | No      | No     |
| Create chatbot share              | Yes   | Yes   | No      | No     |
| Create snapshot share (from chat) | Yes   | Yes   | No      | No     |
| Rotate or remove password         | Yes   | Yes   | No      | No     |
| Revoke link                       | Yes   | Yes   | No      | No     |
| View visitor conversations        | Yes   | Yes   | No      | No     |
| Delete a visitor conversation     | Yes   | Yes   | No      | No     |

The share read-back surface respects the same role gate. Analysts and viewers never see this page; visitors are not authenticated.

## Common questions

<AccordionGroup>
  <Accordion title="Why is 'Conversation snapshot' disabled in the create dropdown?">
    Snapshot creation is anchored to a specific past chat, not to the project as a whole, so the entry point lives inside that chat. Open the chat in the [Chat Canvas](/en/Systems/Chat-with-Documents/Chat-Canvas), click the overflow menu in the header, and choose **Share as snapshot**. The disabled item on this page is a hint about where to find that flow.
  </Accordion>

  <Accordion title="A visitor reports the link returns 'This link is no longer available' but I have not revoked it.">
    Two other states share the same message: the share is **Expired**, or the underlying project, knowledge base, or SQL source has been deleted. Check the row's chips on the Share links page; if **Expired** is shown, edit the share or create a new one. If the project chips look fine, the source the share depends on may have been removed.
  </Accordion>

  <Accordion title="My password contains 3 characters and Create share link is greyed out.">
    The dialog blocks submit when the password is shorter than 4 trimmed characters. The minimum is 4 and the maximum is 72.
  </Accordion>

  <Accordion title="I rotated the password but visitors still see the old gate.">
    Rotation issues a new password. The old password is invalidated immediately; visitors who already have an active session keep it (their cookie carries a visitor token from the previous gate). If you also need to bounce live sessions, **Revoke link** is the right tool, then create a new share.
  </Accordion>

  <Accordion title="I cannot delete the original-author session under a snapshot.">
    This is intentional. The snapshot pins one specific conversation; deleting that conversation from the read-back surface would silently break what the share is showing. If you want to retract a snapshot entirely, use **Revoke link**.
  </Accordion>

  <Accordion title="Visitor conversations is empty even though I know visitors opened the link.">
    Visitor sessions are materialised on the first message, not on first open. A visitor who arrives at the chat and bounces without sending a message produces no row. **Hide empty** has no effect in that case (there is nothing to hide).
  </Accordion>

  <Accordion title="The visitor view shows the Wittify wordmark in English even when the visitor is on the Arabic page.">
    Tool tags (RAG, SQL, HyDE) and the Wittify wordmark stay English everywhere because they are technical labels. Only those small English chips are intentionally not translated.
  </Accordion>

  <Accordion title="Where do I see the password I just created?">
    The success screen of the create dialog shows the URL but not the password (it never leaves the server in plaintext after creation). Save the password somewhere yourself before closing the dialog. If you lose it, click **Rotate password** to issue a new one.
  </Accordion>

  <Accordion title="Can I bulk-revoke or bulk-delete share links?">
    No. Each share is acted on individually so a misclick cannot wipe out a row of public chatbots at once. Revoke each link separately, or delete the project itself if you want to retire every share with it.
  </Accordion>
</AccordionGroup>

## Where to go next

<CardGroup cols={2}>
  <Card title="Chats" icon="comments" href="/en/Systems/Chat-with-Documents/Chats">Pick a session to publish as a snapshot.</Card>
  <Card title="Knowledge Bases" icon="folder-tree" href="/en/Systems/Chat-with-Documents/Knowledge-Bases">A chatbot share needs at least one knowledge base.</Card>
  <Card title="Project Settings" icon="gear" href="/en/Systems/Chat-with-Documents/Project-Settings">See the workspace's spend cap.</Card>
  <Card title="Chat Canvas" icon="message-bot" href="/en/Systems/Chat-with-Documents/Chat-Canvas">Where the visitor's chat actually runs.</Card>
</CardGroup>
