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

# Create share

> Creates a shareable conversation history snapshot for a session.

<Warning>
  Private sessions cannot be shared. Requests with `is_private_session: true`
  return `403`.
</Warning>


## OpenAPI

````yaml api-reference/openapi-latest.json POST /api/v1/shares
openapi: 3.1.0
info:
  title: Webless API
  description: >-
    Reference for the latest Webless API surface. New integrations should use
    the /api/v1 endpoints.
  version: v1
servers:
  - url: https://api.webless.ai
    description: Production Search API
security: []
paths:
  /api/v1/shares:
    post:
      tags:
        - Session API
      summary: Create a shared history snapshot
      description: Creates a shareable conversation history snapshot for a session.
      operationId: createShareV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareHistoryRequest'
            examples:
              default:
                value:
                  session_id: a1c2d3e4-1111-2222-3333-444455556666
                  template_id: mr
                  use_history: true
      responses:
        '200':
          description: Share snapshot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareHistoryResponse'
        '403':
          description: Private session sharing is disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ShareHistoryRequest:
      type: object
      required:
        - session_id
        - template_id
      properties:
        session_id:
          type: string
          description: Session ID to share.
        template_id:
          type: string
          enum:
            - mr
            - sr
          description: >-
            `mr` shares the full multi-request history. `sr` shares only the
            latest request.
        use_history:
          type: boolean
          default: false
          description: When true, include query history and persist a reloadable snapshot.
        is_private_session:
          type: boolean
          default: false
    ShareHistoryResponse:
      type: object
      properties:
        conversation_history_id:
          type: string
        template_id:
          type: string
          enum:
            - mr
            - sr
        session_id:
          type: string
        history:
          type: array
          items:
            $ref: '#/components/schemas/SharedHistoryItem'
        conversation_history:
          type: array
          items: {}
          description: Only present when `use_history` is true.
    ErrorResponse:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: array
              items: {}
        error:
          type: string
    SharedHistoryItem:
      type: object
      properties:
        timestamp:
          type: integer
        query:
          type: string
        summary:
          type: string
        metadata:
          type: object
          additionalProperties: true
        responses:
          type: array
          items: {}
        user_id:
          type: string
          nullable: true

````