• AI reference · Area online

page_edit

Change a page's words or photos. Change a website page's words or photos by hand, as the owner's Change words screen does. read: true (with page) gives the page's editable words (each by its field) and photo places; without page, the pages that can be changed. A change (edits: { field: words }, photos: { place: media library id }) makes a new private preview of the site, on the task you hold (number), and asks the owner's yes to put it live (a site_publish card). A photo keeps its place's alt words.

Where it is

In the online area (your website: pages, forms, sign-ups, the member area, selling, classes and calls, going live; its look; payment links; course progress; giving or taking away member access): open it with tools_for { area: "online" }, then call it with use_tool { name: "page_edit", args }.

Does it need a yes?

Depends on what it changes: the everyday part runs at once, anything that reaches people or core files waits for the owner's yes. Here: a page's words or photos by hand: a private preview is busywork; going live is a site_publish yes.

Inputs

InputTypeNeededAbout
pagestringnoThe page: index (the home page) or its folder, like about. · up to 120 characters
readbooleannotrue: only read the page's words and photo places (or, without page, the pages).
editsobjectnoEach field (from read) and its new words.
photosobjectnoEach photo place (from read) and the media library id of its new picture.
numberintegernoThe task you hold: needed for a change, not for read. · 1 or more
run_idstringyesThe run_id from start. Pass it on every call: it keeps your task held. · 1 to 100 characters

Example

{
  "name": "page_edit",
  "arguments": {
    "run_id": "the run_id from start"
  }
}

When it is refused

  • invalid: The input isn't right. The sentence names the field and the fix; nothing was done. Fix it and call again.
  • not_found: No such thing in this company (a task, file, person, record). Check the number or name, or list first.
  • not_allowed: Not without another step: the owner's yes, your own task held with pick_up, or a setting the owner turns on. The sentence says which.
  • taken: Someone else holds it (another AI on that task). Pick another task.
  • stale: It changed since you read it. Read it again and use the new version.
  • failed: On our side or a service's, never your input. Try again in a minute; if it keeps failing, call report_problem.