FeaturesAPIs & Automation

Every collection you model is an API the moment you save it

Read and write objects, patch a single property, upload a file, export a report, or fetch a schema — over ordinary JSON HTTP, with no separate API layer to build.

Standard Included in Standard and Pro

A JSON response for the cold-brew-at-home blog post: title, author, summary, HTML content, categories, tags and the image's alt and metadata.
A JSON response for the cold-brew-at-home blog post: title, author, summary, HTML content, categories, tags and the image's alt and metadata.

Total CMS exposes a REST API at your site's /api root, and below the object level it is more useful than most CMS APIs.

Who can call it

  • Same origin, every edition. The admin's own JavaScript or a browser tool on the same domain uses the session cookie.
  • External access is Pro. API keys are Pro, and so is the external REST API gate, so a headless front end, mobile app or third-party integration calling in from another host needs a Pro license.
  • Scoped keys. A key carries allowed HTTP methods and allowed path prefixes, so it can be GET-only on /api/collections/blog and nothing else. Keys are shown once, track their own last-used timestamp, and are revoked by deleting them.
  • Keys bypass access groups. An API key reaches exactly as far as its scope, whereas an OAuth Bearer token is checked against the approving user's access groups on every request.

Collections and objects

  • The usual verbs. GET /api/collections lists collections; GET /api/collections/{collection} returns objects with limit, offset, sort, order, filter and search. POST creates, PUT replaces, PATCH merges, DELETE removes.
  • Clone, HEAD, schema. There is a clone endpoint, HEAD requests answer “does this exist” without a body, and GET /api/collections/{collection}/schema lets a client discover the fields instead of hard-coding them.
  • Reading in bulk. A query endpoint with pagination metadata and include/exclude field selection returns JSON, CSV or HTML. Report endpoints export a chosen set of fields as a CSV or JSON download, expanding deck fields into one row per item.

Below the object level

  • One property, not the object. PUT, PATCH or DELETE a single property without sending the whole object, or increment or decrement a numeric one atomically: a view counter is one POST.
  • One image, one deck item. Edit the metadata on one gallery image, and add, update or remove individual deck items.
  • Uploads. File properties have their own endpoints for direct multipart uploads, Dropzone-style chunked uploads, and URL uploads where you POST a link and the server fetches it.

In practice

What it looks like on the command line

shell
# Read a collection
curl -H "X-API-Key: tcms_1234567890abcdef1234567890abcdef" \
     https://yoursite.com/api/collections/blog

# Publish one post without sending the rest of it
curl -X PATCH https://yoursite.com/api/collections/blog/my-first-post \
  -H "X-API-Key: tcms_1234567890abcdef1234567890abcdef" \
  -H "Content-Type: application/json" \
  -d '{"status": "published"}'

# Bump a view counter atomically
curl -X POST https://yoursite.com/api/collections/blog/my-first-post/views/increment

Keys travel in the X-API-Key or Authorization: Bearer header only — there is no query-parameter authentication.

At a glance

What you get

CRUD on every collection
List, read, create, replace, merge, clone and delete objects, with filtering, search, sorting and offset pagination on the read side.
Write one property, not the object
PUT, PATCH or DELETE a single property, atomically increment a counter, or edit one deck item — without round-tripping the whole record.
Uploads that match the admin
The same endpoints the admin uses behind every image, file, gallery and depot field: multipart, chunked, or POST a URL and let the server fetch it.
Scoped API keys
Each key allows a set of HTTP methods and a set of path prefixes. Prefix matching means /api/collections/blog covers every object under it — no wildcards to write. API keys are a Pro feature.
Reports and exports built in
Query with include/exclude field selection in JSON, CSV or HTML, or hit the report endpoints for a CSV or JSON download of exactly the fields you name.

REST API

Common questions

Which parts of the API need Pro?

API keys and external REST access are Pro features. Session-authenticated same-origin requests — the admin, and browser code on your own domain — work in every edition. If an external service, mobile app or headless front end will call the API, that is Pro.

How do I limit what a key can reach?

A key carries allowed HTTP methods and allowed path prefixes, and both must match for a request to be authorised. Matching is by prefix, so /api/collections/blog already covers /api/collections/blog/123 — no trailing wildcard is needed or wanted.

Do API keys respect access groups?

No — an API key bypasses access-group checks entirely and reaches as far as its configured scope, whoever created it. OAuth Bearer tokens behave differently: they are checked against the approving user's access groups on every request. Scope an API key tightly.

Can I upload files through the API?

Yes. Image, file, gallery and depot properties have upload endpoints that accept a direct multipart upload, a chunked Dropzone-style upload, or a JSON body containing a URL for the server to download. The response is the updated object, so you see the new file in context.

Try it on a site of your own.

45 days, every Pro feature, no credit card. Build it, hand it to a client, and see what they can and can’t touch.