PageHub Pages API

The page records of a site: name, slug, URL pattern, SEO, access policy.

GitHub OpenAPI

Operations 5

GET /api/v1/sites/{id}/source-pages List pages #
POST /api/v1/sites/{id}/source-pages Create a page #
GET /api/v1/sites/{id}/source-pages/{pageId} Read a page's record and settings #
PATCH /api/v1/sites/{id}/source-pages/{pageId} Change a page's record #
DELETE /api/v1/sites/{id}/source-pages/{pageId} Delete a page #

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-pages-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-pages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PageHub Pages 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: Pages
  description: 'The page records of a site: name, slug, URL pattern, SEO, access policy.'
paths:
  /api/v1/sites/{id}/source-pages:
    parameters:
    - $ref: '#/components/parameters/SiteId'
    get:
      tags:
      - Pages
      summary: List pages
      operationId: listSitePages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  pages:
                    type: array
                    items:
                      $ref: '#/components/schemas/SitePage'
                required:
                - pages
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/SiteFormatChanged'
      x-auth: session-or-key
    post:
      tags:
      - Pages
      summary: Create a page
      description: 'Creates the page''s file (it must not exist yet) and its record. The first page of a site becomes the home page. Send `text`, or `blank: true` to start from the site''s own header and footer around a heading.'
      operationId: createSitePage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                slug:
                  type: string
                  description: Defaults to a slug of `name`.
                pathPattern:
                  type:
                  - string
                  - 'null'
                  description: URL tail after the page's slug for a detail page, e.g. `:handle`.
                text:
                  type: string
                  description: The page's HTML + Liquid.
                blank:
                  type: boolean
                seo:
                  type: object
                  additionalProperties: true
                file:
                  type: string
                  description: The page file path; defaults to `pages/<slug>.liquid`.
              required:
              - name
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    $ref: '#/components/schemas/SitePage'
                  version:
                    type: string
                required:
                - page
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The page's file already exists, or the site format changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          $ref: '#/components/responses/WriteRejected'
        '503':
          $ref: '#/components/responses/Maintenance'
      x-auth: session-or-key
      x-rate-limit: site_save
  /api/v1/sites/{id}/source-pages/{pageId}:
    parameters:
    - $ref: '#/components/parameters/SiteId'
    - name: pageId
      in: path
      required: true
      schema:
        type: string
      description: The page's `pageId` from the pages list.
    get:
      tags:
      - Pages
      summary: Read a page's record and settings
      operationId: getSitePage
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    $ref: '#/components/schemas/SitePage'
                  policy:
                    type:
                    - object
                    - 'null'
                    additionalProperties: true
                    description: The page's access policy, without the password hash.
                  hasPassword:
                    type: boolean
                  file:
                    type:
                    - object
                    - 'null'
                    additionalProperties: true
                    description: 'Settings kept in the page''s own file: `hideHeader`, `hideFooter`, `headCode`, `footerCode`.'
                required:
                - page
                - hasPassword
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      x-auth: session-or-key
    patch:
      tags:
      - Pages
      summary: Change a page's record
      description: '`seo` and `policy` merge into the current values; a null value removes a key. `file` edits the page''s own file. Clients (content-only role) cannot change page settings.'
      operationId: updateSitePage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                slug:
                  type: string
                pathPattern:
                  type:
                  - string
                  - 'null'
                isHomePage:
                  type: boolean
                is404Page:
                  type: boolean
                isHidden:
                  type: boolean
                seo:
                  type: object
                  additionalProperties: true
                policy:
                  type: object
                  additionalProperties: true
                file:
                  type: object
                  properties:
                    hideHeader:
                      type: boolean
                    hideFooter:
                      type: boolean
                    headCode:
                      type: string
                    footerCode:
                      type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    $ref: '#/components/schemas/SitePage'
                required:
                - page
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/SiteFormatChanged'
        '422':
          $ref: '#/components/responses/WriteRejected'
        '503':
          $ref: '#/components/responses/Maintenance'
      x-auth: session-or-key
      x-rate-limit: site_save
    delete:
      tags:
      - Pages
      summary: Delete a page
      description: Deletes the page's file, then its record. The home page cannot be deleted.
      operationId: deleteSitePage
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  page:
                    $ref: '#/components/schemas/SitePage'
                required:
                - page
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/SiteFormatChanged'
        '503':
          $ref: '#/components/responses/Maintenance'
      x-auth: session-or-key
      x-rate-limit: site_save
components:
  parameters:
    SiteId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: The site's id.
  responses:
    Unauthorized:
      description: Missing, malformed or invalid `ph_` API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    BadRequest:
      description: The request is malformed or refused (`error`, often `message`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    WriteRejected:
      description: 'A file write was refused: `lint` (422, with `issues` and `path`), too large (413), or another `rejected` reason.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: No such site, or the key has no access to it, or no such resource under it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: The key's user lacks the role this needs, or a plan limit applies.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    SiteFormatChanged:
      description: 'The site is not an HTML-first site (`error: site_format_changed`).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Maintenance:
      description: 'Writes are paused for maintenance (`error: maintenance`, `Retry-After` header).'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    SitePage:
      type: object
      properties:
        pageId:
          type: string
        name:
          type: string
        slug:
          type: string
          description: The page's own URL segment; empty for the home page.
        file:
          type:
          - string
          - 'null'
          description: The page's file in the draft.
        url:
          type: string
        isHomePage:
          type: boolean
        is404Page:
          type: boolean
        isHidden:
          type: boolean
        pathPattern:
          type:
          - string
          - 'null'
        seo:
          type:
          - object
          - 'null'
          additionalProperties: true
      required:
      - pageId
      - name
      - slug
      - file
      - url
      - isHomePage
      - is404Page
      - isHidden
      - pathPattern
      - seo
    ApiError:
      type: object
      description: The error body of the management routes. The content API uses `Error` instead.
      properties:
        error:
          type: string
          description: A message, or a code such as `version_conflict`, `lint`, `maintenance`, `site_format_changed`.
        message:
          type: string
        code:
          type: string
        upgrade:
          type: boolean
          description: True when the plan is the reason.
      required:
      - error
      additionalProperties: true
  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.