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

# Get AI Assistant

> **DEPRECATED** — This API will be removed on 2nd april 2026. Please migrate to the updated assistant APIs.




## OpenAPI

````yaml https://api.voice-agents.miraiminds.co/swagger.yaml get /v2/assistant/get/{assistantId}
openapi: 3.0.3
info:
  title: Voice Agent by Mirai Minds
  version: 1.1.0
  contact:
    name: API Architecture Team
    url: https://miraiminds.co
  license:
    name: Mirai Minds Proprietary License
    url: >-
      https://github.com/MiraiMinds/voice-agent-integration-specs/blob/main/LICENSE.md
servers:
  - url: https://api.voice-agents.miraiminds.co
    description: Production Server
  - url: https://api.stage.voice-agent.miraiminds.co
    description: Staging Server
  - url: http://localhost:3000
    description: Local Server
security:
  - PublicKeyAuth: []
    PrivateKeyAuth: []
paths:
  /v2/assistant/get/{assistantId}:
    get:
      tags:
        - Assistant
      summary: Get AI Assistant
      description: >
        **DEPRECATED** — This API will be removed on 2nd april 2026. Please
        migrate to the updated assistant APIs.
      operationId: getAssistant
      parameters:
        - $ref: '#/components/parameters/PublicKeyHeader'
        - $ref: '#/components/parameters/PrivateKeyHeader'
        - $ref: '#/components/parameters/WorkspaceHeader'
        - name: assistantId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Assistant fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantGetResponse'
              example:
                message: Assistant fetched successfully
                data:
                  _id: 69a57cdba3f3ab7e07cca1e4
                  name: My Abandoned Cart Assistant
                  status: active
                  variant: abandoned_cart
                  variantConfigs:
                    systemPrompt: ''
                    variables:
                      - name: id
                        type: string
                        isRequired: false
                      - name: abandonedCheckoutUrl
                        type: string
                        isRequired: true
                      - name: customer
                        type: object
                        isRequired: true
                        fields:
                          - name: firstName
                            type: string
                            isRequired: true
                          - name: lastName
                            type: string
                            isRequired: false
                          - name: email
                            type: string
                            isRequired: false
                          - name: phone
                            type: string
                            isRequired: false
                      - name: totalDiscountSet
                        type: object
                        isRequired: false
                        fields:
                          - name: shopMoney
                            type: object
                            isRequired: false
                            fields:
                              - name: amount
                                type: string
                                isRequired: true
                      - name: subtotalPriceSet
                        type: object
                        isRequired: true
                        fields:
                          - name: shopMoney
                            type: object
                            isRequired: true
                            fields:
                              - name: amount
                                type: string
                                isRequired: true
                      - name: totalPriceSet
                        type: object
                        isRequired: true
                        fields:
                          - name: shopMoney
                            type: object
                            isRequired: true
                            fields:
                              - name: amount
                                type: string
                                isRequired: true
                      - name: lineItems
                        type: array
                        isRequired: true
                        fields:
                          - name: title
                            type: string
                            isRequired: true
                          - name: quantity
                            type: number
                            isRequired: true
                          - name: variant
                            type: object
                            isRequired: true
                            fields:
                              - name: id
                                type: string
                                isRequired: true
                              - name: title
                                type: string
                                isRequired: true
                      - name: note
                        type: string
                        isRequired: false
                      - name: shippingAddress
                        type: object
                        isRequired: true
                        fields:
                          - name: country
                            type: string
                            isRequired: true
                          - name: address1
                            type: string
                            isRequired: true
                          - name: address2
                            type: string
                            isRequired: false
                          - name: city
                            type: string
                            isRequired: true
                          - name: zip
                            type: string
                            isRequired: true
                          - name: province
                            type: string
                            isRequired: true
                  agentIdentity:
                    name: neha
                    gender: female
                    voice: neha
                  icpContext:
                    targetAgeGroups:
                      - millennials
                    locationTiers:
                      - metro_urban
                    language: english
                    targetAudience:
                      - female
                  callSettings:
                    slots:
                      - startTime: '10:00'
                        endTime: '17:30'
                    maxCallDuration: '200'
                    concurrentCallCount: '5'
                    retryProtocol:
                      maxAttemptsNoPickup: '2'
                      maxAttemptsLowEngagement: '1'
                      reAttemptPeriod: '300'
                      maxRescheduleCount: '1'
                  analysisPlan:
                    successCriteriaPlan: >-
                      Call is successful if customer commits to completing the
                      purchase or schedules a callback
                    summaryPlan: >-
                      Provide a concise summary of the conversation, customer
                      objections, and the outcome
                    callInsightPlan:
                      callConnected:
                        type: boolean
                        description: >-
                          You are a professional call status evaluator. Analyze
                          the attached call recording and return true only if a
                          live person answered and there was real two-way
                          conversation. If the call went to voicemail, automated
                          message, IVR, ring-tone, greeting, silence, or
                          anything without a live response, return false. Output
                          only true or false.
                        required: true
                      customerEngaged:
                        type: boolean
                        description: >-
                          You are a professional conversation engagement
                          evaluator. Analyze the attached call recording and
                          return true only if the customer did not disconnect
                          abruptly at the beginning and continued engaging in
                          the conversation for at least a few meaningful
                          exchanges; otherwise return false. Output only true or
                          false.
                        required: true
                  trainingData:
                    faq:
                      - question: What is your return policy?
                        answer: We offer a 7-day return policy for unused items.
                  knowledgeBase:
                    documents:
                      - url: https://example.com/product-catalog.pdf
                        title: Product Catalog
                        type: pdf
                  archivedAt: null
                  createdAt: '2026-03-02T12:04:43.086Z'
                  timezone: UTC
        '404':
          description: Assistant not found
      deprecated: true
components:
  parameters:
    PublicKeyHeader:
      name: x-public-key
      in: header
      required: true
      schema:
        type: string
    PrivateKeyHeader:
      name: x-private-key
      in: header
      required: true
      schema:
        type: string
    WorkspaceHeader:
      name: workspace
      in: header
      required: true
      schema:
        type: string
  schemas:
    AssistantGetResponse:
      type: object
      properties:
        message:
          type: string
          example: Assistant fetched successfully
        data:
          $ref: '#/components/schemas/AssistantResponse'
    AssistantResponse:
      type: object
      properties:
        _id:
          type: string
          example: 69a57cdba3f3ab7e07cca1e4
        name:
          type: string
          example: My Assistant
        variant:
          type: string
          enum:
            - abandoned_cart
            - custom
          example: abandoned_cart
        variantConfigs:
          $ref: '#/components/schemas/VariantConfigs'
        agentIdentity:
          $ref: '#/components/schemas/AgentIdentity'
        icpContext:
          $ref: '#/components/schemas/ICPContext'
        callSettings:
          $ref: '#/components/schemas/CallSettings'
        analysisPlan:
          $ref: '#/components/schemas/AnalysisPlan'
        trainingData:
          $ref: '#/components/schemas/TrainingData'
        knowledgeBase:
          $ref: '#/components/schemas/KnowledgeBase'
        archivedAt:
          type: string
          format: date-time
          nullable: true
          example: null
        createdAt:
          type: string
          format: date-time
          example: '2026-03-02T12:04:43.086Z'
        timezone:
          type: string
          example: UTC
    VariantConfigs:
      type: object
      description: >
        Variant-specific configuration. For `custom` variant, `systemPrompt` is
        required. For `abandoned_cart`, `systemPrompt` is optional (overrides
        the generated one). `variables` defines the fields expected in the call
        payload.
      properties:
        systemPrompt:
          type: string
          description: >-
            Custom system prompt. Required for custom variant; overrides the
            generated prompt for abandoned_cart.
          example: ''
        variables:
          type: array
          description: Variables expected in the call payload for this assistant.
          items:
            $ref: '#/components/schemas/AdditionalField'
    AgentIdentity:
      type: object
      properties:
        name:
          type: string
        gender:
          type: string
          enum:
            - male
            - female
        voice:
          type: string
    ICPContext:
      type: object
      properties:
        targetAgeGroups:
          type: array
          items:
            type: string
            enum:
              - gen_z
              - millennials
              - gen_x
              - boomers
          description: Affects slang usage. Gen Z = 'Vibe'; Boomers = 'Quality'.
        locationTiers:
          type: array
          items:
            type: string
            enum:
              - metro_urban
              - tier1
              - tier2
              - tier3
              - rural
          description: Affects language complexity and speed.
        language:
          type: string
          enum:
            - hinglish
            - english
            - hindi
            - telugu
            - tamil
            - kannada
            - malayalam
            - gujarati
            - punjabi
            - odia
            - marathi
          description: Affects language complexity and speed.
        targetAudience:
          type: array
          items:
            type: string
            enum:
              - male
              - female
              - children
          description: Affects language complexity and speed.
    CallSettings:
      type: object
      required:
        - slots
        - retryProtocol
      properties:
        slots:
          type: array
          description: Array of time slots for call execution
          minItems: 1
          items:
            type: object
            properties:
              startTime:
                type: string
                example: '10:00'
              endTime:
                type: string
                example: '13:00'
        maxCallDuration:
          type: number
          example: 200
        concurrentCallCount:
          type: number
          maximum: 10
          example: 5
        retryProtocol:
          $ref: '#/components/schemas/RetryProtocol'
    AnalysisPlan:
      type: object
      properties:
        successCriteriaPlan:
          type: string
        summaryPlan:
          type: string
        callInsightPlan:
          $ref: '#/components/schemas/CallInsightPlan'
    TrainingData:
      type: object
      properties:
        faq:
          type: array
          description: List of Question-Answer pairs for training.
          items:
            $ref: '#/components/schemas/faq'
    KnowledgeBase:
      type: object
      properties:
        documents:
          type: array
          description: >-
            List of large documents (PDF, Docx, TXT) for deep knowledge
            retrieval.
          items:
            type: object
            required:
              - url
              - title
            properties:
              url:
                type: string
                format: uri
                description: Publicly accessible URL of the document.
              title:
                type: string
                description: Name/Title of the document for citation.
              type:
                type: string
                enum:
                  - pdf
                  - txt
                  - docx
                  - markdown
    AdditionalField:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - object
            - array
          default: string
        isRequired:
          type: boolean
        fields:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalField'
    RetryProtocol:
      type: object
      description: Smart logic based on why the call failed.
      properties:
        maxAttemptsNoPickup:
          type: integer
          default: 2
          description: Phone rang, no answer. Call back twice.
        maxAttemptsLowEngagement:
          type: integer
          default: 1
          description: User picked up but said 'busy' or cut immediately. Call back once.
        reAttemptPeriod:
          type: integer
          default: 300
          description: Delay between second reattempt of call to same person in seconds
        maxRescheduleCount:
          type: integer
          default: 1
          maximum: 5
          description: How many times we can reschedule a call when user ask to callback
    CallInsightPlan:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/InsightField'
      description: Map of insight names to their expected structure.
    faq:
      type: object
      required:
        - question
        - answer
      properties:
        question:
          type: string
          example: What is your return policy?
        answer:
          type: string
          example: We offer a 7-day return policy for unused items.
    InsightField:
      type: object
      required:
        - type
        - description
        - required
      properties:
        type:
          type: string
          enum:
            - number
            - boolean
            - string
        description:
          type: string
        required:
          type: boolean
        enum:
          type: array
          items:
            type: string
  securitySchemes:
    PublicKeyAuth:
      type: apiKey
      in: header
      name: x-public-key
    PrivateKeyAuth:
      type: apiKey
      in: header
      name: x-private-key

````