Skip to Content
iAdvizeDocs

Switch a site's hosted page on or off

Publishes or takes down the site's hosted page (the AI Storefront), with the rules of the dashboard. Switching on needs a default agent that is live. Taking the page down keeps the site's key, so the same link works again once switched back on. Attributed to the API key in the audit log.

PUT
/api/v1/sites/{siteId}/hosted-page

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).

Path Parameters

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

Request Body

application/json
  1. body
enabled*boolean

true to publish the hosted page, false to take it down. Taking it down keeps the site's key, so the same link works again once switched back on.

Response Body

The site, with its hosted page.

application/json
  1. response
data*
Example Request
curl -X PUT 'https://example.com/api/v1/sites/string/hosted-page' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
Example Response
{  "data": {    "font": "string",    "customFont": {      "name": "string",      "files": [        {          "id": "string",          "weight": 0,          "style": "normal",          "format": "woff2",          "byteSize": 0,          "sourceUrl": "string",          "url": "string"        }      ]    },    "widgetsUseBrandFont": true,    "resumeButton": {      "position": "left",      "offsetBottom": 0,      "offsetSide": 0,      "offsetBottomNarrow": 0,      "offsetSideNarrow": 0,      "zIndex": 0,      "zIndexNarrow": 0,      "colors": {        "background": "string",        "icon": "string",        "border": "string"      },      "icon": "sparkle",      "size": "sm",      "radius": "none",      "shadow": "none"    },    "id": "string",    "name": "string",    "platform": "shopify",    "url": "string",    "siteInformation": "string",    "toneOfVoice": "string",    "vertical": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "autoGenerateStarters": true,    "startersSelfImprovementEnabled": true,    "pageViewCountingEnabled": true,    "storefrontCartCountingEnabled": true,    "storefrontOrderCountingEnabled": true,    "orderAttributionWindowHours": 1,    "displayedPrice": {      "mode": "auto",      "inEffect": true,      "differsAt": "2019-08-24T14:15:22Z"    },    "autoReadPages": true,    "autoReadMinViews": 0,    "readVariantPages": true,    "tagMonitoringEnabled": true,    "webTagEnabled": true,    "panelColors": {      "panel": {        "background": "string"      },      "actions": {        "fill": "string",        "text": "string",        "hover": "string",        "border": "string"      },      "visitor": {        "fill": "string",        "text": "string"      },      "highlights": {        "fill": "string",        "text": "string"      },      "assistant": {        "text": "string"      },      "links": {        "color": "string"      },      "suggestions": {        "fill": "string",        "text": "string",        "border": "string",        "hover": "string"      },      "secondary": {        "fill": "string",        "text": "string",        "border": "string",        "hover": "string"      }    },    "panelCorners": {      "visitor": "full",      "suggestions": "full"    },    "panelPosition": "left",    "panelBackdrop": true,    "panelCloseOnOutsideClick": true,    "panelZIndex": 2147483000,    "panelZIndexNarrow": 2147483000,    "hostedPage": {      "enabled": true,      "link": "string"    },    "defaultAgentId": "string",    "analysisState": "running"  }}