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

# Control Call

> This API will allow you to control the call.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json post /calls/v1/conversations/{id}/control
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /calls/v1/conversations/{id}/control:
    post:
      tags:
        - Calls
      summary: Control Call
      description: This API will allow you to control the call.
      operationId: controlCall
      parameters:
        - name: id
          in: path
          description: Unique identifier of the call
          required: true
          schema:
            type: string
          example: 2665ba28-06aa-4d52-a223-1a89a81e0f44
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ControlConversationSayDTO'
                  title: Say
                - $ref: '#/components/schemas/ControlConversationEndDTO'
                  title: End
                - $ref: '#/components/schemas/ControlConversationForwardDTO'
                  title: Forward
                - $ref: '#/components/schemas/ControlConversationDTMFDTO'
                  title: DTMF
                - $ref: '#/components/schemas/ControlConversationSMSDTO'
                  title: SMS
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Call controlled successfully.
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: True if the call is controlled successfully.
                        example: true
      security:
        - bearer: []
components:
  schemas:
    ControlConversationSayDTO:
      type: object
      properties:
        type:
          type: string
          description: This is the type of the control you would like to make to the call.
          enum:
            - say
            - end
            - forward
            - dtmf
            - sms
          example: say
        message:
          type: string
          description: Provide the message to the assistant to say.
          example: hi there
      required:
        - type
        - message
    ControlConversationEndDTO:
      type: object
      properties:
        type:
          type: string
          description: This is the type of the control you would like to make to the call.
          enum:
            - say
            - end
            - forward
            - dtmf
            - sms
          example: end
        message:
          type: string
          description: >-
            Provide a message to the assistant to say before ending the call.
            Leave it blank if you don't want to say anything.
          example: Bye. See you later!
      required:
        - type
    ControlConversationForwardDTO:
      type: object
      properties:
        type:
          type: string
          description: This is the type of the control you would like to make to the call.
          enum:
            - say
            - end
            - forward
            - dtmf
            - sms
          example: forward
        message:
          type: string
          description: >-
            Provide an message to the assistant to say before forwarding the
            call. Leave it blank if you don't want to say anything.
          example: Forwarding your call to the agent. Please wait.
        number:
          type: string
          description: >-
            This is the phone number to which the call will be forwarded. This
            field is required when `type=forward`.
          example: '+1234567890'
        callerId:
          type: string
          description: >-
            This is the phone number from which the call will be forwarded. By
            default, the callerId will be the phone number of the assistant if
            not provided. Use `callerId` to specify a different callerId for the
            forwarded call. This field is used when `type=forward`.
          example: '+1234567890'
        extension:
          type: string
          description: >-
            This is the extension number of the forward. Leave it blank if phone
            number is not having any extension. This field can be configured
            only when `type=forward`.
          example: '106'
        sipUrl:
          type: string
          description: >-
            This is the SIP URL to which the call will be forwarded. This field
            is used when `type=forward`. If sipUrl is provided, then number and
            extension fields will be ignored.
          example: sip:user@domain.com
      required:
        - type
        - number
    ControlConversationDTMFDTO:
      type: object
      properties:
        type:
          type: string
          description: This is the type of the control you would like to make to the call.
          enum:
            - say
            - end
            - forward
            - dtmf
            - sms
          example: dtmf
        dtmf:
          type: string
          description: >-
            This is the DTMF of the control. This field is required when
            `type=dtmf`.
          example: '106'
      required:
        - type
        - dtmf
    ControlConversationSMSDTO:
      type: object
      properties:
        type:
          type: string
          description: This is the type of the control you would like to make to the call.
          enum:
            - say
            - end
            - forward
            - dtmf
            - sms
          example: sms
        smsData:
          type: object
          description: This is the data of the sms. This field is required when `type=sms`.
          example: sms-data
          properties:
            to:
              type: string
              description: This is the phone number of the receiver.
              example: '+1234567890'
            message:
              type: string
              description: This is the message that will be sent to the receiver.
              example: Hello, how are you?
            from:
              type: string
              description: This is the phone number of the sender.
              example: '+1234567890'
          required:
            - to
            - message
            - from
      required:
        - type
        - smsData
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````