> ## 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 session summary

> Generates a structured recap of a user's session for follow-up emails or internal dashboards.

<Note>
  This endpoint returns a generated summary directly unless the company has a
  session summary webhook configured.
</Note>


## OpenAPI

````yaml api-reference/openapi-latest.json POST /api/v1/session-summaries
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/session-summaries:
    post:
      tags:
        - Session API
      summary: Create a session summary
      description: >-
        Generates a structured recap of a user's session for follow-up emails or
        internal dashboards.
      operationId: createSessionSummaryV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionJourneySummaryRequest'
            examples:
              default:
                value:
                  session_id: a1c2d3e4-1111-2222-3333-444455556666
                  company: YOUR_COMPANY
      responses:
        '200':
          description: Session summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionJourneySummaryResponse'
        '400':
          description: Session has no queries to summarize
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Summary generation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SessionJourneySummaryRequest:
      type: object
      required:
        - session_id
        - company
      properties:
        session_id:
          type: string
        company:
          type: string
          example: YOUR_COMPANY
    SessionJourneySummaryResponse:
      type: object
      properties:
        session_id:
          type: string
        status:
          type: string
          enum:
            - generated
            - sent
            - suppressed
        category:
          type: string
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicSummary'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/ResourceLink'
        cta:
          $ref: '#/components/schemas/CTAData'
        suggested_subject:
          type: string
        rendered_body:
          type: string
    ErrorResponse:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: array
              items: {}
        error:
          type: string
    TopicSummary:
      type: object
      properties:
        title:
          type: string
        narrative:
          type: string
    ResourceLink:
      type: object
      properties:
        title:
          type: string
        link:
          type: string
          format: uri
    CTAData:
      type: object
      properties:
        text:
          type: string
        link:
          type: string
          format: uri

````