> ## 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.

# API Introduction

> Use the Skayle CMS Content API to retrieve collections, articles, taxonomies, authors, and media for websites and applications through JSON:API endpoints.

## This is the CMS Content API

The `/v1` API is the read-only content delivery interface for websites using
Skayle CMS. It is different from the authenticated [Agent API and
MCP](/agent-api-mcp), which use `/v2` and `/mcp` to create, update, publish, and
otherwise operate Skayle.

[Compare the two APIs →](/api-reference/overview)

## Base URL

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

## Availability

Public API is available only when the organization connector mode is `Skayle CMS` (headless mode).

If an organization is connected to another CMS, requests return `403 Forbidden`.

## Authentication

Current public `/v1/{organizationId}` endpoints do not require Bearer API keys.
Bearer auth for public CMS endpoints is not currently implemented.

## Resource model

* `collections` define enabled content spaces for your org.
* Root `articles` endpoints target the built-in `articles` collection.
* Collection-specific items are exposed under `/collections/:collectionSlug/items`.
* `/posts` remains a backward-compatible alias for root article endpoints.
* Non-article collections are available on the `Authority` plan.

## Implemented resources

* `GET /collections`
* `GET /collections/:collection-slug`
* `GET /articles`
* `GET /articles/:id-or-slug`
* `GET /posts` (alias of `/articles`)
* `GET /posts/:id-or-slug` (alias of `/articles/:id-or-slug`)
* `GET /collections/:collection-slug/items`
* `GET /collections/:collection-slug/items/:id-or-slug`
* `GET /categories`
* `GET /categories/:id-or-slug`
* `GET /tags`
* `GET /tags/:id-or-slug`
* `GET /authors`
* `GET /authors/:id-or-slug`

Author endpoints default to the `articles` collection and accept
`?collection=<preset-or-slug>` for non-article collections.

* `GET /media`
* `GET /media/:id`

## Not implemented

These public endpoints are not currently available:

* `GET /topics`

## Response format

Skayle CMS uses JSON:API style responses:

```json theme={null}
{
  "data": [],
  "included": [],
  "meta": { "total": 0, "per_page": 10, "page": 1 },
  "links": {
    "self": "...",
    "first": "...",
    "last": "...",
    "prev": null,
    "next": null
  }
}
```

## Error format

Errors are returned in JSON:API `errors[]` format:

```json theme={null}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Resource not found"
    }
  ]
}
```

## Query parameters

Common parameters for articles, taxonomies, and media list endpoints:

| Parameter  | Type    | Description                                                                                             |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `page`     | integer | Page number (default `1`)                                                                               |
| `per_page` | integer | Page size, max `100` (default `10`)                                                                     |
| `offset`   | integer | Zero-based item offset; overrides the offset derived from `page`                                        |
| `search`   | string  | Search term; article/item search matches title, excerpt, content, slug, canonical URL, and external URL |
| `orderby`  | string  | Sort field (`date`, `created_at`, `updated_at`, `title`, `name`, `slug`, `id`)                          |
| `order`    | string  | Sort direction (`asc`, `desc`)                                                                          |
| `_fields`  | string  | Comma-separated attribute field filter                                                                  |

`GET /collections` does not currently use pagination/sort/search query parameters.

Articles/items endpoints additionally support:

| Parameter    | Type   | Description                                                      |
| ------------ | ------ | ---------------------------------------------------------------- |
| `status`     | string | Status filter (`published` default, `draft`, `scheduled`, `all`) |
| `categories` | string | Comma-separated category IDs                                     |
| `tags`       | string | Comma-separated tag IDs                                          |
| `authors`    | string | Comma-separated author IDs                                       |
| `include`    | string | Include related resources (`categories`, `tags`, `authors`)      |

Article and collection-item list endpoints also accept `publish_at` as an
`orderby` value. When `offset` is provided, pagination links use offset-based
navigation and response metadata includes the applied `offset`.

For article/item search, you may provide a bare slug or a full article URL.
Skayle also searches the decoded final URL path segment, so a URL can match a
stored slug even when the article title is different.

## Status behavior

* List endpoints default to `status=published` when omitted.
* `status=scheduled` returns posts explicitly marked `scheduled` and legacy scheduled rows represented as `draft + publish_at`.
* `status=draft` excludes legacy scheduled rows (drafts with `publish_at` set).

## Taxonomy scope notes

* Categories and tags are scoped to the built-in `articles` collection.
* Authors default to `articles`; pass `collection` to scope author endpoints to another enabled collection.
* Nested collection-specific taxonomy endpoints are not part of the public API.
