CMS (FHIR Legacy)

Create content

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/cms/{type}/{language}

Creates a content item of one type in one language. Use it to add a blog post, video, audio item or template to your project's content.

Auth: bearer token. Scope: the caller's project (from the token). The item is stored in that project.

Behaviour

  • type is one of blog, video, audio, template or export-template.
  • language must be one of the languages in your project's locale settings.
  • The item is stored as a FHIR Composition. Ovok sets key, date (now), author (your profile), type, language and the project. You cannot set them yourself.
  • key is built from the type and the title plus a random suffix. Use it to address the item in other routes and to link its translations across languages.
  • When you create an item in the project's default language, a background job creates an AI translation of it for every other project language. The translations appear later, not in this response.
  • The route is also served under /internal/cms/{type}.

Example

curl -X POST 'https://api.sandbox.ovok.com/cms/blog/en-US' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{    "title": "Sleeping well",    "category": "health",    "section": [      { "title": "Introduction", "text": "Why sleep matters.", "code": ["main-content"] }    ]  }'

Authorization

headerAuthorizationBearer <JWT>

Path Parameters

type*string
Value in"blog""video""audio""template""export-template"
language*string
Value in"Cy-az-AZ""Cy-sr-SP""Cy-uz-UZ""Lt-az-AZ""Lt-sr-SP""Lt-uz-UZ""aa""ab""ae""af""af-ZA""ak""am""an""ar""ar-AE""ar-BH""ar-DZ""ar-EG""ar-IQ""ar-JO""ar-KW""ar-LB""ar-LY""ar-MA""ar-OM""ar-QA""ar-SA""ar-SY""ar-TN""ar-YE""as""av""ay""az""ba""be""be-BY""bg""bg-BG""bh""bi""bm""bn""bo""br""bs""ca""ca-ES""ce""ch""co""cr""cs""cs-CZ""cu""cv""cy""da""da-DK""de""de-AT""de-CH""de-DE""de-LI""de-LU""div-MV""dv""dz""ee""el""el-GR""en""en-AU""en-BZ""en-CA""en-CB""en-GB""en-IE""en-JM""en-NZ""en-PH""en-TT""en-US""en-ZA""en-ZW""eo""es""es-AR""es-BO""es-CL""es-CO""es-CR""es-DO""es-EC""es-ES""es-GT""es-HN""es-MX""es-NI""es-PA""es-PE""es-PR""es-PY""es-SV""es-UY""es-VE""et""et-EE""eu""eu-ES""fa""fa-IR""ff""fi""fi-FI""fj""fo""fo-FO""fr""fr-BE""fr-CA""fr-CH""fr-FR""fr-LU""fr-MC""fy""ga""gd""gl""gl-ES""gn""gu""gu-IN""gv""ha""he""he-IL""hi""hi-IN""ho""hr""hr-HR""ht""hu""hu-HU""hy""hy-AM""hz""ia""id""id-ID""ie""ig""ii""ik""io""is""is-IS""it""it-CH""it-IT""iu""ja""ja-JP""jv""ka""ka-GE""kg""ki""kj""kk""kk-KZ""kl""km""kn""kn-IN""ko""ko-KR""kr""ks""ku""kv""kw""ky""ky-KZ""la""lb""lg""li""ln""lo""lt""lt-LT""lu""lv""lv-LV""mg""mh""mi""mk""mk-MK""ml""mn""mn-MN""mr""mr-IN""ms""ms-BN""ms-MY""mt""my""na""nb""nb-NO""nd""ne""ng""nl""nl-BE""nl-NL""nn""nn-NO""no""nr""nv""ny""oc""oj""om""or""os""pa""pa-IN""pi""pl""pl-PL""ps""pt""pt-BR""pt-PT""qu""rm""rn""ro""ro-RO""ru""ru-RU""rw""sa""sa-IN""sc""sd""se""sg""si""sk""sk-SK""sl""sl-SI""sm""sn""so""sq""sq-AL""sr""ss""st""su""sv""sv-FI""sv-SE""sw""sw-KE""ta""ta-IN""te""te-IN""tg""th""th-TH""ti""tk""tl""tn""to""tr""tr-TR""ts""tt""tt-RU""tw""ty""ug""uk""uk-UA""ur""ur-PK""uz""ve""vi""vi-VN""vo""wa""wo""xh""yi""yo""za""zh""zh-CHS""zh-CHT""zh-CN""zh-HK""zh-MO""zh-SG""zh-TW""zu"

Request Body

application/json
  1. body
title*string
category?array<string>
section?array<>
code?string

Response Body

The created content item, including its generated key.

application/json
  1. response
id?string
title*string
author*
key*string

A random UUID that is used to identify the content, not ID!

language*string
Value in"Cy-az-AZ""Cy-sr-SP""Cy-uz-UZ""Lt-az-AZ""Lt-sr-SP""Lt-uz-UZ""aa""ab""ae""af""af-ZA""ak""am""an""ar""ar-AE""ar-BH""ar-DZ""ar-EG""ar-IQ""ar-JO""ar-KW""ar-LB""ar-LY""ar-MA""ar-OM""ar-QA""ar-SA""ar-SY""ar-TN""ar-YE""as""av""ay""az""ba""be""be-BY""bg""bg-BG""bh""bi""bm""bn""bo""br""bs""ca""ca-ES""ce""ch""co""cr""cs""cs-CZ""cu""cv""cy""da""da-DK""de""de-AT""de-CH""de-DE""de-LI""de-LU""div-MV""dv""dz""ee""el""el-GR""en""en-AU""en-BZ""en-CA""en-CB""en-GB""en-IE""en-JM""en-NZ""en-PH""en-TT""en-US""en-ZA""en-ZW""eo""es""es-AR""es-BO""es-CL""es-CO""es-CR""es-DO""es-EC""es-ES""es-GT""es-HN""es-MX""es-NI""es-PA""es-PE""es-PR""es-PY""es-SV""es-UY""es-VE""et""et-EE""eu""eu-ES""fa""fa-IR""ff""fi""fi-FI""fj""fo""fo-FO""fr""fr-BE""fr-CA""fr-CH""fr-FR""fr-LU""fr-MC""fy""ga""gd""gl""gl-ES""gn""gu""gu-IN""gv""ha""he""he-IL""hi""hi-IN""ho""hr""hr-HR""ht""hu""hu-HU""hy""hy-AM""hz""ia""id""id-ID""ie""ig""ii""ik""io""is""is-IS""it""it-CH""it-IT""iu""ja""ja-JP""jv""ka""ka-GE""kg""ki""kj""kk""kk-KZ""kl""km""kn""kn-IN""ko""ko-KR""kr""ks""ku""kv""kw""ky""ky-KZ""la""lb""lg""li""ln""lo""lt""lt-LT""lu""lv""lv-LV""mg""mh""mi""mk""mk-MK""ml""mn""mn-MN""mr""mr-IN""ms""ms-BN""ms-MY""mt""my""na""nb""nb-NO""nd""ne""ng""nl""nl-BE""nl-NL""nn""nn-NO""no""nr""nv""ny""oc""oj""om""or""os""pa""pa-IN""pi""pl""pl-PL""ps""pt""pt-BR""pt-PT""qu""rm""rn""ro""ro-RO""ru""ru-RU""rw""sa""sa-IN""sc""sd""se""sg""si""sk""sk-SK""sl""sl-SI""sm""sn""so""sq""sq-AL""sr""ss""st""su""sv""sv-FI""sv-SE""sw""sw-KE""ta""ta-IN""te""te-IN""tg""th""th-TH""ti""tk""tl""tn""to""tr""tr-TR""ts""tt""tt-RU""tw""ty""ug""uk""uk-UA""ur""ur-PK""uz""ve""vi""vi-VN""vo""wa""wo""xh""yi""yo""za""zh""zh-CHS""zh-CHT""zh-CN""zh-HK""zh-MO""zh-SG""zh-TW""zu"
date*string
projectId?string
Formatuuid
type*string
Value in"blog""video""audio""template""export-template"
code?string
category?array<string>
section?array<>
Example Request
curl -X POST 'https://api.sandbox.ovok.com/cms/blog/Cy-az-AZ' \  -H 'Content-Type: application/json' \  -d '{  "title": "string"}'
Example Response
{  "id": "string",  "title": "string",  "author": {    "reference": "string",    "display": "string"  },  "key": "string",  "language": "Cy-az-AZ",  "date": "string",  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",  "type": "blog",  "code": "string",  "category": [    "string"  ],  "section": [    {      "title": "string",      "text": "string",      "extension": {        "property1": "string",        "property2": "string"      },      "code": [        "string"      ]    }  ]}

List content GET

Lists content items of one type in one language, with optional fuzzy search and paging. **Auth:** bearer token. **Scope:** the caller's project (from the token). Only items in that project are listed. ## Behaviour - `type` is one of `blog`, `video`, `audio`, `template` or `export-template`. - `language` must be one of the languages in your project's locale settings. - Items are sorted by `date`, newest first. - `search` is a fuzzy match over title, author name, category, section titles and text, and key. - `code` keeps only items with that content code. - `_count` defaults to `10` and `_offset` to `0`. `total` is the number of matching items before paging. - At most 10,000 items per type and language are considered. - The route is also served under `/internal/cms/{type}`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/cms/blog/en-US?search=sleep&_count=20&_offset=0' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```

List content GET

Lists content items of one type in one language, with optional fuzzy search and paging. **Auth:** bearer token. **Scope:** the caller's project (from the token). Only items in that project are listed. ## Behaviour - `type` is one of `blog`, `video`, `audio`, `template` or `export-template`. - `language` must be one of the languages in your project's locale settings. - Items are sorted by `date`, newest first. - `search` is a fuzzy match over title, author name, category, section titles and text, and key. - `code` keeps only items with that content code. - `_count` defaults to `10` and `_offset` to `0`. `total` is the number of matching items before paging. - At most 10,000 items per type and language are considered. - The route is also served under `/internal/cms/{type}`. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/cms/blog/en-US?search=sleep&_count=20&_offset=0' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```