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

# Content

> Content API endpoints for creating and managing files and content within Curator

## /content/createFile

Creates a file model

Example Usage:

[Python Script](https://curator.interworks.com/file/api-example-createfile)

**Parameters:**
**file**

The file to attach, sent as a multipart upload. Required unless `file_location` is provided.

**file\_location**

A URL the Curator server should download the file from. Required unless `file` is provided.

**slug**

The unique identifier to use for the file in the URL. Required.

**title**

The title/name of the file. Optional, defaults to the slug.

**description**

A short description of the file. Optional.

**restrict\_access**

Whether the file should be restricted to certain groups. Optional, `true` or `false`.

**groups**

Comma-separated list of group names the file should be restricted to. Optional.

**hidden**

Hides the file from all views: search results, tiles, and explorer. Optional, `1` or `0`.

**hidden\_from\_search**

Hides the file from search results only. Optional, `1` or `0`.

**favoritable**

Whether users may favorite the file. Optional, `1` or `0`.

**allow\_browser\_cache**

Whether browsers may cache the file. Optional, `1` or `0`.

**download\_only**

Forces browsers to download the file instead of opening it. Optional, `1` or `0`.

Curator refuses HTML, JavaScript, CSS, XML, and SVG files sent with an API key unless `download_only` is `1`, because
opening them would run their code in Curator. This applies to `/content/updateFile` too.

**keywords**

Comma-separated list of existing keyword IDs (see `/content/listKeywords`) to classify the file with.
Unknown IDs are ignored. Optional.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": "Successfully created file",
        "id": 42
    }
```

When `groups` was provided and at least one name did not match an existing frontend group, the response also
includes a `groups_not_found` array listing those names. The file is created with the remaining groups only.

## /content/createNavMenu

Creates a nav menu model

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": 0
    }
```

When `groups` was provided and at least one name did not match an existing frontend group, the response also
includes a `groups_not_found` array listing those names. The menu link is created with the remaining groups only.

## /content/createPage

Creates a page containing a single full-page embed built from a URL, embed code, or a raw HTML document.
The page renders inside the normal Curator navigation with its title hidden, so the embedded content takes
up the whole page area. Exactly one of `url`, `embed_code`, or `html` must be provided.

**Parameters:**
**title**

The title of the new page. Required.

**url**

A URL to embed in the page.

**embed\_code**

Embed code (HTML) to render in the page as-is. The code is not compiled as a server-side template, but
unlike the `html` parameter it is also not sandboxed: scripts inside it run in the page in the viewing
user's browser session, so only publish embed code from trusted sources.

**html**

A full HTML document to display. The document is stored as a hidden, download-only Curator file and
rendered inside a sandboxed frame isolated from the viewer's Curator session. Because the file is
download-only, visiting its direct `/file/{slug}` link downloads the document rather than rendering it in
the browser.

**slug**

The unique identifier to use for the page in the URL. Optional, generated from the title when omitted. An
error is returned if a provided slug is already in use.

**add\_to\_nav**

Adds the new page to the main navigation. Optional, `1` or `0`.

**nav\_parent\_id**

The ID of the menu item to nest the new navigation entry under. Takes effect only when `add_to_nav` is
`1`. Optional, defaults to the main menu so the entry is added at the top level. Use
`/content/listNavMenus` to find the available menu IDs. An error is returned whenever the ID is supplied
and does not match an existing menu item, whether or not `add_to_nav` is set.

**hidden**

Hides the page from all views: search results, tiles, and explorer. Optional, `1` or `0`.

**hidden\_from\_search**

Hides the page from search results only. The page stays visible in tiles and the explorer. Optional, `1` or
`0`.

**keywords**

Comma-separated list of existing keyword IDs (see `/content/listKeywords`) to classify the page with.
Unknown IDs are ignored. Optional.

**restrict\_access**

Whether the page should be restricted to certain frontend groups, the same as turning on **Restrict Access**
in the page's settings. Optional, `1` or `0`. Any other value returns an error and no page is created. See
[Restricting a Page to Groups](https://docs.curator.interworks.com/site_content_design/pages/pages_overview.md#restricting-a-page-to-groups).

**groups**

Comma-separated list of frontend group names the page should be restricted to. Only applied when
`restrict_access` is `1` (or **Restrict Access is Always Enabled** is on); ignored otherwise. Names that do not
match an existing group are skipped and returned in `groups_not_found`. A restricted page with no matching
groups is visible to nobody, so check that key. Optional.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": "Successfully created page",
        "id": 42,
        "slug": "sales-report",
        "url": "https://curator.example.com/page/sales-report",
        "edit_url": "https://curator.example.com/backend/interworks/content/page/update/42",
        "file_id": 17,
        "groups_not_found": ["Regional Managers"]
    }
```

The `file_id` key is only present when the page was created from the `html` parameter. It can be passed to
`/content/updateFile` later to replace the page's HTML in place.

The `groups_not_found` key is only present when `groups` was provided and at least one name did not match an
existing frontend group. In the example above, no group named `Regional Managers` exists, so the page was
created without it.

## /content/deleteFile

deletes a file model by ID

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": 0
    }
```

## /content/listFiles

Lists file content types.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    [
        {
            "id": 1,
            "title": "HexTileAlt",
            "description": "",
            "slug": "hex-tile-alt",
            "restrict_group_access": 0,
            "created_at": "2017-09-12 16:11:10",
            "updated_at": "2017-09-12 16:11:10"
        },
        {
            "id": 2,
            "title": "Logo 196",
            "description": "",
            "slug": "logo-196",
            "restrict_group_access": 0,
            "created_at": "2017-12-15 17:15:07",
            "updated_at": "2017-12-15 17:15:07"
        }
    ]
```

## /content/listDashboards

Lists Tableau dashboard content types with associated keywords.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    [
        {
            "id": 1,
            "title": "Sales Dashboard",
            "description": "Dashboard showing sales metrics",
            "slug": "sales-dashboard",
            "url": "https://tableau.example.com/#/views/Sales/Dashboard",
            "server": "https://tableau.example.com",
            "site": "Default",
            "restrict_group_access": 0,
            "created_at": "2023-01-15 10:30:00",
            "updated_at": "2024-01-10 14:22:00",
            "keywords": [
                {
                    "id": 2,
                    "title": "Scorecard",
                    "created_at": "2023-08-15T10:24:49.000000Z",
                    "created_by": "admin (backend)",
                    "updated_at": "2023-08-21T07:53:26.000000Z",
                    "updated_by": "admin (backend)",
                    "favoritable": 1,
                    "pivot": {
                        "dashboard_id": 1,
                        "keyword_id": 2
                    }
                },
                {
                    "id": 4,
                    "title": "Pink Cards",
                    "created_at": "2023-08-23T07:28:05.000000Z",
                    "created_by": "admin (backend)",
                    "updated_at": "2023-08-23T07:28:05.000000Z",
                    "updated_by": "admin (backend)",
                    "favoritable": 1,
                    "pivot": {
                        "dashboard_id": 1,
                        "keyword_id": 4
                    }
                }
            ]
        },
        {
            "id": 2,
            "title": "Marketing Dashboard",
            "description": "",
            "slug": "marketing-dashboard",
            "url": "https://tableau.example.com/#/views/Marketing/Overview",
            "server": "https://tableau.example.com",
            "site": "Default",
            "restrict_group_access": 0,
            "created_at": "2023-02-20 09:15:00",
            "updated_at": "2023-12-05 11:45:00"
        }
    ]
```

## /content/listNavMenus

Lists nav menu links with associated keywords. The response is a flat array holding the menu item it starts from
followed by each of its visible descendants, so nesting is read from the `parent_id` of every entry.

**Parameters:**

**username**

The frontend username to check navigation permissions against. Optional. When omitted, permissions are evaluated as
an anonymous visitor, so a menu item restricted to a frontend group is left out of the response even though it
exists. Pass a username to list the navigation as that user sees it.

**menu\_id**

The ID of the menu item to start the listing from. Optional, defaults to the main menu, which returns the whole
navigation tree. Use it to enumerate the children of a submenu once its ID is known. IDs returned here can be passed
to `/content/createPage` as `nav_parent_id` to nest a new page under an existing submenu.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    [
        {
            "id": 1,
            "parent_id": null,
            "title": "Main Menu",
            "description": "The main menu items",
            "url": null,
            "enabled": 1,
            "parameters": null,
            "query_string": null,
            "is_external": 0,
            "link_target": "_self",
            "created_at": {
                "date": "2017-10-08 14:51:28.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "updated_at": {
                "date": "2018-03-08 19:41:42.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "link_type": "custom_url",
            "notice_id": null,
            "restrict_group_access": 0,
            "keywords": [
                {
                    "id": 2,
                    "title": "Scorecard",
                    "created_at": "2023-08-15T10:24:49.000000Z",
                    "created_by": "admin (backend)",
                    "updated_at": "2023-08-21T07:53:26.000000Z",
                    "updated_by": "admin (backend)",
                    "favoritable": 1,
                    "pivot": {
                        "menu_id": 1,
                        "keyword_id": 2
                    }
                },
                {
                    "id": 4,
                    "title": "Pink Cards",
                    "created_at": "2023-08-23T07:28:05.000000Z",
                    "created_by": "admin (backend)",
                    "updated_at": "2023-08-23T07:28:05.000000Z",
                    "updated_by": "admin (backend)",
                    "favoritable": 1,
                    "pivot": {
                        "menu_id": 1,
                        "keyword_id": 4
                    }
                }
            ]
        },
        {
            "id": 2,
            "parent_id": 1,
            "title": "Home",
            "description": "Website Home Page",
            "url": "home",
            "enabled": 1,
            "parameters": null,
            "query_string": null,
            "is_external": 0,
            "link_target": "_self",
            "created_at": {
                "date": "2017-10-08 14:51:28.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "updated_at": {
                "date": "2018-01-16 15:24:38.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "link_type": "custom_url",
            "notice_id": null,
            "restrict_group_access": 0,
            "keywords": []
        }
    ]
```

Every nav menu link includes a `keywords` array. Links with no keywords assigned return an empty array
rather than omitting the field.

## /content/updateFile

Updates a file model's details and can replace its attachment in place, keeping the same file ID, slug, and
links.

**Parameters:**
**id**

The ID of the file to update. Required.

**file**

A replacement file, sent as a multipart upload. Optional.

**file\_location**

A URL the Curator server should download a replacement file from. Optional.

**slug**, **title**, **description**

Updated values for the file's details. Optional.

**restrict\_access**, **groups**

Group restriction settings, matching `/content/createFile`. `groups` replaces the file's current groups.
Optional.

**hidden**, **hidden\_from\_search**, **favoritable**, **allow\_browser\_cache**, **download\_only**

File flags, matching `/content/createFile`. Optional, `1` or `0`.

**keywords**

Comma-separated list of existing keyword IDs (see `/content/listKeywords`). Replaces the file's current
keywords; pass an empty value to clear them. Optional.

**Returns:**

array

**Example Response:**

```JSON theme={null}
    {
        "result": "Success",
        "msg": "Successfully updated file",
        "id": 42
    }
```

When `groups` was provided and at least one name did not match an existing frontend group, the response also
includes a `groups_not_found` array listing those names. The file's groups are replaced with the matching names
only.


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