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

# Content

> Create, generate, review, publish, and manage content from the TPC CLI.

# Content

Manage the full content lifecycle for a product from the terminal: create or generate drafts, work the review queue (approve, reject, revise), publish approved drafts, and edit live pages. Pass `--scope <product-slug>/<org-slug>` to select the product. Every JSON response includes the resolved scope.

<Note>
  `tpc content` replaces the removed `tpc site page` command group. Publishing is gated on review: `create` and `generate` land drafts in the review queue, and `publish` fails with a conflict until the draft is approved. The old ungated `site page update --status published` path no longer exists.
</Note>

## The lifecycle

```
create / generate  →  review (approve / reject / revise)  →  publish
```

The review queue is a list filter: `tpc content list --status pending-review`.

## List content

List published pages (default):

```bash theme={null}
tpc --scope my-product/pro-org content list
```

Filter the published list (search, path prefix, pagination, sort):

```bash theme={null}
tpc --scope my-product/pro-org content list \
  --query pricing \
  --path-prefix blog/ \
  --page 2 --page-size 10 \
  --order-by createdAt --order-dir asc
```

List the review queue and other lifecycle states:

```bash theme={null}
tpc --scope my-product/pro-org content list --status pending-review
tpc --scope my-product/pro-org content list --status generating
tpc --scope my-product/pro-org content list --status rejected   # includes rejection feedback
tpc --scope my-product/pro-org content list --status failed
tpc --scope my-product/pro-org content list --status approved
```

`--prompt <prompt-id>` works with every status, including `published` — published pages keep the prompt they were generated from, so you can answer "which prompts have no content yet?":

```bash theme={null}
# every published page generated from one prompt
tpc --scope my-product/pro-org content list --prompt prompt_123

# the same prompt's drafts still in review
tpc --scope my-product/pro-org content list --status pending-review --prompt prompt_123
```

Published items include a `promptId` field (`null` for manually created pages).

## Get one item

`get` accepts a draft id or a published document id; the response says which kind answered.

```bash theme={null}
tpc --scope my-product/pro-org content get adraft_123
tpc --scope my-product/pro-org content get adoc_123
```

## Create content

Created pages land in the review queue as `pending_review` drafts — they publish only after approval.

```bash theme={null}
tpc --scope my-product/pro-org content create \
  --slug blog/hello-world \
  --title "Hello" \
  --content "# Hello"
```

Create from a local markdown file:

```bash theme={null}
tpc --scope my-product/pro-org content create \
  --slug docs/install \
  --title "Install" \
  --content-file ./install.md
```

## Generate content

Start the content-generation agent for one or more prompts (Pro plan). Generated drafts land in the review queue.

```bash theme={null}
tpc --scope my-product/pro-org content generate --prompt prompt_123
tpc --scope my-product/pro-org content generate \
  --prompt prompt_123 --prompt prompt_456 \
  --type recommended \
  --watch
```

`--watch` polls each draft every 5 seconds until generation completes or fails.

## Review the queue

Approve one or more drafts (approval queues publishing for publishable content):

```bash theme={null}
tpc --scope my-product/pro-org content approve adraft_123
tpc --scope my-product/pro-org content approve adraft_123 adraft_456
```

Reject with a reason (stored as reviewer feedback, shown in `list --status rejected`):

```bash theme={null}
tpc --scope my-product/pro-org content reject adraft_123 --reason "Wrong sources cited"
```

Revise a draft — submit an edited replacement, or send feedback for an agent re-run (Pro plan). Both return the draft to the review queue and clear a prior rejection:

```bash theme={null}
tpc --scope my-product/pro-org content revise adraft_123 --content-file ./revised.md
tpc --scope my-product/pro-org content revise adraft_123 --feedback "Tighten the intro and cite the pricing page"
```

## Publish and revert

`publish` queues publishing for an approved draft and fails with a conflict when the draft is unapproved:

```bash theme={null}
tpc --scope my-product/pro-org content publish adraft_123
```

`revert` unpublishes the live page and returns the draft to the review queue:

```bash theme={null}
tpc --scope my-product/pro-org content revert adraft_123
```

## Update a live page

Only the flags you pass are changed. There is no `--status` flag — publishing goes through approve/publish.

```bash theme={null}
tpc --scope my-product/pro-org content update adoc_123 --title "Updated title"
tpc --scope my-product/pro-org content update adoc_123 --content-file ./page.md
```

Pass an empty string to clear an optional field:

```bash theme={null}
tpc --scope my-product/pro-org content update adoc_123 --redirect-url ""
```

Manage domain attachments:

```bash theme={null}
tpc --scope my-product/pro-org content update adoc_123 \
  --attach-domain-id domain_123 \
  --canonical-domain-id domain_123
```

## Delete content

Soft-deletes a live page (with its linked draft and tracked URL) or deletes an unpublished draft:

```bash theme={null}
tpc --scope my-product/pro-org content delete adoc_123
tpc --scope my-product/pro-org content delete adoc_123 adraft_456
```

Every command also supports `--format json` for scripting:

```bash theme={null}
tpc --scope my-product/pro-org content list --status pending-review --format json
```
