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

# ankra canvas

> Publish canvas pages at a public, unguessable URL

## ankra canvas

Publish an HTML, SVG or Markdown file as a static page on the Ankra pages
host, list the pages your organisation has published, and unpublish them.

```bash theme={null}
ankra canvas publish report.html --title "Q3 report"
ankra canvas list
ankra canvas unpublish 3f0a2f7e-0000-4000-8000-000000000001
```

Anyone holding the URL can open the page, so publish nothing you would not
hand to that audience. Pages are static snapshots, expire after a retention
period (`--ttl-hours`) and can be unpublished at any time.

## ankra canvas list

List the canvas pages your organisation has published

```bash theme={null}
ankra canvas list [flags]
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--cursor` | | Continue from the cursor printed by a previous list |
| `--limit` | `0` | Maximum number of pages to return (default: the platform's page size) |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |

## ankra canvas publish

Publish an HTML, SVG or Markdown file and print its public URL.

The language is inferred from the file extension (.html and .htm, .svg, .md)
and can be set with `--language`. Other languages are refused, as is a file over
200000 characters.

Publishing the same file again updates the same page and keeps its URL: when
`--conversation-id` and `--artifact-id` are not given, both are derived from a hash
of the file's absolute path, so the page is identified by where the file lives.
Moving or renaming the file publishes a new page. Pass both ids to take control
of the identity yourself, for example to update a page published from the portal
canvas.

The URL is printed last, on its own line, so scripts can take the final line of
output; with -o json the publication is printed as a JSON document instead.

```bash theme={null}
ankra canvas publish <file> [flags]
```

**Examples**

```bash theme={null}
ankra canvas publish report.html
  ankra canvas publish notes.md --title "Release notes" --ttl-hours 24
  URL=$(ankra canvas publish diagram.svg | tail -n 1)
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--artifact-id` | | Artifact id identifying the page; give together with `--conversation-id` (default: derived from the file's absolute path) |
| `--conversation-id` | | Conversation id identifying the page; give together with `--artifact-id` (default: derived from the file's absolute path) |
| `--language` | | Page language: html, svg or markdown (default: inferred from the extension) |
| `-o`, `--output` | | Output format: json or yaml (default: human-readable) |
| `--title` | | Page title (default: the file name without its extension) |
| `--ttl-hours` | `0` | Hours the page stays live (default and maximum are set by the platform) |

## ankra canvas unpublish

Unpublish a page by its id (shown by 'ankra canvas list'). Its URL stops
serving the page immediately.

```bash theme={null}
ankra canvas unpublish <id> [flags]
```

**Flags**

| Flag | Default | Description |
| - | - | - |
| `--yes` | `false` | Skip the confirmation prompt |


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