Skip to content
APIProductSites and appsPage

Page routes: update, delete

The Page Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Page, one group of Page routes.

Page.update

Changes the given properties of a Page. Verb page.

Text
PATCH /{namespace}/pages/{id}

Path: id. Body, as JSON: the other inputs. Emits Page.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Page.
pathstringThe path under its Site, such as /pricing.
kindstringThe page type, such as landing, pricing, or terms.
fromstringLineage: the slot it compiles from, as Hypothesis#<slot>@v<version>.

Returns

OutputTypeRequiredDescription
pagePagerequiredThe Page.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/kilnbakery.com/pages/page_A8w9CXatRR \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"/"}'
JSON
{
  "api": "https://api.sb/kilnbakery.com",
  "page": {
    "$id": "https://api.sb/kilnbakery.com/pages/page_A8w9CXatRR",
    "$type": "Page",
    "path": "/"
  },
  "action": {
    "$id": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k",
    "operation": "Page.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k"
  }
}

Page.delete

Deletes a Page: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/pages/{id}

Path: id. Emits Page.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Page.

Returns

OutputTypeRequiredDescription
pagePagerequiredThe Page.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X DELETE https://api.sb/kilnbakery.com/pages/page_A8w9CXatRR \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/kilnbakery.com",
  "page": {
    "$id": "https://api.sb/kilnbakery.com/pages/page_A8w9CXatRR",
    "$type": "Page",
    "path": "/"
  },
  "action": {
    "$id": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k",
    "operation": "Page.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/actions/act_0y76a1jB6k"
  }
}