Skip to main content
TypeScript-first, with no runtime dependencies. Works in Node.js 18+ and in any browser that supports fetch.
This is the most complete SDK: it is generated from the OpenAPI spec, so it covers every public operation, including AI conversation, meta and tags.

Install

Initialize

The base URL is fixed to the production endpoint, so there is no baseUrl option. The key is sent as the x-api-key header on every request. There is no header hook, by design.

Make a request

Every method takes a path, then an options object with query, body and signal. Filters go in under query:
Single-resource and search operations use the same shape:
data is typed from the spec, so a field that can be a string or a map is a union you narrow before use — a field keyed by language code is a record:

Write operations

Only mainTitle, content and category are required to create; author defaults to the authenticated user. update takes the whole document in its body, so id is a field of that body rather than a separate argument.

Error handling

By default an error comes back as a result, not an exception:
Opt in to throwing a typed ApiError to get the unparsed body and the response headers, which is where retry-after lives:
In an async call, throwOnError rejects the returned promise rather than throwing synchronously — wrap the call in try/catch or .catch().

Timeouts and cancellation

For a per-request deadline, pass an AbortSignal in the same options object:

Escaping the resource wrapper

cms.raw is the underlying HTTP client — use it for an operation that has not been added to a resource yet, or to send a request shape the wrapper does not cover. It takes the same options object:

Resources

article, author, category, subcategory, form, formSubmission, language, tag, report, ai, aiConversation, raw.

All operations

Browse the API reference for the full endpoint list.