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

# Create Snippet

> Creates a new conversation snippet that can be used for reference, analysis, or sharing. This endpoint allows you to capture and store important parts of conversations for future use.



## OpenAPI

````yaml /api-reference/openapi.json post /snippets
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /snippets:
    post:
      tags:
        - Tool
        - Snippet
      summary: Create Snippet
      description: >-
        Creates a new conversation snippet that can be used for reference,
        analysis, or sharing. This endpoint allows you to capture and store
        important parts of conversations for future use.
      operationId: createSnippet
      requestBody:
        description: >-
          Snippet creation request containing the conversation content and
          metadata
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSnippetRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CreateSnippetRequest'
        required: true
      responses:
        '200':
          description: Snippet successfully created and stored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedSnippetResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CreatedSnippetResponse'
        '401':
          description: Authentication failed - valid API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error occurred while creating the snippet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateSnippetRequest:
      required:
        - conversation_id
        - internal
        - notify_views
        - user_uuid
        - video
      type: object
      properties:
        user_uuid:
          type: string
        conversation_id:
          type: string
        reference:
          $ref: '#/components/schemas/NewSnippetReference'
        video:
          $ref: '#/components/schemas/NewVideoTimespan'
        notes:
          type: string
        title:
          type: string
        in_library:
          type: boolean
          description: Indicates whether the snippet should be added to the library or not
        library_item_info:
          $ref: '#/components/schemas/NewLibraryItemInfo'
        internal:
          type: boolean
        notify_views:
          type: boolean
      example:
        user_uuid: a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6
        conversation_id: conv-uuid-123
        internal: false
        notify_views: true
        title: Key Discovery Moment
        notes: Customer mentioned budget constraints
        in_library: true
        video:
          start_time: 120.5
          end_time: 180
          duration: 59.5
        reference:
          characters:
            start_idx: '100'
            end_idx: '250'
          speakers:
            start_idx: '2'
            end_idx: '5'
          transcript_version: V1
    CreatedSnippetResponse:
      required:
        - id
        - url
      type: object
      properties:
        url:
          type: string
        id:
          type: string
        share_code:
          type: string
      example:
        id: snp-uuid-789
        url: https://app.attention.tech/snippets/snp-uuid-789
        share_code: abc123def
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    NewSnippetReference:
      required:
        - characters
        - speakers
        - transcript_version
      type: object
      properties:
        characters:
          $ref: '#/components/schemas/NewRange'
        speakers:
          $ref: '#/components/schemas/NewRange'
        transcript_version:
          type: string
          enum:
            - V1
            - V2
      example:
        characters:
          start_idx: '0'
          end_idx: '150'
        speakers:
          start_idx: '0'
          end_idx: '50'
        transcript_version: V2
    NewVideoTimespan:
      required:
        - end_time
        - start_time
      type: object
      properties:
        start_time:
          type: number
        end_time:
          type: number
        duration:
          type: number
      example:
        start_time: 120.5
        end_time: 180.75
        duration: 60.25
    NewLibraryItemInfo:
      required:
        - my_library
      type: object
      properties:
        my_library:
          type: boolean
        folder_path:
          type: string
      example:
        my_library: true
        folder_path: /sales/meetings
    NewRange:
      required:
        - end_idx
        - start_idx
      type: object
      properties:
        start_idx:
          type: string
        end_idx:
          type: string
      example:
        start_idx: '0'
        end_idx: '100'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````