Publish with AI Call API

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

GitHub OpenAPI

Operations 1

POST /api/v1/call Invoke any publishwith.ai action (complete API) #

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-call-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-call-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: publishwith.ai Call 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: Call
paths:
  /api/v1/call:
    post:
      operationId: invokeAction
      summary: Invoke any publishwith.ai action (complete API)
      description: 'Generic endpoint for the COMPLETE publishwith.ai capability set — every

        operation available over MCP. Send `{ "action": "", ...params }`.

        The `action` property lists every action and its parameters. Typed

        shortcuts exist for common flows: publish, list, search, share.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallRequest'
      responses:
        '200':
          description: Action result. Shape depends on the action.
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifact_id:
                    type: string
                  slug:
                    type: string
                  url:
                    type: string
                  version:
                    type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Call
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'
    NotFound:
      description: Artifact not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CallRequest:
      type: object
      required:
      - action
      properties:
        action:
          type: string
          enum:
          - create_artifact
          - list_artifacts
          - delete_artifact
          - publish_static
          - publish_dynamic
          - execute_sql
          - list_tables
          - validate_artifact
          - set_access
          - set_visibility
          - set_published
          - set_ttl
          - share_with
          - revoke_access
          - list_access
          - list_views
          - preview
          - list_groups
          - list_users
          - find_people
          - create_user
          - list_audience_groups
          - set_audience_group
          - delete_audience_group
          - publish_python
          - run_python
          - validate_python
          - search
          - docs
          description: 'The action to invoke. Parameters per action:

            - `create_artifact` — name, mode (static|dynamic), description

            - `list_artifacts` — query (optional)

            - `delete_artifact` — artifact_id

            - `publish_static` — artifact_id OR name, files {filename: content}, description (optional). With name it creates the artifact or publishes a new version of the existing artifact with that name, in ONE call. Entry point index.html or index.md (Markdown auto-renders).

            - `publish_dynamic` — artifact_id OR name, manifest (YAML), templates {name: liquid}, description (optional)

            - `execute_sql` — artifact_id, sql, params (array, optional), confirmation_token (required for destructive ops)

            - `list_tables` — artifact_id

            - `validate_artifact` — artifact_id, manifest

            - `set_access` — artifact_id, and any of visibility (private|tenant|public), owners[], editors[], viewers[], groups[], replace (bool: revoke grants not listed), owner_only (bool: reset to owner-only + private). DECLARATIVE bulk. owners/editors must be tenant users.

            - `set_visibility` — artifact_id, visibility (private|tenant|public)

            - `set_published` — artifact_id, published (boolean). Toggle online/offline; content kept. published=true requires version>0.

            - `set_ttl` — artifact_id, ttl_days (integer). After ttl_days the artifact auto-goes-offline behind a wall for public visitors; owner and MCP/REST still access it. 0 removes the TTL and brings an expired artifact back online. Max 365.

            - `share_with` — artifact_id, principal ({type: tenant_user|tenant_group|external_email|audience|auto, value}), access (view|edit|own, optional; external_email is view-only), delivery (auto|canonical|link, optional), ttl_days (optional, external only). type=auto resolves an email inside the workspace to tenant_user and outside it to external_email, and a person name against the directory (several matches return AMBIGUOUS_PRINCIPAL); it never resolves to a group. ADDITIVE single principal; returns result_code + resolved_lane + url + visibility + access[] + share_url? Never changes visibility.

            - `revoke_access` — artifact_id, and principal ({type, value}) OR grant_id. Removes the direct grant only; response states residual access.

            - `list_access` — artifact_id. Who CAN access: visibility + owner + every live grant with its grant_id and provenance.

            - `list_views` — artifact_id, limit (optional). Who DID access (the access log).

            - `preview` — artifact_id, path (optional), method (optional), body (optional), api_name (optional)

            - `list_groups` — query (optional)

            - `list_users` — query (optional)

            - `create_user` — email, groups (array, optional)

            - `list_audience_groups` — (no params) lists this tenant''s audience groups of external contacts

            - `set_audience_group` — name, contacts (array of {display_name, email}). Creates or replaces the group''s membership by name.

            - `delete_audience_group` — audience_group_id

            - `validate_python` — script, libraries (array, optional). SYNCHRONOUS, team+. Validates the Python without running it; returns ok, message (what is unavailable + the in-sandbox alternative), capabilities, available_libraries, and granted_connections (egress names you may declare). Call before publish_python.

            - `publish_python` — script (Python), manifest (report.yaml: output_type html|dataset, libraries[], db_write, schedule, connections), name (create) or artifact_id (update), description (optional). team+ editor. Linted first; unsupported imports rejected. Each connection in the manifest must be granted to one of your groups (a tenant admin grants connections in the UI); db_write is admin-only.

            - `run_python` — artifact_id. team+ editor. Runs the stored report against its own SQLite and renders a fresh version; identical output is a no_change (version unchanged). Returns version, status, output_sha, url.

            - `search` — query, limit (optional)

            - `docs` — topic (optional; one or several space-separated topics: api, audience, csrf, current_user, destructive, docs, dynamic, edit, errors, files, liquid, lifecycle, manifest, publish, reports, search, security, share, sql, ttl, upload, users, views, visibility). Each topic returns only its own section; combine them in one call, e.g. topic="publish share". Omit topic only to get the full ~34KB manual.

            '
        artifact_id:
          type: string
        name:
          type: string
          description: Artifact name. On create_artifact it names the draft; on publish_static/publish_dynamic it addresses the artifact by name (create-or-update) instead of artifact_id.
        mode:
          type: string
          enum:
          - static
          - dynamic
        description:
          type: string
          description: Short description of the artifact, max 500 characters.
        files:
          type: object
          description: Filename to UTF-8 content (publish_static). Use index.html OR index.md as the entry point; add css/js/images/more pages 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
        manifest:
          type: string
        script:
          type: string
          description: Python report source (publish_python, validate_python). Builtins write_output/write_html/write_markdown/write_dataset/write_output_part/write_chart_spec, read_input/list_inputs, log/now; modules requests, db (db.query/db.execute/db.list_tables), tabular (SQL over in-memory rows), charts (charts.bar/line/pie build a Chart.js config), llm. No pandas/numpy/matplotlib.
        libraries:
          type: array
          items:
            type: string
          description: Optional libstore packages the report imports, e.g. [openpyxl, jinja2] (publish_python, validate_python). Only declared libs are mounted.
        templates:
          type: object
          description: Template name to Liquid content (publish_dynamic).
          properties:
            index.html:
              type: string
              description: Main Liquid template.
          additionalProperties:
            type: string
        sql:
          type: string
        params:
          type: array
          items:
            type: string
          description: Positional SQL parameters, bound in order. Numbers may be sent as strings.
        confirmation_token:
          type: string
        principal:
          $ref: '#/components/schemas/Principal'
        visibility:
          type: string
          enum:
          - private
          - tenant
          - public
          description: Document-wide visibility (set_access, set_visibility).
        owners:
          type: array
          items:
            type: string
          description: Owner emails (set_access). Must be tenant users.
        editors:
          type: array
          items:
            type: string
          description: Editor emails (set_access). Must be tenant users.
        viewers:
          type: array
          items:
            type: string
          description: Viewer emails (set_access). An email unknown to the tenant becomes an external share link.
        replace:
          type: boolean
          description: 'set_access: revoke live direct grants not present in the new owners/editors/viewers/groups set.'
        owner_only:
          type: boolean
          description: 'set_access: reset access to owner-only and visibility to private.'
        access:
          type: string
          enum:
          - view
          - edit
          - own
          description: Access level to grant (share_with). Owners/editors must be tenant users.
        delivery:
          type: string
          enum:
          - auto
          - canonical
          - link
          description: 'Delivery channel (share_with): auto resolves by lane, canonical forces the in-app URL, link forces a tokenized share link.'
        grant_id:
          type: string
          description: Grant id to revoke (revoke_access; alternative to principal).
        published:
          type: boolean
          description: Toggle online/offline (set_published). true=online, false=offline (content kept).
        ttl_days:
          type: integer
          description: Time-to-live in days (set_ttl; also publish_static/publish_dynamic, and external grant expiry for share_with). After this many days a public artifact walls off; owner and MCP/REST keep access. 0 removes the TTL. Max 365.
        path:
          type: string
        method:
          type: string
        body:
          type: object
          additionalProperties:
            type: string
          description: Form field key-value pairs for POST preview.
        api_name:
          type: string
        email:
          type: string
        groups:
          type: array
          items:
            type: string
        contacts:
          type: array
          description: External recipients (set_audience_group). Membership is fully replaced on each call.
          items:
            $ref: '#/components/schemas/AudienceContact'
        audience_group_id:
          type: string
          description: Audience group ID (delete_audience_group).
        query:
          type: string
        limit:
          type: integer
        topic:
          type: string
    AudienceContact:
      type: object
      required:
      - email
      properties:
        display_name:
          type: string
        email:
          type: string
    Principal:
      type: object
      required:
      - type
      - value
      properties:
        type:
          type: string
          enum:
          - tenant_user
          - tenant_group
          - external_email
          - audience
          - auto
          description: 'Principal kind. tenant_user/tenant_group are internal (canonical URL); external_email gets a tokenized share link; audience fans out external links to a saved contact group. auto lets the server pick the lane: an email inside the workspace resolves to tenant_user, outside it to external_email, and a person name is resolved against the directory. auto never resolves to a group.'
        value:
          type: string
          description: 'Identifier: an email (tenant_user/external_email/auto), a group name (tenant_group), an audience group id (audience), or a person name (auto).'
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key from Connect