# Get an item by slug

Canonical page: https://docs.ovok.com/cms/get-collection-item

Returns one published document of a collection, found by its slug. If your tenant has no such document, Ovok's shared tenant is tried.

| Method | Path |
| --- | --- |
| `GET` | `/v1/public/cms/collections/:collection/items/:slug` |

## Who can call it [#who-can-call-it]

The same as [listing a collection](/cms/list-collection-items#who-can-call-it): an open collection needs only a tenant; any other needs a CMS API key or a signed-in user of the tenant.

## Request [#request]

```bash
curl --get 'https://api.sandbox.ovok.com/v1/public/cms/collections/legal-pages/items/terms-and-conditions' \
  --data-urlencode 'tenant=big-health-company' \
  --data-urlencode 'locale=de'
```

| Part | Description |
| --- | --- |
| `:collection` | The collection's slug, case-sensitive. |
| `:slug` | The document's slug. Lower-case letters, digits, `-`, `_` and `.`; it starts with a letter or digit; up to 128 characters. |
| `tenant`, `projectId`, `locale`, `apiKey` | As for [listing a collection](/cms/list-collection-items#request). There is no `page`, `limit` or `sort`. |

## Response [#response]

The answer is the **document itself**, not a list:

```json
{
  "id": 3,
  "slug": "terms-and-conditions",
  "title": "Allgemeine Geschäftsbedingungen",
  "body": { "root": { "type": "root", "children": [] } },
  "effectiveAt": "2026-09-01T00:00:00.000Z",
  "status": "published"
}
```

The fields are those of the collection; see [the list of fields](/cms/list-collection-items#response).

## How the document is found [#how-the-document-is-found]

1. Your tenant is asked for a published document with that slug.
2. If it has none, the shared tenant is asked. The shared document is returned without its `tenant` field.
3. If neither has it, the answer is `404`.

There is no lookup by id.

## What can go wrong [#what-can-go-wrong]

The errors in [the overview](/cms#errors) apply, with these specifics:

| Status | Cause |
| --- | --- |
| `404` `Not found` | The slug does not exist, is a draft, or is malformed. All three look the same. Also a collection that is not served. |
| The CMS's own status | Your own read failed. A failure on your side never falls back to the shared document. |

The checks run in this order: authentication, the collection, the slug, `locale`, the tenant, then the read. A malformed slug is therefore `404` before any tenant is looked up.

## Gotchas [#gotchas]

- **A bad slug is `404`, not `400`.** `Terms`, `-terms` and a slug of 129 characters all answer `404`.
- **A draft and a missing document are indistinguishable**, by design.
- **A failing read of the shared tenant is an error**, not a `404`. When your tenant has no such document and the shared read fails, you see the failure.
- **Publishing `terms-and-conditions` has a side effect.** When the `legal-pages` document with that slug is published, the users of your project are asked to accept the terms again at their next sign-in. Drafts do not.
- **The slug is part of the cache key.** An edit shows up within about a minute; see [caching](/cms#caching).

## Related [#related]

- [List the items of a collection](/cms/list-collection-items)
- [CMS](/cms)
