willo_content_publish
Change what the LIVE site shows for one CMS item (item_id) or up to 100 (item_ids, one job, one approval): publish (optionally at publish_at)…
- Act
- Needs approval
- Metered
On this page
Publish, unpublish or delete CMS content. Change what the LIVE site shows for one CMS item (item_id) or up to 100 (item_ids, one job, one approval): publish (optionally at publish_at), unpublish or delete. An unpublished or deleted item's address redirects to the collection's index page, or to redirect_to, once the change is live; the result says exactly what the address does. With draft mode on, a publish still goes live by itself and the rest of the draft stays staged, unless the draft holds its own change to the item's file (then it waits for the next site Publish). ALWAYS needs a person's approval (pending_approval + link; call again after). No undo card.
Access
- Token: read + act, and editor access or higher on the business.
- Approval: Always. Every call raises a card a person approves on the dashboard.
- Metered: counts toward a per-business, per-minute limit for this kind of call. See Limits.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string (publish or unpublish or delete) | yes | What to do. |
item_id | integer ≥ 1 | no | The item, from willo_content. Send this or item_ids. |
item_ids | integer[] | no | A batch instead of item_id: up to 100 items of one collection, done in ONE job under ONE approval card (the card lists the first ten with their addresses, the rest behind "Show all", and what happens at their addresses). Every item is checked before any card: if one can't go (fields to fix, a conflicting site edit, not published, used by other content), nothing changes and the call returns batch_blocked with each item's reason. |
skip_invalid | boolean | no | With item_ids: act on the items that pass and leave the rest as they are. The card then says, for example, "Publish 37 of 40" and names the 3 left out, and the approval covers exactly those 37. |
publish_at | string | no | publish only: ISO time to schedule it instead of now. |
redirect_to | string | no | unpublish/delete only: a path on this site the item's old address should send visitors to, e.g. /blog/new-post. Default: the collection's index page. |
collection | string | no | Collection name (default blog). |