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

# Prompts

> Create, list, retrieve, update, and delete Visibility prompts from the Lightsage CLI.

Prompt commands cover the public Visibility prompt workflows exposed by the Lightsage CLI. Use them to create prompt batches, retrieve prompt configuration, and manage individual prompts.

Use [Topics](/docs/cli-reference/prompt-topics) to manage prompt topics. Use [Actions](/docs/cli-reference/prompt-actions) to list prompt actionables, cited pages, and opportunities.

## Commands

| Command                                              | Description                                                             |
| ---------------------------------------------------- | ----------------------------------------------------------------------- |
| `lightsage prompts list`                             | List Visibility prompts.                                                |
| `lightsage prompts create`                           | Create one or more Visibility prompts.                                  |
| `lightsage prompts config retrieve`                  | Retrieve available topics, platforms, languages, regions, and defaults. |
| `lightsage prompts retrieve --prompt-id <prompt_id>` | Retrieve one prompt.                                                    |
| `lightsage prompts update --prompt-id <prompt_id>`   | Update one prompt.                                                      |
| `lightsage prompts delete --prompt-id <prompt_id>`   | Delete one prompt.                                                      |

## Retrieve prompt config

Retrieve the current prompt setup values:

```bash theme={null}
lightsage prompts config retrieve
```

The response includes topics, platforms, languages, regions, and defaults. Use these IDs when creating prompts.

## List prompts

```bash theme={null}
lightsage prompts list --output-format table
```

Filter by topic or lifecycle status:

```bash theme={null}
lightsage prompts list \
  --topic-id topic_123 \
  --status active
```

Include archived prompts:

```bash theme={null}
lightsage prompts list --include-archived
```

## Create prompts

Create multiple Visibility prompts in one request:

```bash theme={null}
lightsage prompts create \
  --prompts '[{"text":"What is the best API for crawling websites?","topic_id":"topic_123","platform_ids":["chatgpt"]},{"text":"Which API should I use to extract structured data from a webpage?","topic_id":"topic_123","platform_ids":["chatgpt"]}]'
```

The `--prompts` value is a JSON array. Each prompt object requires `text` and `topic_id`. Include `platform_ids` to choose tracked AI platforms.

Example response:

```json theme={null}
{
  "created": [
    {
      "id": "prompt_123",
      "topic_id": "topic_123",
      "text": "What is the best API for crawling websites?",
      "status": "active"
    }
  ],
  "count": 1,
  "errors": []
}
```

## Retrieve, update, and delete prompts

Retrieve one prompt:

```bash theme={null}
lightsage prompts retrieve --prompt-id prompt_123
```

Update prompt text, topic, platforms, or lifecycle status:

```bash theme={null}
lightsage prompts update --prompt-id prompt_123 \
  --text '"What is the best web crawling API for Node.js?"' \
  --status active
```

Delete one prompt:

```bash theme={null}
lightsage prompts delete --prompt-id prompt_123
```
