PageHub Tenant webhooks API

Called by PageHub on a white-label tenant's own server.

GitHub OpenAPI

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagehub-dev:pagehub-dev-tenant-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagehub-dev-tenant-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PageHub Tenant webhooks API
  version: 1.0.0
  description: 'The public REST API of PageHub, called with a `ph_` API key (`Authorization: Bearer ph_...`), plus the one webhook the platform calls on a white-label tenant''s server (`fetchPage`).


    A site is HTML + Liquid files: its pages are files (`pages/*.liquid`), written through the files API; the page routes manage each page''s record (name, slug, SEO, access). Writes land in the site''s draft; `PUT /api/v1/sites/{id}` with `published: true` makes the draft live.


    The headless content API (`/api/v1/content/...`) is described by its own document (`GET /api/v1/content/openapi.json`); `GET /api/openapi.json` serves this document with it merged in.


    The routes also accept the dashboard''s session cookie from the dashboard itself; only the API key is the public contract.


    Every operation carries two extension fields. `x-auth` says who may call it: `api-key` (a `ph_` key), `session-or-key` (the dashboard''s own session, or a key), `optional-key` (public, a key widens what you see), `admin-key` (a platform admin''s key), `session` (the dashboard session only; an API key is refused) or `public`. `x-rate-limit` names the rate-limit rule (see the rate-limiting guide) when the route has one; most routes limit per user, public routes per IP.'
  contact:
    name: PageHub
    url: https://pagehub.dev/developers
servers:
- url: https://pagehub.dev
  description: PageHub
security:
- bearerAuth: []
tags:
- name: Tenant webhooks
  description: Called by PageHub on a white-label tenant's own server.
paths: {}
webhooks:
  fetchPage:
    get:
      tags:
      - Tenant webhooks
      summary: Fetch a white-label tenant's site
      description: 'Implemented by a tenant on its own server; PageHub calls it. A tenant that owns a custom domain and sets `webhooks.fetchPage` serves that domain''s site from its own system instead of a PageHub site. For each request PageHub sends `GET /` (the visitor''s host, URL-encoded as the last path segment) with the tenant''s token in `x-pagehub-auth`, and renders the requested page from the bundle in the answer. Nothing is stored, and the site reads no PageHub collections, prices or customers. The server must be reachable on a public address; redirects are re-checked at every hop.


        Anything but a 200 JSON answer with files and pages (an error status, bad JSON, or a bundle with no files or no pages) is a 404 for the visitor.'
      operationId: fetchPageWebhook
      security:
      - tenantAuthToken: []
      parameters:
      - name: host
        in: path
        required: true
        schema:
          type: string
          example: www.example.com
        description: The host the visitor asked for, lowercased, without a port.
      responses:
        '200':
          description: The site as an HTML-first bundle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantBundle'
components:
  schemas:
    TenantBundle:
      type: object
      description: A site as HTML-first files plus its page rows (the shape a template stores).
      properties:
        title:
          type: string
        description:
          type: string
        files:
          description: 'The site''s files: `{ path: text }`, or a list of `{ path, text }`. Paths are the site''s own: `site.json`, `theme.css`, `pages/index.liquid`, `partials/header.liquid`, ...'
          oneOf:
          - type: object
            additionalProperties:
              type: string
          - type: array
            items:
              type: object
              properties:
                path:
                  type: string
                text:
                  type: string
              required:
              - path
              - text
        pages:
          type: array
          items:
            $ref: '#/components/schemas/TenantPageRow'
          minItems: 1
      required:
      - files
      - pages
    TenantPageRow:
      type: object
      description: One page of the bundle. Rows without a `pageNodeId`, or without a `sourcePath` (unless `is404Page`), are ignored.
      properties:
        pageNodeId:
          type: string
        sourcePath:
          type:
          - string
          - 'null'
          description: The page's file, e.g. `pages/about.liquid`.
        displayName:
          type:
          - string
          - 'null'
        pageSlug:
          type:
          - string
          - 'null'
          description: The page's URL segment; empty for the home page.
        isHomePage:
          type: boolean
        is404Page:
          type: boolean
        isHidden:
          type: boolean
        pathPattern:
          type:
          - string
          - 'null'
          description: URL tail after the slug for a detail page, e.g. `:handle`.
        policyDraft:
          type:
          - object
          - 'null'
          additionalProperties: true
        seoDraft:
          type:
          - object
          - 'null'
          additionalProperties: true
      required:
      - pageNodeId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `ph_` API key (a user's key, or a tenant's).
    tenantAuthToken:
      type: apiKey
      in: header
      name: x-pagehub-auth
      description: The tenant's token, sent by PageHub on every webhook call so the tenant can check the request came from PageHub.