> ## Documentation Index
> Fetch the complete documentation index at: https://docs.depict.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish a collection to the Inspiration gallery

> Renders a PNG preview of the merchant's live collection page (with the given theme template) and adds or refreshes its entry in the shared Inspiration gallery, where every merchant can see it; re-publishing resets the entry's likes to 0. Then queues a Shopify order sync-back for the collection. If the storefront is password-protected nothing is rendered or written and the call still answers 200 null. Slow: the render can take several seconds. Returns null.



## OpenAPI

````yaml /api-reference/openapi/lite.json post /published-collections/{collection_id}
openapi: 3.1.0
info:
  title: Search & Merchandising API
  version: 1.0.0
  description: >-
    REST API behind Depict: Search & Merchandising, the native Shopify app:
    onboarding, collections, boost & bury, dashboards, A/B testing and
    multi-store management. Endpoints are served under the /api/lite prefix and
    are authenticated with the Shopify session token that App Bridge issues to
    the embedded app.
servers:
  - url: /api/lite
security:
  - ShopifySessionToken: []
paths:
  /published-collections/{collection_id}:
    post:
      summary: Publish a collection to the Inspiration gallery
      description: >-
        Renders a PNG preview of the merchant's live collection page (with the
        given theme template) and adds or refreshes its entry in the shared
        Inspiration gallery, where every merchant can see it; re-publishing
        resets the entry's likes to 0. Then queues a Shopify order sync-back for
        the collection. If the storefront is password-protected nothing is
        rendered or written and the call still answers 200 null. Slow: the
        render can take several seconds. Returns null.
      operationId: publishedCollectionsCreate
      parameters:
        - schema:
            type: string
            description: >-
              Numeric Shopify collection id of one of the merchant's
              collections.
          required: true
          description: Numeric Shopify collection id of one of the merchant's collections.
          name: collection_id
          in: path
        - schema:
            type: string
            description: Lite merchant id, e.g. `shopify-<shop id>`.
          required: true
          description: Lite merchant id, e.g. `shopify-<shop id>`.
          name: merchant_id
          in: query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePublishedCollectionRequest'
      responses:
        '200':
          description: Published, or skipped for a password-protected storefront.
          content:
            application/json:
              schema:
                type: 'null'
        '400':
          description: >-
            The query or body failed the schema; `detail` carries zod's
            messages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '401':
          description: Not authenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '403':
          description: Authenticated, but this identity may not call the API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '404':
          description: >-
            Merchant not found for this caller, or the collection does not
            exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
        '500':
          description: Internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Detail'
components:
  schemas:
    CreatePublishedCollectionRequest:
      type: object
      properties:
        template_suffix:
          type: string
          description: >-
            The collection template to render (Shopify `?view=` suffix), e.g.
            the Depict template the collection uses.
        used_features:
          type: array
          items:
            $ref: '#/components/schemas/LiteFeatures'
          description: >-
            Features the collection uses, shown as gallery filters; duplicates
            are dropped.
      required:
        - template_suffix
        - used_features
    Detail:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
      description: 'Every 4xx/5xx body: `{detail}`.'
    LiteFeatures:
      type: string
      enum:
        - content_block
        - product_duplicate
        - image_setting
      description: >-
        A portal feature a collection uses: content blocks, duplicated products,
        or per-product image settings.
  securitySchemes:
    ShopifySessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Shopify App Bridge session token of the embedded Depict: Search &
        Merchandising app. The shop in the token determines the merchant;
        merchant_id parameters must belong to that shop.

````