Publish with AI Publish API

The Publish API from Publish with AI — 1 operation(s) for publish.

GitHub OpenAPI

Operations 1

POST /api/v1/publish Publish an artifact #

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/publishwith-ai:publishwith-ai-publish-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

publishwith-ai-publish-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: publishwith.ai Publish API
  description: 'REST API for publishing governed AI-generated reports and dashboards.

    Designed for ChatGPT Custom Actions and any HTTP client.


    **Base URL:** `https://publishwith.ai`


    **Auth:** Bearer token — generate a personal API key from Connect.

    API keys are for ChatGPT Actions and clients that cannot complete OAuth;

    Enterprise workspaces may restrict or disable key creation.'
  version: '1.0'
  contact:
    url: https://publishwith.ai
servers:
- url: https://publishwith.ai
security:
- bearerAuth: []
tags:
- name: Publish
paths:
  /api/v1/publish:
    post:
      operationId: publishArtifact
      summary: Publish an artifact
      description: 'Create or update a governed HTML artifact (idempotent by derived slug).

        Static mode: supply `files` with `index.html` (HTML) or `index.md`

        (Markdown, auto-rendered to a styled page). Dynamic mode: supply

        `manifest` (YAML) and `templates` (Liquid).'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishRequest'
            examples:
              static:
                summary: Monthly revenue report (static HTML)
                value:
                  name: Revenue Report Q1 2025
                  files:
                    index.html: <html>...</html>
              markdown:
                summary: Plain Markdown document (auto-rendered to HTML)
                value:
                  name: Project Notes
                  files:
                    index.md: '# Project Notes


                      Write **Markdown** directly. It is rendered to a styled page.'
              dynamic:
                summary: Live churn dashboard (dynamic SSR)
                value:
                  name: Churn Dashboard
                  mode: dynamic
                  manifest: "kind: mcp-html-artifact\nversion: 1\nroutes:\n  - path: /\n    template: index.html\n    queries:\n      total:\n        sql: \"SELECT COUNT(*) as count FROM churned_customers\"\n"
                  templates:
                    index.html: <html>{{ total.rows[0].count }} churned</html>
      responses:
        '200':
          description: Artifact published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/VersionChanged'
      tags:
      - Publish
components:
  responses:
    Forbidden:
      description: No tenant associated with this API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    VersionChanged:
      description: Another author published a newer version (cross-author conflict)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VersionChanged'
  schemas:
    PublishRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: Artifact display name. A URL-safe slug is derived from this.
          example: Revenue Report Q1 2025
        mode:
          type: string
          enum:
          - static
          - dynamic
          default: static
          description: '`static` — upload HTML/CSS/JS files.

            `dynamic` — server-side rendering via YAML manifest + Liquid templates.

            '
        files:
          type: object
          description: 'Filename → file content (UTF-8 text).

            Required for static mode. The entry point is `index.html` (HTML)

            or `index.md` (Markdown, auto-rendered to a styled HTML page).

            Additional assets (CSS, JS, images, more `.md`/`.html` pages) may

            be included alongside it as extra keys.

            '
          properties:
            index.html:
              type: string
              description: HTML entry point.
            index.md:
              type: string
              description: Markdown entry point, auto-rendered to a styled page.
          additionalProperties:
            type: string
          example:
            index.md: '# Revenue


              Q1 revenue reached **$501k**.'
        manifest:
          type: string
          description: YAML manifest for dynamic mode. Defines queries and routes.
        templates:
          type: object
          description: Template name → Liquid template content for dynamic mode.
          properties:
            index.html:
              type: string
              description: Main Liquid template.
          additionalProperties:
            type: string
        ttl_days:
          type: integer
          description: 'Optional time-to-live in days. After this many days the artifact

            auto-goes-offline behind a wall for public visitors; the owner and

            MCP/REST keep access. 0 removes the TTL. Max 365. Omit to leave any

            existing TTL untouched on re-publish.

            '
          example: 10
        base_version:
          type: integer
          description: 'Optional. The version this static update is based on (the version you

            last read). If another author published a newer version since then,

            the publish is rejected with 409 VERSION_CHANGED instead of silently

            overwriting their work. Same-author updates need no base_version.

            '
          example: 3
        confirmation_token:
          type: string
          description: 'From a 409 VERSION_CHANGED response. Re-call publish with the same

            files and this token to overwrite the version another author published.

            '
    PublishResponse:
      type: object
      properties:
        artifact_id:
          type: string
          format: uuid
        slug:
          type: string
          example: revenue-report-q1-2025
        url:
          type: string
          format: uri
          description: Authenticated URL (requires publishwith.ai account).
          example: https://publishwith.ai/a/revenue-report-q1-2025/
        version:
          type: integer
          description: Version number of the published content.
        expires_at:
          type: string
          format: date-time
          description: TTL deadline, present only when ttl_days was set.
        upload_token:
          type: string
          description: Upload token for adding binary files out-of-band (5-minute TTL).
        upload_url:
          type: string
          description: Full URL for the upload endpoint.
        upload_expires_at:
          type: string
          description: RFC3339 expiry timestamp for the upload token.
        curl:
          type: string
          description: Ready-to-paste curl command for uploading a binary file.
    VersionChanged:
      type: object
      description: 'Cross-author publish conflict: another author published a newer version

        after your base_version. No merge is attempted. Re-call publish with the

        same files and the confirmation_token to overwrite.

        '
      properties:
        code:
          type: string
          enum:
          - VERSION_CHANGED
          description: Result code identifying the conflict.
        message:
          type: string
        hint:
          type: string
        current_version:
          type: integer
          description: The live head version another author published.
        confirmation_token:
          type: string
          description: Pass back as confirmation_token to overwrite the current version.
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key from Connect