Using CMS AI Agent with Strapi
Everything you need for Strapi, in the order you will actually do it. If you are stuck, the last section has the real error messages and what each one means.
Switch these on first
- An API token, which is not your password. In Strapi go to Settings → API Tokens and create one. "Full access" is the simplest choice; "Custom" works too, and the next point is the care it needs. Copy the token the moment it appears — Strapi shows it once and never again.
- The right boxes ticked, if you chose a Custom token. Strapi's permissions are per collection and per action: find and findOne to read a collection, create and update to write it, and under Upload, find, findOne and upload for your images. This matters more on Strapi than on any other platform here, because a box you forget does not announce itself — it simply makes that part of your own site invisible to us.
- Draft & Publish switched on for the collection you want managed, in the Content-Type Builder under its Advanced settings. It is on by default. With it off, that collection has no such thing as a draft: everything saved into it is live immediately — so CMS AI Agent refuses to write there rather than publishing something on your behalf.
- At least one entry in that collection, which sounds like an odd thing to ask. CMS AI Agent works out whether you run Strapi 4 or Strapi 5 from the shape of a record, and the two keep a new entry as a draft in different ways — so until there is one record to look at, it will read your site but will not create anything. One entry is enough, and an empty draft counts.
Connecting your website
- In CMS AI Agent, add your website by the address of Strapi itself — not the website Strapi feeds. Those are usually two different addresses: if Strapi is at cms.example.com and your site is example.com, it is the first one we need.
- We ask the site for /api and tell you what came back: that it is Strapi, and that its API is answering.
- Paste the API token. There is no username — Strapi does not use one — so that field is not shown.
- We check the token straight away and tell you three things there and then: that it works, whether it can reach your Media Library, and which line of Strapi this looks like. Anything switched off is said here rather than left for you to discover the first time an assistant tries to use it.
- Choose which collection holds your articles, and which of its fields is the title. Strapi will not tell us — the collections are your design, not the platform's — so this is the one step a WordPress customer does not have. Whatever you type is checked against the site before it is saved, so a typo is caught here.
What you can ask for on Strapi
-
Read content
Looking at what is already on the website: the list of pages and posts, who wrote each one, when it last changed, whether it is published, and the full text of any one of them.
"Which pages have not been touched in over a year?"
-
Create content
Adding something that was not there before: a new page, a new post, a new entry of whatever kind your website uses. It arrives as a draft, with a title, the body text and a short summary, ready for you to read before anyone else can.
"Add a page about our new opening hours and leave it as a draft."
-
Edit content
Changing something that is already there: the title, the body text, the summary. You are told exactly which items were touched, and your website keeps its own history of what they said before.
"Change the phone number on the Contact page to the new one."
-
Publish content
Moving something between draft, published and private. This is the step that decides whether the public can see a page, which is why it is a thing you ask for on purpose rather than something that happens on the way past.
"Publish the draft about the Saturday market."
-
Manage images and files
Putting images and files onto the website and filling in the text that belongs with them: the title, the caption, and the alt text that a screen reader speaks and a search engine reads in place of the picture.
"Put last week's photos into the gallery and write alt text for each one."
-
Custom content types
Few websites hold only pages and posts. A property site has properties, a restaurant has dishes, a school has courses. This is working with those, in their own fields, instead of forcing everything to be a blog post.
"Add a new dish to the menu: the name, the description and the price."
-
Site information
The plain facts about the website: what it is called, what software and which version it runs, how many pages and posts it holds, which languages it is written in, and when it last changed.
"How many pages does my website have, and when was each one last updated?"
What it will not do on Strapi
Strapi has no way to do this, so this agent does not offer it. What it would have meant:
-
Schedule content
Setting a date and a time in the future for something to appear, so a post written on a Tuesday afternoon goes live on Monday morning with nobody at a keyboard.
-
Manage categories and tags
Organising content so people can find it: which category a post sits in, which tags it carries, and creating a new category or tag where there is a real need for one.
-
Edit SEO information
The text that does not appear on the page but decides how the page looks in a search result and when somebody shares it: the SEO title, the description under it, and the alt text on images.
-
Manage menus
The menus a visitor clicks: adding an item, renaming one, putting them in a different order, moving one underneath another.
-
Bulk changes
The same change across many items at once. Nothing happens straight away: you are shown the whole list first, with the value as it is now beside the value proposed for it, and it runs only after you have said yes. It can be stopped partway and it can be undone.
-
Manage redirects
Sending an old address to a new one, so a link somebody saved or a result still sitting in Google lands on the right page instead of an error. It can also list everything that is already being sent somewhere else.
-
Administrative information
What is installed, what has an update waiting, and who has an account on the website. Reads only: it cannot install, update, activate or remove a plugin or theme, change a setting, or add or change a user.
Worth knowing about Strapi
- Strapi has no website of its own, and that explains most of what is missing. It is what people call a headless CMS, which only means that Strapi keeps your content and something else shows it to visitors. No menus, no redirects, no sitemap, no SEO fields, no addresses for your pages: all of that belongs to the front end you or your developer built on top of Strapi, which CMS AI Agent never sees. So those are refused with the reason, rather than reported as a site with everything wrong with it.
- An empty answer is never reported to you as an empty site. If a permission is not ticked, Strapi refuses us and we pass that on, naming the box to tick. We would far rather tell you we cannot see something than tell you it is not there — on Strapi those two are easy to confuse, and only one of them is ever worth acting on.
- We cannot list your collections, and that is not a permission you can grant. The screen that lists them is the administrator's, and Strapi refuses a content token there on purpose. If you switch on Strapi's own OpenAPI description — the `openapi` setting in config/server — we can read it and list them all. Otherwise we work with the one you named and say plainly that your site probably has more.
- Editing is safer on Strapi 5 than on Strapi 4. Strapi 5 keeps a draft and a published version of every entry, so an edit changes the draft and your visitors keep seeing the published text until you publish again. Strapi 4 keeps one copy, so editing something published changes your live site at once. CMS AI Agent tells you which of the two just happened, every time.
- Taking something back off the site works on Strapi 4 only. Strapi 5's API can publish and has no way to unpublish — the one Strapi has is for code running inside Strapi itself. So on Strapi 5 this stays a two-click job in your own Content Manager, and CMS AI Agent says so instead of pretending it worked.
When something goes wrong
The failures people actually meet, with the exact words CMS AI Agent will show you. The message is in English wherever you are, because that is what the software says.
We cannot find a Strapi API at the address you gave.
What you will see
What to do
Nine times in ten this is the wrong address: the website Strapi feeds rather than Strapi itself. Strapi usually lives somewhere like cms.example.com or api.example.com, or on its own port while you are developing. Open your Strapi admin panel and use the part of that address before /admin. If it is the right address, check that Strapi is running and that /api is not blocked in front of it.
The token is refused, and you are sure you copied it correctly.
What you will see
What to do
Two things to check, and the second is the one people forget. First, Strapi shows a token once — if it was copied from a screenshot or retyped, one character is easily lost. Second, a Strapi token can be given a lifetime when it is created, and an expired token is refused exactly like a wrong one. Make a fresh token under Settings → API Tokens, set its duration to Unlimited unless you have a reason not to, and reconnect.
The token works, but one collection or your Media Library cannot be reached — or content you know is there seems to be missing.
What you will see
What to do
This is the commonest problem on Strapi by a wide margin, and it is worth understanding rather than just fixing. Strapi's permissions are set per collection and per action on each token, so a token can read one collection perfectly and be refused on the next — and nothing in Strapi warns you. Go to Settings → API Tokens, open the token you gave us, and look at the collection in question: find and findOne let us read it, create and update let us write it, and under Upload, find, findOne and upload cover your images. Changing the token's type to Full access ticks everything at once, which is the quick answer if you are not sure which box you are missing. CMS AI Agent will never show you a half-empty list and call it your site: when a permission is missing we say so, and we say which box.
We say Strapi has no collection by that name, and you can see it in your admin panel.
What you will see
What to do
This is the twin of the permissions problem above, and they are worth telling apart — Strapi answers them differently and CMS AI Agent passes that difference on, so the message you got is the one to trust. "No collection by that name" means Strapi has no route for it at all, which is almost always the plural API name being different from the display name: a collection shown as "Journal Entry" is reached as journal-entries. Look at the address bar of your Strapi admin while you are viewing the collection and use the name you see there. If it looks right, check the collection was not renamed after this website was set up — renaming it in Strapi does not update what we were told.
Reading works, and anything that would create or change something is refused for not knowing your Strapi version.
What you will see
What to do
Strapi 4 and Strapi 5 keep a new entry as a draft in two different ways, and sending Strapi 5's way to a Strapi 4 publishes it on your live site instead. CMS AI Agent works the version out from the shape of a record and will not guess — so a collection with nothing in it leaves it with nothing to look at. Add one entry in Strapi, a draft is fine, and this stops happening. You can delete it afterwards once something else has been created.
We refuse to create a draft in a collection that is empty.
What you will see
What to do
Same remedy as above, for a related reason. A Strapi collection can have Draft & Publish switched off, and in one of those there is no draft to make — everything saved into it appears on your site immediately. With nothing in the collection yet, CMS AI Agent cannot tell which kind it is, and it will not write hopefully. Add one entry in Strapi and it will know. If the refusal says Draft & Publish is switched off, that is a different answer: switch it on for that collection in the Content-Type Builder, under its Advanced settings.
Publishing works and taking something back off the site is refused.
What you will see
What to do
You are on Strapi 5, and this is not something that can be fixed with a setting. Strapi 5's REST API has a way to publish a document and no way to unpublish one — what Strapi has is a method for code running inside Strapi, not a route anything outside can call. So the two clicks stay yours: open the entry in the Content Manager and press Unpublish. On a Strapi 4 site CMS AI Agent can do it for you, because there `publishedAt` is an ordinary field it can clear.
The address works in a browser but turns us away, often with "Not Acceptable" or a page from Cloudflare.
What you will see
What to do
Something in front of Strapi answered instead of Strapi: a proxy, a CDN, or the host's firewall. "Not Acceptable" is usually ModSecurity on shared hosting. Nothing is wrong with your token or your content. Ask whoever runs that layer to allow requests to /api/, or add an exception for it.