Publish with AI Artifacts API

The Artifacts API from Publish with AI — 4 operation(s) for artifacts.

GitHub OpenAPI

Operations 4

GET /api/v1/artifacts List all artifacts in your tenant #
GET /api/v1/artifacts/{slug}/source Get an artifact's raw source files for editing #
POST /api/v1/artifacts/{slug}/request-upload Get an upload token to attach binary files out-of-band #
POST /api/v1/artifacts/{slug}/share Share an artifact with a person, group, or audience #

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-artifacts-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-artifacts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: publishwith.ai Artifacts 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: Artifacts
paths:
  /api/v1/artifacts:
    get:
      operationId: listArtifacts
      summary: List all artifacts in your tenant
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
        description: Filter artifacts by substring match on name, slug, or description.
      responses:
        '200':
          description: Array of artifacts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ArtifactSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
      tags:
      - Artifacts
  /api/v1/artifacts/{slug}/source:
    get:
      operationId: getArtifactSource
      summary: Get an artifact's raw source files for editing
      description: 'Returns an artifact''s raw source files (text inline, binary base64), the

        same shape publishArtifact accepts. Use this to edit an existing artifact

        instead of the rendered public URL, which returns HTML and would clobber a

        Markdown source.'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
        description: 'Artifact slug (returned by publishArtifact). To edit: fetch the source

          here, change it, then publish it back. Do not use the rendered page

          from the public URL as your edit source: it is HTML, so editing it

          turns a Markdown (index.md) artifact into HTML. Publish replaces the

          whole version, so send back every file this returns, not just the

          changed one.

          '
      - name: version
        in: query
        required: false
        schema:
          type: integer
        description: Version to read (defaults to the current published version).
      responses:
        '200':
          description: The artifact's source files
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Artifacts
  /api/v1/artifacts/{slug}/request-upload:
    post:
      operationId: requestUpload
      summary: Get an upload token to attach binary files out-of-band
      description: 'Returns an upload token so large binary files (images, fonts > 64 KiB)

        can be uploaded directly via curl with no model output tokens spent on

        base64 encoding. The token is also returned by publishArtifact.

        Upload via POST /api/v1/upload/{token}?name= with raw bytes.'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
        description: Artifact slug (returned by publishArtifact).
      responses:
        '200':
          description: Upload token and ready-to-use curl command
          content:
            application/json:
              schema:
                type: object
                properties:
                  upload_token:
                    type: string
                    description: 32-hex-char token; bound to this artifact, caller, and version.
                  upload_url:
                    type: string
                    description: Full URL for the upload endpoint.
                  upload_expires_at:
                    type: string
                    description: RFC3339 expiry timestamp (5-minute TTL).
                  curl:
                    type: string
                    description: Ready-to-paste curl command (substitute the filename).
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Artifacts
  /api/v1/artifacts/{slug}/share:
    post:
      operationId: shareWith
      summary: Share an artifact with a person, group, or audience
      description: 'Additively grant access to one typed principal (tenant user, group,

        external email, or audience). Internal principals open the canonical URL;

        an external email gets a tokenized, expiring share link. Never changes

        document visibility.'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
        description: Artifact slug (returned by publishArtifact)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareRequest'
      responses:
        '200':
          description: Access granted (or de-duplicated/unchanged/conflict)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Artifacts
components:
  schemas:
    ArtifactSummary:
      type: object
      properties:
        artifact_id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        mode:
          type: string
          enum:
          - static
          - dynamic
        version:
          type: integer
        url:
          type: string
          format: uri
        status:
          type: string
          enum:
          - draft
          - online
          - offline
          - expired
          description: Derived lifecycle state. `expired` means past its TTL (walled for public visitors).
        expires_at:
          type: string
          format: date-time
          description: TTL deadline, present only when a TTL is set.
    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).'
    ShareResponse:
      type: object
      description: 'Outcome of an additive share. Self-sufficient: it carries the artifact url, its visibility and the resulting access list, so no follow-up list_access is needed to verify. An external grant also returns share_url. An audience fan-out returns created[] + deduplicated_count.'
      properties:
        result_code:
          type: string
          enum:
          - created
          - deduplicated
          - upgraded
          - unchanged
          - conflict
          description: created=new grant; deduplicated=identical grant already existed; upgraded=raised to a higher level; unchanged=already had access via visibility/group; conflict=already holds a higher level (not downgraded).
        resolved_lane:
          type: string
          enum:
          - internal
          - external
        resolved_principal_type:
          type: string
          enum:
          - tenant_user
          - tenant_group
          - external_email
          - audience
        opens_via:
          type: string
          description: 'How the principal opens the artifact: ''canonical URL'' or ''share link''.'
        share_url:
          type: string
          format: uri
          description: Tokenized share URL, present only for an external (link) grant.
          example: https://publishwith.ai/p/abc123def456
        grant_id:
          type: string
          description: The created or affected grant id.
        artifact_id:
          type: string
        url:
          type: string
          format: uri
          description: Canonical artifact URL.
        visibility:
          type: string
          enum:
          - private
          - tenant
          - public
          description: The artifact's visibility floor after the share.
        access:
          type: array
          description: Every live grant on the artifact after this call, same shape as list_access.
          items:
            type: object
            properties:
              grant_id:
                type: string
              principal_type:
                type: string
                enum:
                - tenant_user
                - tenant_group
                - external_email
              principal:
                type: string
              access_level:
                type: string
                enum:
                - view
                - edit
                - own
              delivery:
                type: string
                enum:
                - canonical
                - link
                - email
              source:
                type: string
              expires_at:
                type: string
                format: date-time
        current_access_level:
          type: string
          description: On a conflict, the principal's existing (higher) access level.
        created:
          type: array
          description: For an audience fan-out, the per-contact links created.
          items:
            type: object
            properties:
              email:
                type: string
              share_url:
                type: string
                format: uri
        deduplicated_count:
          type: integer
          description: For an audience fan-out, the number of contacts skipped because they already had a live grant.
    SourceResponse:
      type: object
      properties:
        artifact_id:
          type: string
          format: uuid
        mode:
          type: string
          enum:
          - static
          - dynamic
        version:
          type: integer
          description: The version these source files belong to.
        files:
          type: object
          description: 'Map of filename to content, the same shape publishArtifact accepts.

            Text files (.md, .html, .css, .js, .json, ...) are inline UTF-8;

            binary assets (.png, fonts, ...) are base64-encoded.

            '
          properties:
            index.html:
              type: string
            index.md:
              type: string
          additionalProperties:
            type: string
    Error:
      type: object
      properties:
        error:
          type: string
    ShareRequest:
      type: object
      required:
      - principal
      properties:
        principal:
          $ref: '#/components/schemas/Principal'
        access:
          type: string
          enum:
          - view
          - edit
          - own
          default: view
          description: 'Access level to grant. Owners/editors (edit/own) must be tenant users: an external_email is capped at view and edit/own are rejected.'
        delivery:
          type: string
          enum:
          - auto
          - canonical
          - link
          default: auto
          description: auto resolves by lane (internal→canonical, external→link); canonical forces the in-app URL; link forces a tokenized share link.
        ttl_days:
          type: integer
          description: Expiry in days for an external (link) grant. Default 90. Ignored for internal grants.
  responses:
    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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal API key from Connect