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

# Add a text snippet

> Teach the chatbot facts that aren't on a page or in a file, such as opening hours or an internal policy.

Some answers don't live anywhere you can point a crawler at: holiday opening hours, a return exception, how your team handles a rare case. Add them as text.

## From a question the chatbot couldn't answer

The quickest way is from the [knowledge gaps](https://customergpt.ai/docs/knowledge/knowledge-gaps.md) report:

1. Click **Dashboard** in the sidebar, find the question under **Knowledge gaps**, and open it.
2. Under **Add an answer to the knowledge base**, write the answer in **Your answer**.
3. Click **Add answer to knowledge base**.

CustomerGPT adds it as a text source and marks the gap resolved. Only workspace administrators can do this.

## As a file

Write the text in a `.txt` or `.md` file and drag it onto the upload area in **Knowledge Base**. See [Upload files](https://customergpt.ai/docs/knowledge/upload-files.md).

## With the CLI or the API

On plans with API access:

```bash theme={null}
customergpt knowledge text add "We're open 9am–6pm Monday to Friday, and closed on public holidays." --chatbot BOT_ID --name "Opening hours" --yes --wait
```

With the API, use the `sources_add` action (see the [API introduction](https://customergpt.ai/docs/api-reference/introduction.md)) with `text` and `name`.

## Text snippet or custom response?

* **A text snippet** is knowledge. The chatbot answers in its own words from it, and can combine it with other content.
* **A [custom response](https://customergpt.ai/docs/knowledge/custom-responses.md)** is an exact answer, sent word for word when a visitor asks that question.

Use a snippet for facts, and a custom response when the wording must not change.

## Change or remove a snippet

A text source can't be edited in place. Delete it and add the new version: with the CLI, `customergpt knowledge documents delete SOURCE_ID --chatbot BOT_ID --yes`. See [Keep your content up to date](https://customergpt.ai/docs/knowledge/keep-content-up-to-date.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.