POST https://app.goosybear.ai/api/v1/tools/{tool}. Archive, asset, and
preview-link operations use the Pages-specific REST endpoints shown below.
Use a key narrowed to the workspace that owns the site for this whole flow.
Ingest, asset uploads, and preview-link management refuse account-wide keys
instead of choosing a workspace. The key holder also needs Use the API and
MCP and the relevant live Pages permission.
These examples describe request contracts. Deployment and account exposure
are separate: an environment may still refuse a tool while its rollout or
exposure switch is closed. Hosted sites use a separate policy, grant, and
credential flow for AI and retrieval operations; see Managed capabilities
for Pages.
Read a site
Callpage.read before replacing, previewing, or publishing a site. It returns
the newest built revision separately from the currently published revision.
It also returns the site’s canonical board_id; use that identifier for board
and Data operations instead of matching a board by its display title.
Import or replace a site archive
POST https://app.goosybear.ai/api/pages/ingest accepts
multipart/form-data. Send exactly one ZIP archive as file. name and
siteId are optional text fields:
- Omit
siteIdto create a site.namesupplies its display name. - Send
siteIdto replace the managed source or staged bundle on that same workspace-scoped site.nameis ignored in this case.
kind: "bundle" plus revision. A supported
source project is stored and queued for the Pages build rail; it returns
kind: "source" plus buildRunId:
report shape describes what the importer detected and accepted.
Always read it. Server routes, unsupported dependencies, unsafe paths, or an
invalid bundle can produce a typed refusal rather than a partial deployment.
Follow a source build
Use thebuildRunId from a source ingest as build_run_id. The site and run
must belong together inside the key’s resolved workspace.
status is pending, running, retrying, succeeded, or failed.
Immediately after enqueue, pending can mean the durable build record has not
appeared yet. Poll with normal backoff until the call returns a terminal state.
A successful build returns its revision.
Upload a reference image
POST https://app.goosybear.ai/api/pages/{siteId}/assets stores one image and
attaches it to the site’s own board. The multipart body accepts exactly one
field named file; a caller cannot supply a different board id.
pages.manage.
Create a preview link
POST https://app.goosybear.ai/api/pages/{siteId}/preview-links creates a
link for the site’s current previewable revision. ttlMinutes is optional; the
default is 10,080 minutes (seven days), and accepted values are whole minutes
from 5 through 43,200.
no-store and no-referrer. Customers do
not need Cloudflare credentials; the service owns the preview route.
Creating a preview does not publish the site or attach a custom domain. A draft
remains a draft.
Revoke a preview link
DELETE https://app.goosybear.ai/api/pages/{siteId}/preview-links takes the
43-character preview token in a strict JSON body. Keep it out of a query
string.
Publish one exact revision
page.publish always takes two calls. The first call reads the site’s latest
built revision and returns a short-lived confirmation without publishing:
confirmation_id:
pages.publish_revision_stale, consumes the stale confirmation, and requires a
new first call so the newer revision can be reviewed.
Handle responses
Tool actions return a flattened body such as{ "ok": true, ... } and answer
HTTP 200 once the tool ran, including typed tool refusals with "ok": false.
The ingest, asset, and preview-link endpoints return
{ "ok": true, "data": ... }; their failures use
{ "ok": false, "error": { "code", "message" } } and an appropriate HTTP
status.
A missing or invalid bearer key is 401; access, workspace, role, or Pages
permission denial is 403; invalid input is 400; and rate limiting is 429.
On 429, wait for Retry-After before trying again. Asset and preview-link
responses are no-store and no-referrer.