Install
Initialize
x-api-key header on every request. There is no header option,
by design.
Make a request
Every method returns anEnvelope with success, statusCode, message and data.
Filters go in as the second argument:
data is the endpoint’s generated model, so fields are properties rather than array
keys. A single entity arrives under a key of its own:
MultilingualString, readable by array
access or as a property:
The runtime return type is the shared
Envelope; the payload model is named in the
@phpstan-return annotation on each method, so static analysis still knows what
data holds.Write operations
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. The delete method is named deleteId
because delete is a reserved word in PHP.
Error handling
Errors are return values, not exceptions, unless you opt in. A failed call still comes back as anEnvelope with success false:
ApiError instead, which carries the unparsed body:
Timeouts
Escaping the resource wrapper
$cms->raw is the underlying client, for calling endpoints the resources do not cover.
Its request method takes the method, the path, and an options array; it sends only
x-api-key, so there is no header to set by hand:
Method names follow the route segments as generated, including the ones that read as
verbs and methods together —
idReactionPOST, commentsGetAll. The API reference
lists every operation under its route.Resources
article, author, category, subcategory, form, formSubmission, language,
tag, report, ai, aiConversation, raw.
All operations
Browse the API reference for the full endpoint list.

