> ## 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.

# Import Conversation

> Import a conversation from a media file. This endpoint creates a new conversation from an external source (e.g., Gong, Salesforce) and processes it through the Attention platform's transcription and analysis pipeline.



## OpenAPI

````yaml /api-reference/openapi.json post /conversations/import
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:
  /conversations/import:
    post:
      tags:
        - Conversation
      summary: Import Conversation
      description: >-
        Import a conversation from a media file. This endpoint creates a new
        conversation from an external source (e.g., Gong, Salesforce) and
        processes it through the Attention platform's transcription and analysis
        pipeline.
      operationId: importConversation
      requestBody:
        description: >-
          Conversation import data including media URL, user information, and
          optional metadata
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportConversationRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ImportConversationRequest'
        required: true
      responses:
        '200':
          description: Conversation successfully imported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConversationResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ImportConversationResponse'
        '400':
          description: Invalid request parameters or user does not belong to organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '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'
        '403':
          description: User does not belong to the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImportConversationRequest:
      required:
        - mediaURL
        - userID
      type: object
      properties:
        mediaURL:
          type: string
          description: URL of the media file to import (audio or video)
        userID:
          type: string
          description: UUID of the user who owns this conversation
        applicationName:
          type: string
          description: Name of the external application (e.g., 'zap:gong', 'salesforce')
        applicationExternalID:
          type: string
          description: External ID from the source application
        conversationTitle:
          type: string
          description: Title or name of the conversation
        conversationStartedAt:
          type: string
          description: When the conversation started (ISO 8601 format)
          format: date-time
        headers:
          type: array
          description: HTTP headers to use when fetching the media file
          items:
            $ref: '#/components/schemas/Header'
        opportunityID:
          type: string
          description: ID of the associated opportunity or deal
        linkedCrmRecords:
          type: array
          description: CRM records linked to this conversation (accounts, contacts, etc.)
          items:
            $ref: '#/components/schemas/LinkedCrmRecord'
        skipScorecardCalculation:
          type: boolean
          description: Skip automatic scorecard calculation for this conversation
        skipCRMFieldsCalculation:
          type: boolean
          description: Skip CRM fields calculation for this conversation
        skipOpportunitiesExport:
          type: boolean
          description: Skip exporting opportunities for this conversation
        transcriptionSettings:
          $ref: '#/components/schemas/TranscriptionSettings'
        transcript:
          $ref: '#/components/schemas/TranscriptInput'
        externalMetadata:
          $ref: '#/components/schemas/ExternalMetadata'
      example:
        mediaURL: https://storage.example.com/recordings/call-abc123.mp4
        userID: user-uuid-123
        conversationTitle: Q1 Deal Review - Acme Corp
        conversationStartedAt: '2024-03-18T10:30:00Z'
        applicationName: zoom
        applicationExternalID: zoom-meeting-987654
        opportunityID: opp-uuid-456
        linkedCrmRecords:
          - id: 001ABC123
            code: Account
        externalMetadata:
          participants:
            - email: jane@example.com
              name: Jane Smith
              accessType: Internal
              organizer: true
            - email: john@customer.com
              name: John Doe
              accessType: External
              organizer: false
          extra:
            source: zoom
            meetingDuration: 1800
        transcriptionSettings:
          gladia:
            enableDiarization: true
        headers:
          - key: Authorization
            value: Bearer token123
        skipCRMFieldsCalculation: false
        skipOpportunitiesExport: false
        skipScorecardCalculation: false
    ImportConversationResponse:
      required:
        - uuid
      type: object
      properties:
        uuid:
          type: string
          description: UUID of the newly imported conversation
      example:
        uuid: conv-uuid-new-123
    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
    Header:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          description: Header name
        value:
          type: string
          description: Header value
      example:
        key: Authorization
        value: Bearer eyJhbGciOiJIUzI1NiJ9...
    LinkedCrmRecord:
      required:
        - code
        - id
      type: object
      properties:
        id:
          type: string
        code:
          type: string
      example:
        id: 001ABC123
        code: Account
    TranscriptionSettings:
      type: object
      properties:
        gladia:
          $ref: '#/components/schemas/GladiaTranscriptionSettings'
      example:
        gladia:
          enableDiarization: true
    TranscriptInput:
      type: object
      properties:
        v1:
          $ref: '#/components/schemas/TranscriptV1Input'
        v2:
          $ref: '#/components/schemas/TranscriptV2Input'
      example:
        v1:
          pieceInFlux: ''
          final:
            - speaker: Jane Smith
              sentence: Let's review the proposal.
              startTimestamp: 0.5
              endTimestamp: 3.2
    ExternalMetadata:
      type: object
      properties:
        participants:
          type: array
          description: List of conversation participants
          items:
            $ref: '#/components/schemas/ExternalMetadataParticipant'
        extra:
          type: object
          additionalProperties: true
          description: Additional metadata as key-value pairs
      example:
        participants:
          - email: jane@example.com
            name: Jane Smith
            accessType: Internal
            organizer: true
        extra:
          source: zoom
    GladiaTranscriptionSettings:
      type: object
      properties:
        enableDiarization:
          type: boolean
          description: Enable speaker diarization (identifying different speakers)
      example:
        enableDiarization: true
    TranscriptV1Input:
      required:
        - final
        - pieceInFlux
      type: object
      properties:
        pieceInFlux:
          type: string
          description: Current incomplete piece being transcribed
        final:
          type: array
          description: Finalized transcript items
          items:
            $ref: '#/components/schemas/TranscriptV1Item'
      example:
        pieceInFlux: ''
        final:
          - speaker: Jane Smith
            sentence: Let's review the proposal.
            startTimestamp: 0.5
            endTimestamp: 3.2
    TranscriptV2Input:
      required:
        - final
        - pieceInFlux
      type: object
      properties:
        pieceInFlux:
          type: string
          description: Current incomplete piece being transcribed
        final:
          type: array
          description: Finalized transcript items with word-level timing
          items:
            $ref: '#/components/schemas/TranscriptV2Item'
      example:
        pieceInFlux: ''
        final:
          - speaker: Jane Smith
            words:
              - text: Let's
                startTimestamp: 0.5
                endTimestamp: 0.8
              - text: review
                startTimestamp: 0.9
                endTimestamp: 1.3
    ExternalMetadataParticipant:
      required:
        - accessType
        - email
        - name
        - organizer
      type: object
      properties:
        email:
          type: string
          description: Participant email address
        name:
          type: string
          description: Participant name
        accessType:
          type: string
          description: Whether the participant is internal or external to the organization
          enum:
            - Internal
            - External
        organizer:
          type: boolean
          description: Whether this participant is the organizer of the conversation
      example:
        email: john@customer.com
        name: John Doe
        accessType: External
        organizer: false
    TranscriptV1Item:
      required:
        - startTimestamp
      type: object
      properties:
        speaker:
          type: string
          description: Speaker identifier
        sentence:
          type: string
          description: Transcribed text
        startTimestamp:
          type: number
          description: Start time in seconds
          format: float
        endTimestamp:
          type: number
          description: End time in seconds
          format: float
      example:
        speaker: Jane Smith
        sentence: Let's review the proposal.
        startTimestamp: 0.5
        endTimestamp: 3.2
    TranscriptV2Item:
      required:
        - speaker
        - words
      type: object
      properties:
        speaker:
          type: string
          description: Speaker identifier
        words:
          type: array
          description: Individual words with timestamps
          items:
            $ref: '#/components/schemas/Word'
      example:
        speaker: Jane Smith
        words:
          - text: Hello
            startTimestamp: 0.5
            endTimestamp: 0.8
          - text: everyone
            startTimestamp: 0.9
            endTimestamp: 1.3
    Word:
      required:
        - endTimestamp
        - startTimestamp
        - text
      type: object
      properties:
        text:
          type: string
          description: Word text
        startTimestamp:
          type: number
          description: Start time in seconds
          format: float
        endTimestamp:
          type: number
          description: End time in seconds
          format: float
      example:
        text: Hello
        startTimestamp: 0.5
        endTimestamp: 0.8
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````