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

# Get Calls

> Retrieves the calls within a specific date range of a pearl



## OpenAPI

````yaml post /v2/Pearl/{pearlId}/Calls
openapi: 3.0.1
info:
  title: NLPearl Client API
  description: A sample API that demonstrates features in the OpenAPI specification
  version: v2
servers:
  - url: https://api.nlpearl.ai
    description: Production Environement
security:
  - bearer_auth: []
paths:
  /v2/Pearl/{pearlId}/Calls:
    post:
      tags:
        - Pearl
      summary: Get Calls
      description: Retrieves the calls within a specific date range of a pearl
      parameters:
        - name: pearlId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CallsTableDateSearchApi'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CallsTableDateSearchApi'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CallsTableDateSearchApi'
      responses:
        '200':
          description: Calls within the specified date range for inbound.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CallListApiViewTableSearchResult'
            application/json:
              schema:
                $ref: '#/components/schemas/CallListApiViewTableSearchResult'
            text/json:
              schema:
                $ref: '#/components/schemas/CallListApiViewTableSearchResult'
        '400':
          description: Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
components:
  schemas:
    CallsTableDateSearchApi:
      required:
        - fromDate
        - toDate
      type: object
      properties:
        skip:
          type: integer
          description: Number of entries to skip for pagination.
          format: int32
        limit:
          type: integer
          description: Limit on the number of entries to return.
          format: int32
        sortProp:
          type: string
          description: Property name to sort by.
          nullable: true
        isAscending:
          type: boolean
          description: Whether the sort order is ascending.
        fromDate:
          type: string
          description: The start date for filtering the search results.
          format: date-time
        toDate:
          type: string
          description: The end date for filtering the search results.
          format: date-time
        tags:
          type: array
          items:
            type: string
          description: List of tags to filter by.
          nullable: true
        statuses:
          type: array
          items:
            $ref: '#/components/schemas/eLeadStatusView'
          description: |+
            List of Status to filter by.

          nullable: true
        searchInput:
          type: string
          description: Text to filter by.
          nullable: true
      additionalProperties: false
    CallListApiViewTableSearchResult:
      type: object
      properties:
        count:
          type: integer
          description: The total number of items matching the search criteria.
          format: int64
        results:
          type: array
          items:
            $ref: '#/components/schemas/CallListApiView'
          description: >-
            The list of results for the current page, based on the search
            criteria.
          nullable: true
      additionalProperties: false
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
      additionalProperties: {}
    eLeadStatusView:
      type: integer
      description: >+
        The Status of the lead is the status of the last conversation.


        To determine the definition of 'Success' or 'Not Successful,' please
        refer to the [Create a Pearl](/pages/create_pearl#pearl-name) page at
        step 4.


        `1 - New`


        `10 - NeedRetry`


        `20 - InCallQueue`


        `30 - WrongCountryCode`


        `40 - OnCall`


        `70 - VoiceMailLeft`


        `100 - Success`


        `110 - NotSuccessful`


        `130 - Completed`


        `150 - Unreachable`


        `220 - Blacklisted`


        `300 - QueueAbandon`


        `500 - Error`

      format: int32
    CallListApiView:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the call.
          nullable: true
        startTime:
          type: string
          description: The date and time when the call processing started.
          format: date-time
          nullable: true
        conversationStatus:
          allOf:
            - $ref: '#/components/schemas/eConversationStatusView'
          description: >+
            The outcome of the conversation during the call.


            To determine the definition of 'Success' or 'Not Successful,' please
            refer to the [Create a Pearl](/pages/create_pearl#pearl-name) page
            at step 4.


            `10 - NeedRetry`


            `20 - InCallQueue`


            `40 - OnCall`


            `70 - VoiceMailLeft`


            `100 - Success`


            `110 - NotSuccessful`


            `130 - Completed`


            `150 - Unreachable`


            `220 - Blacklisted`


            `300 - QueueAbandon`


            `500 - Error`

        status:
          allOf:
            - $ref: '#/components/schemas/eCallStatusView'
          description: |+
            Represents the current status of a call.

            `3 - InProgress`

            `4 - Completed`

            `5 - Busy`

            `6 - Failed`

            `7 - NoAnswer`

            `8 - Canceled`

        from:
          type: string
          description: The phone number from which the call was made.
          nullable: true
        to:
          type: string
          description: The phone number to which the call was made.
          nullable: true
        duration:
          type: integer
          description: The duration of the call in seconds.
          format: int32
        tags:
          type: array
          items:
            type: string
          description: The tags or labels triggered during the conversation
          nullable: true
      additionalProperties: false
    eConversationStatusView:
      type: integer
      description: >+
        The outcome of the conversation during the call.


        To determine the definition of 'Success' or 'Not Successful,' please
        refer to the [Create a Pearl](/pages/create_pearl#pearl-name) page at
        step 4.


        `10 - NeedRetry`


        `20 - InCallQueue`


        `40 - OnCall`


        `70 - VoiceMailLeft`


        `100 - Success`


        `110 - NotSuccessful`


        `130 - Completed`


        `150 - Unreachable`


        `220 - Blacklisted`


        `300 - QueueAbandon`


        `500 - Error`

      format: int32
    eCallStatusView:
      type: integer
      description: |+
        Represents the current status of a call.

        `3 - InProgress`

        `4 - Completed`

        `5 - Busy`

        `6 - Failed`

        `7 - NoAnswer`

        `8 - Canceled`

      format: int32
  securitySchemes:
    bearer_auth:
      type: http
      description: >-
        Specify the authorization token.


        For more information, check out the [Authorization
        Guide](/api-reference/authorization).
      scheme: bearer

````