# List calls with transcripts

`POST /calls/search`

> This is a subset of the full specification, limited to the `POST /calls/search` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `POST /calls/search` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths:
  /calls/search:
    post:
      summary: List calls with transcripts
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
      tags:
        - Calls
      operationId: listCallsWithTranscripts
      description: |
        Retrieve calls by a list of conversation ids and include transcripts when available.
        A maximum of 20 `conversation_ids` can be provided. If none are provided or more than 20 are provided, a 400 error is returned.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - conversation_ids
              properties:
                conversation_ids:
                  type: array
                  description: A list of conversation ids to fetch calls for. Maximum 20.
                  minItems: 1
                  maxItems: 20
                  items:
                    type: string
            examples:
              example:
                value:
                  conversation_ids:
                    - '64619700005694'
                    - '64619700005695'
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                successful:
                  value:
                    type: list
                    data:
                      - type: call
                        id: '123'
                        conversation_id: '64619700005694'
                        transcript:
                          - {}
                        transcript_status: completed
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: list
                  data:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/call'
                        - type: object
                          properties:
                            transcript:
                              type: array
                              description: The call transcript if available, otherwise an empty array.
                              items:
                                type: object
                                additionalProperties: true
                            transcript_status:
                              type: string
                              nullable: true
                              description: The status of the transcript if available.
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                too_many_ids:
                  value:
                    type: error.list
                    errors:
                      - code: conversation_id_limit_exceeded
                        message: A list of up to 20 conversation IDs is required
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    datetime:
      oneOf:
        - title: string
          type: string
          format: date-time
          description: A date and time following the ISO8601 notation.
        - title: integer
          type: integer
          description: A date and time as Unix timestamp notation.
    call:
      title: Call
      type: object
      x-tags:
        - Calls
      description: Represents a phone call in Intercom
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `call`.
          example: call
        id:
          type: string
          description: The id of the call.
          example: '123'
        conversation_id:
          type: string
          nullable: true
          description: The id of the conversation associated with the call, if any.
          example: '456'
        admin_id:
          type: string
          nullable: true
          description: The id of the admin associated with the call, if any.
          example: '789'
        contact_id:
          type: string
          nullable: true
          description: The id of the contact associated with the call, if any.
          example: 6762f0dd1bb69f9f2193bb83
        state:
          type: string
          description: The current state of the call.
          example: completed
        initiated_at:
          $ref: '#/components/schemas/datetime'
        answered_at:
          $ref: '#/components/schemas/datetime'
        ended_at:
          $ref: '#/components/schemas/datetime'
        created_at:
          $ref: '#/components/schemas/datetime'
        updated_at:
          $ref: '#/components/schemas/datetime'
        recording_url:
          type: string
          format: uri
          nullable: true
          description: API URL to download or redirect to the call recording if available.
          example: https://api.intercom.io/calls/123/recording
        transcription_url:
          type: string
          format: uri
          nullable: true
          description: API URL to download or redirect to the call transcript if available.
          example: https://api.intercom.io/calls/123/transcript
        call_type:
          type: string
          description: The type of call.
          example: phone
        direction:
          type: string
          description: The direction of the call.
          example: outbound
        ended_reason:
          type: string
          nullable: true
          description: The reason for the call end, if applicable.
          example: completed
        phone:
          type: string
          nullable: true
          description: The phone number involved in the call, in E.164 format.
          example: '+15551234567'
        fin_recording_url:
          type: string
          format: uri
          nullable: true
          description: API URL to the AI Agent (Fin) call recording if available.
        fin_transcription_url:
          type: string
          format: uri
          nullable: true
          description: API URL to the AI Agent (Fin) call transcript if available.
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
