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

# Ai Call

> Initiate an AI Collections call.



## OpenAPI

````yaml post /comms/call/ai
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /comms/call/ai:
    post:
      tags:
        - provider
        - comms
      summary: Ai Call
      description: Initiate an AI Collections call.
      operationId: ai_call_comms_call_ai_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MakeAICall'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MakeAICall:
      properties:
        assistantType:
          type: string
          enum:
            - BILLER
            - CALL_REMINDER
            - CALL_FOLLOW_UP
            - CALL_LAB_TECHNICIAN
          title: Assistanttype
        reasonForCall:
          type: string
          title: Reasonforcall
        patientId:
          type: string
          title: Patientid
        eventId:
          anyOf:
            - type: string
            - type: 'null'
          title: Eventid
        provider:
          type: string
          enum:
            - retell
            - livekit
          title: Provider
          default: livekit
      type: object
      required:
        - assistantType
        - reasonForCall
        - patientId
      title: MakeAICall
    CallSummary:
      properties:
        id:
          type: string
          title: Id
        sender:
          anyOf:
            - $ref: '#/components/schemas/UserTiny'
            - type: 'null'
        receiver:
          anyOf:
            - $ref: '#/components/schemas/UserTiny'
            - type: 'null'
        chatId:
          type: string
          title: Chatid
        direction:
          $ref: '#/components/schemas/CallDirection'
        status:
          $ref: '#/components/schemas/CallStatus'
        completedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completeddate
        retellCallId:
          anyOf:
            - type: string
            - type: 'null'
          title: Retellcallid
        disconnectionReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Disconnectionreason
        pathToAudio:
          anyOf:
            - type: string
            - type: 'null'
          title: Pathtoaudio
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        context:
          anyOf:
            - type: object
            - type: 'null'
          title: Context
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
        toolCalls:
          items:
            $ref: '#/components/schemas/ToolCall'
          type: array
          title: Toolcalls
          default: []
        tags:
          items:
            $ref: '#/components/schemas/TagSummary'
          type: array
          title: Tags
          default: []
        invoiceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoiceid
        type:
          $ref: '#/components/schemas/CallType'
          default: MANUAL
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
      type: object
      required:
        - id
        - chatId
        - direction
        - status
      title: CallSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserTiny:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier for the user.
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: The user's first name.
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: The user's last name.
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: The user's phone number.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: The user's email address.
        type:
          $ref: '#/components/schemas/UserType'
          description: The type of user.
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: The location of the user.
      type: object
      required:
        - id
        - type
      title: UserTiny
    CallDirection:
      type: string
      enum:
        - INBOUND
        - OUTBOUND
      title: CallDirection
    CallStatus:
      type: string
      enum:
        - CREATED
        - ONGOING
        - TRANSFERRED
        - DISCONNECTED
        - FAILED
        - FINISHED
        - VOICEMAIL
      title: CallStatus
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        toolName:
          type: string
          title: Toolname
        toolArguments:
          type: object
          title: Toolarguments
        toolCallId:
          anyOf:
            - type: string
            - type: 'null'
          title: Toolcallid
      type: object
      required:
        - id
        - toolName
        - toolArguments
      title: ToolCall
    TagSummary:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        useForAlerts:
          type: boolean
          title: Useforalerts
        useForCalls:
          type: boolean
          title: Useforcalls
        id:
          type: string
          title: Id
      type: object
      required:
        - name
        - useForAlerts
        - useForCalls
        - id
      title: TagSummary
    CallType:
      type: string
      enum:
        - MANUAL
        - AI
      title: CallType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserType:
      type: string
      enum:
        - PROVIDER
        - PATIENT
        - ASSISTANT
      title: UserType

````