# ovok.content

Canonical page: https://docs.ovok.com/web-sdk/core/namespaces/content

The older managed-content routes under `cms`: items grouped by type and language, with a `key` for each item. Use it to read and edit content. For published delivery to apps, prefer [ovok.cms](/web-sdk/core/namespaces/cms).

## Search and read items [#search-and-read-items]

```ts
const found = await ovok.content.search('blog', 'en');
const item = await ovok.content.retrieve('blog', 'en', 'welcome');
```

- `type` is a content type such as `blog`, `video`, `audio`, `template` or `export-template`.
- `search` takes an optional query as its third argument. It returns the server's search envelope, not a `PagePromise`.
- Calls `GET cms/{type}/{language}` and `GET cms/{type}/{language}/{key}`.

## Create, replace and delete [#create-replace-and-delete]

```ts
await ovok.content.create('blog', 'en', body);
await ovok.content.update('blog', 'en', 'welcome', body);
await ovok.content.delete('blog', 'en', 'welcome');
```

- `update` is a full replace (`PUT`). `body` has the same shape for create and update.

## Pair translations [#pair-translations]

```ts
const pairs = await ovok.content.map('blog', 'de');
```

- Pairs each default-language item with its translation in the given language.

## Copy from the parent project [#copy-from-the-parent-project]

```ts
await ovok.content.copyFromParent('blog', 'en', 'welcome');
await ovok.content.copyAllFromParent('blog', 'en');
```

- Both resolve to `{ success }`. They only make sense for a child project.

## Reference [#reference]

- [content API reference](/web-sdk/core/reference/core/content): every method and type.
- [ovok.cms](/web-sdk/core/namespaces/cms)
- [Errors and retries](/web-sdk/core/errors-and-retries)
