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

# Skayle CMS and Content API

> Use Skayle as your built-in headless CMS and retrieve content through the public JSON:API endpoint.

## What it is

Skayle CMS is Skayle's built-in headless CMS mode.

Use it when you want to:

* Manage content in Skayle
* Serve content through a REST API
* Build your frontend in your own framework

It is an alternative to external CMS connectors.

## How it differs from the Agent API

Skayle CMS uses two complementary interfaces:

* Your website retrieves content through the read-only
  `/v1/{organizationId}` **CMS Content API**.
* Authenticated AI clients and automations manage Skayle through the `/mcp` or
  `/v2` **Agent API**.

The CMS Content API does not create, edit, publish, delete, or configure
content. Use the Skayle application or [Agent API and MCP](/agent-api-mcp) for
those actions.

## Availability

Public CMS API is available only when your organization connector type is set to `Skayle CMS` (headless mode).

If your organization is connected to an external CMS, public `/v1/{organizationId}` endpoints return forbidden.

## Authentication

Current public CMS endpoints do not require a Bearer API key.

* No `Authorization: Bearer ...` header is required.
* Public API access is organization-scoped by URL.

### API key note

Bearer auth for public CMS endpoints is not currently implemented.

## Base URL

Use:

```bash theme={null}
https://api.skayle.ai/v1/{organizationId}
```

Find your organization ID in [Skayle Settings](https://app.skayle.ai/settings/organization). Look for the org ID next to **Company Info**.

## Available endpoints

| Resource         | Endpoints                                                                                        |
| ---------------- | ------------------------------------------------------------------------------------------------ |
| Collections      | `GET /collections`, `GET /collections/:collection-slug`                                          |
| Articles         | `GET /articles`, `GET /articles/:id-or-slug`                                                     |
| Posts alias      | `GET /posts`, `GET /posts/:id-or-slug`                                                           |
| Collection items | `GET /collections/:collection-slug/items`, `GET /collections/:collection-slug/items/:id-or-slug` |
| Categories       | `GET /categories`, `GET /categories/:id-or-slug`                                                 |
| Tags             | `GET /tags`, `GET /tags/:id-or-slug`                                                             |
| Authors          | `GET /authors`, `GET /authors/:id-or-slug` (`collection` selects a content collection)           |
| Media            | `GET /media`, `GET /media/:id`                                                                   |

## Query features

Common query patterns:

* Pagination: `page`, `per_page`
* Search: `search` (title, excerpt, content, slug, canonical URL, or external URL;
  a full URL also searches its final path segment)
* Sort: `orderby`, `order`
* Sparse fields: `_fields`

Articles/items also support:

* `status`, `categories`, `tags`, `authors`, `include`

Author endpoints accept `collection` as a preset or slug. The default is
`articles`; for example, `GET /authors?collection=guides`.

## Content model notes

* `articles` is the primary root content feed.
* `/posts` is kept for backward compatibility and returns the same resources as `/articles`.
* Additional enabled collections are discoverable via `/collections`.
* For non-article collections, use `/collections/:collection-slug/items`.
* Taxonomy endpoints are root-only (`/categories`, `/tags`, `/authors`) and apply to articles.
* Collection metadata includes `default_content_type` and `allowed_content_types`.
* Non-article collections are available on the `Authority` plan.

## Response format

Skayle CMS public API uses JSON:API conventions:

* `data`
* `included` (when requested)
* `meta`
* `links`

Errors are returned as JSON:API `errors[]`.

## Status behavior

* Public list endpoints default to `status=published`.
* `status=scheduled` is supported.
* Legacy scheduled records represented as `draft + publish_at` are surfaced as `scheduled` in API responses.

## Comparison post screenshots

For comparison posts, Skayle can embed competitor website screenshots directly into `content_html` (typically immediately below the competitor `H2` section heading).

The content item endpoints also return a structured `comparison_screenshots` attribute with capture metadata (section heading/slug, competitor name, source URL, screenshot URL, capture timestamp, and status) so headless frontends can render custom UI if needed.

## Not currently available

These public endpoints are not implemented:

* `GET /topics`

## Security best practices

Even without Bearer auth on current public endpoints, you should still:

* Keep organization IDs out of public client code when possible (proxy through your app server).
* Enforce your own rate limiting and caching at your frontend/backend edge.
* Return only fields you need with `_fields` to reduce data exposure.
* Treat draft/published access rules as part of your application-level policy.
