BrewPage Sites API

Multi-file HTML site hosting via ZIP or folder upload

Operations 5

GET /api/sites/{ns}/{id} Get site info #
PUT /api/sites/{ns}/{id} Update site #
DELETE /api/sites/{ns}/{id} Delete site #
POST /api/sites Upload site #
GET /api/sites/{ns}/{id}/files/{filePath} Serve site file #

Documentation

Specifications

Schemas & Data

Other Resources

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/brewpage:brewpage-sites-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

brewpage-sites-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BrewPage Sites API
  description: Free instant hosting for HTML, Markdown, JSON, key-value stores, files and sites. REST omission defaults to the public namespace; MCP omission creates an unlisted namespace. Unlisted URLs are accessible to anyone with the link; use a password for access restrictions. Retain returned links and ownership tokens. Public discovery requires eligibility; protected and non-public publications are excluded.
  termsOfService: https://brewpage.app/terms
  contact:
    name: BrewPage
    url: https://brewpage.app
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.112.0
servers:
- url: https://brewpage.app
  description: Generated server url
tags:
- name: Sites
  description: Multi-file HTML site hosting via ZIP or folder upload
paths:
  /api/sites/{ns}/{id}:
    get:
      tags:
      - Sites
      summary: Get site info
      description: Returns site metadata and file list. Requires owner token
      operationId: getSiteInfo
      parameters:
      - name: ns
        in: path
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-]{1,32}$
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Owner-Token
        in: header
        description: Owner token returned at creation
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Site info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteInfoResponse'
        '403':
          description: Missing or wrong owner token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Site not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - OwnerToken: []
    put:
      tags:
      - Sites
      summary: Update site
      description: Replaces the multi-file site bundle (ZIP archive or individual files with paths). Requires the owner token returned at creation. Password is preserved as-is (not changed in this operation).
      operationId: republishSite
      parameters:
      - name: ns
        in: path
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-]{1,32}$
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: tags
        in: query
        description: Comma-separated tags
        required: false
        schema:
          type: string
        example: demo,portfolio
      - name: ttl
        in: query
        description: TTL in integer days (1-30); accepts 15, 15d, 15 day or 15 days, case-insensitive. Omission preserves the original expiry; updates do not renew it.
        required: false
        schema:
          type: string
          pattern: ^\s*(?:\d+\s*(?:[dD]|[dD][aA][yY][sS]?)?)?\s*$
      - name: entry
        in: query
        description: 'Entry file path override (default: auto-detect index.html)'
        required: false
        schema:
          type: string
      - name: X-Owner-Token
        in: header
        description: Owner token returned at creation. Required for update
        required: true
        schema:
          type: string
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              anyOf:
              - type: object
                required:
                - archive
              - type: object
                required:
                - files
              properties:
                archive:
                  type: string
                  format: binary
                  description: ZIP archive; takes precedence over individual files.
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  minItems: 1
                paths:
                  type: array
                  description: Optional paths aligned with files; omitted paths use original filenames.
                  items:
                    type: string
        required: true
      responses:
        '200':
          description: Site updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteUpdateResponse'
        '400':
          description: Invalid request, empty bundle, limits exceeded, or bad TTL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Missing or wrong owner token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Site not found or expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '410':
          description: Site is no longer available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported file type in archive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - OwnerToken: []
    delete:
      tags:
      - Sites
      summary: Delete site
      description: Permanently removes the site and all its files from storage
      operationId: deleteSite
      parameters:
      - name: ns
        in: path
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-]{1,32}$
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Owner-Token
        in: header
        description: Owner token returned at creation. Required for delete
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Site deleted
        '403':
          description: Missing or wrong owner token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Site not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - OwnerToken: []
  /api/sites:
    post:
      tags:
      - Sites
      summary: Upload site
      description: Upload a multi-file HTML site as a ZIP archive or as individual files with paths. Returns a link to the published site
      operationId: uploadSite
      parameters:
      - name: ns
        in: query
        description: Namespace (default public). Custom namespaces are unlisted, accessible to anyone with the URL. Public discovery additionally requires eligibility and no password.
        required: false
        schema:
          type: string
          default: public
          pattern: ^[a-z0-9-]{1,32}$
      - name: tags
        in: query
        description: Comma-separated tags
        required: false
        schema:
          type: string
        example: demo,portfolio
      - name: ttl
        in: query
        description: TTL in integer days (1-30); accepts 15, 15d, 15 day or 15 days, case-insensitive. Omitted or blank uses 15 days.
        required: false
        schema:
          type: string
          pattern: ^\s*(?:\d+\s*(?:[dD]|[dD][aA][yY][sS]?)?)?\s*$
      - name: entry
        in: query
        description: 'Entry file path override (default: auto-detect index.html)'
        required: false
        schema:
          type: string
      - name: X-Password
        in: header
        description: Access password
        required: false
        schema:
          type: string
      - name: X-Owner-Token
        in: header
        description: Reuse existing owner token to group entities under one owner
        required: false
        schema:
          type: string
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
      - name: X-Delivery-Mode
        in: header
        required: false
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              anyOf:
              - type: object
                required:
                - archive
              - type: object
                required:
                - files
              properties:
                archive:
                  type: string
                  format: binary
                  description: ZIP archive; takes precedence over individual files.
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  minItems: 1
                paths:
                  type: array
                  description: Optional paths aligned with files; omitted paths use original filenames.
                  items:
                    type: string
        required: true
      responses:
        '201':
          description: Site uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SiteUploadResponse'
        '400':
          description: Invalid request, no HTML files, or limits exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: Unsupported file type in archive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - {}
      - OwnerToken: []
  /api/sites/{ns}/{id}/files/{filePath}:
    get:
      tags:
      - Sites
      summary: Serve site file
      description: Serves an individual file from the site with correct content type
      operationId: serveSiteFile
      parameters:
      - name: ns
        in: path
        required: true
        schema:
          type: string
          pattern: ^[a-z0-9-]{1,32}$
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: X-Password
        in: header
        description: Access password via header
        required: false
        schema:
          type: string
      - name: p
        in: query
        description: Legacy-only query password; ignored for NEW publications. Programmatic access uses X-Password or the owner token.
        required: false
        schema:
          type: string
      - name: User-Agent
        in: header
        required: false
        schema:
          type: string
      - name: X-Owner-Token
        in: header
        description: Owner token to bypass password protection when no password supplied
        required: false
        schema:
          type: string
      - name: Range
        in: header
        required: false
        schema:
          type: string
      - name: filePath
        in: path
        description: Relative file path, including nested directories; encode each segment and retain slash separators.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File content
          content:
            '*/*':
              schema:
                type: object
        '403':
          description: Wrong password
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Site or file not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - {}
      - OwnerToken: []
      - Password: []
components:
  schemas:
    SiteInfoResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique 10-character alphanumeric site ID
        namespace:
          type: string
        entryFile:
          type: string
          description: Entry HTML file resolved from the upload
        fileCount:
          type: integer
          format: int32
        totalSizeBytes:
          type: integer
          format: int64
        files:
          type: array
          description: List of all files in the site
          items:
            $ref: '#/components/schemas/SiteFileInfo'
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        views:
          type: integer
          format: int64
        tags:
          type: array
          items:
            type: string
      required:
      - createdAt
      - entryFile
      - expiresAt
      - fileCount
      - files
      - id
      - namespace
      - tags
      - totalSizeBytes
      - views
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        message:
          type: string
        timestamp:
          type: string
          format: date-time
        supportedTypes:
          type: array
          items:
            type: string
        retryAfterSeconds:
          type: integer
          format: int64
        limit:
          type: integer
          format: int32
        result:
          oneOf:
          - $ref: '#/components/schemas/AbuseResult'
        code:
          type: string
      required:
      - error
      - message
      - status
      - timestamp
    SiteFileInfo:
      type: object
      properties:
        path:
          type: string
          description: Relative file path within the site
        contentType:
          type: string
          description: Detected MIME type
        sizeBytes:
          type: integer
          format: int64
      required:
      - path
      - sizeBytes
    AbuseResult:
      type: object
      properties:
        code:
          type: string
          enum:
          - success
          - duplicate
          - warned
          - failed
        action:
          type: string
          enum:
          - created
          - created_missing_assets
          - updated
          - merged
          - created_warned
          - unavailable
          - rate_limited
          - rejected
        reason:
          type: string
        extras:
          type: object
          additionalProperties: {}
      required:
      - action
      - code
    SiteUploadResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique 10-character alphanumeric site ID
        namespace:
          type: string
        entryFile:
          type: string
          description: Entry HTML file resolved from the upload (e.g. index.html)
        link:
          type: string
          description: Primary URL returned for browser viewing and sharing
        ownerLink:
          type: string
          description: API URL for programmatic access (info, delete)
        fileCount:
          type: integer
          format: int32
        totalSizeBytes:
          type: integer
          format: int64
        expiresAt:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
        ownerToken:
          type: string
          description: Secret token required for info and delete operations. Store it safely -- cannot be recovered
        result:
          description: Publication result envelope (code + action + optional reason). Created/Merged/CreatedWarned dispatched per silent-merge dedup decision.
          oneOf:
          - $ref: '#/components/schemas/AbuseResult'
        visibilityNotice:
          type: string
          description: Human-readable explanation of link access and conditional public-discovery eligibility. Unlisted links are not secret; password protection applies when configured. No guarantee of listing, ranking or search-engine indexing.
        managementLink:
          type:
          - string
          - 'null'
        routingCohort:
          type: string
        deliveryMode:
          type:
          - string
          - 'null'
        requestedDeliveryMode:
          type:
          - string
          - 'null'
        effectiveDeliveryMode:
          type:
          - string
          - 'null'
        deliveryModeMatched:
          type:
          - boolean
          - 'null'
        access:
          type: string
        modeLocked:
          type: boolean
        hostingVersion:
          type:
          - integer
          - 'null'
          format: int64
      required:
      - access
      - deliveryMode
      - deliveryModeMatched
      - effectiveDeliveryMode
      - entryFile
      - expiresAt
      - fileCount
      - hostingVersion
      - id
      - link
      - managementLink
      - modeLocked
      - namespace
      - ownerLink
      - ownerToken
      - requestedDeliveryMode
      - routingCohort
      - tags
      - totalSizeBytes
    SiteUpdateResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique 10-character alphanumeric site ID
        namespace:
          type: string
        link:
          type: string
          description: Primary URL returned for browser viewing and sharing
        ownerLink:
          type: string
          description: API URL for programmatic access (info, update, delete)
        entryFile:
          type: string
          description: Entry HTML file resolved from the upload (e.g. index.html)
        fileCount:
          type: integer
          format: int32
        totalSizeBytes:
          type: integer
          format: int64
        expiresAt:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
        result:
          description: 'Publication outcome envelope: code + action + optional reason.'
          oneOf:
          - $ref: '#/components/schemas/AbuseResult'
        visibilityNotice:
          type: string
          description: Human-readable explanation of link access and conditional public-discovery eligibility. Unlisted links are not secret; password protection applies when configured. No guarantee of listing, ranking or search-engine indexing.
        managementLink:
          type:
          - string
          - 'null'
        routingCohort:
          type: string
        deliveryMode:
          type:
          - string
          - 'null'
        requestedDeliveryMode:
          type:
          - string
          - 'null'
        effectiveDeliveryMode:
          type:
          - string
          - 'null'
        deliveryModeMatched:
          type:
          - boolean
          - 'null'
        access:
          type: string
        modeLocked:
          type: boolean
        hostingVersion:
          type:
          - integer
          - 'null'
          format: int64
      required:
      - access
      - deliveryMode
      - deliveryModeMatched
      - effectiveDeliveryMode
      - entryFile
      - expiresAt
      - fileCount
      - hostingVersion
      - id
      - link
      - managementLink
      - modeLocked
      - namespace
      - ownerLink
      - requestedDeliveryMode
      - routingCohort
      - tags
      - totalSizeBytes
  securitySchemes:
    OwnerToken:
      type: apiKey
      name: X-Owner-Token
      in: header
    Password:
      type: apiKey
      name: X-Password
      in: header
externalDocs:
  description: BrewPage API documentation (Scalar)
  url: https://kochetkov-ma.github.io/brewpage-openapi/
x-provenance:
  method: harvested
  publisher: BrewPage
  source: https://brewpage.app/v3/api-docs
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)