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

# Listar llamadas

> Lista llamadas entrantes o salientes del proyecto asociado a la clave de API. Las solicitudes se limitan a una ventana de un día y paginación por cursor.

Usa este endpoint para obtener llamadas entrantes o salientes del proyecto asociado con la clave de API. Solicita una dirección y una ventana de hasta un día; después sigue `pagination.next_cursor` con los mismos filtros hasta que `has_next` sea falso.

> [!NOTE]
>
> **Límite de velocidad:** 1 solicitud por segundo. Las respuestas contienen un máximo de 100 llamadas.


## OpenAPI

````yaml GET /calls
openapi: 3.0.1
info:
  title: Altur API
  description: >-
    An API aimed to allow third-party developers to interact with the Altur
    platform through a RESTful interface.
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.altur.io/api/v1.0
security:
  - apiKeyAuth: []
paths:
  /calls:
    get:
      description: >-
        Lists inbound or outbound calls for the API key's project. Requests are
        limited to a one-day window and cursor pagination.
      parameters:
        - name: type
          in: query
          description: Call direction to retrieve
          required: true
          schema:
            type: string
            enum:
              - inbound
              - outbound
        - name: createdAfter
          in: query
          description: Start of the inclusive creation-time window (ISO 8601)
          required: true
          schema:
            type: string
            format: date-time
        - name: createdBefore
          in: query
          description: >-
            End of the inclusive creation-time window (ISO 8601). The window
            cannot exceed one day.
          required: true
          schema:
            type: string
            format: date-time
        - name: cursor
          in: query
          description: Opaque cursor returned by the previous page; reuse the same filters.
          schema:
            type: string
        - name: pageSize
          in: query
          description: Calls per page
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Calls response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsResponse'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
components:
  schemas:
    CallsResponse:
      type: object
      properties:
        calls:
          type: array
          items:
            $ref: '#/components/schemas/CallListItem'
        pagination:
          $ref: '#/components/schemas/CallsPagination'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    CallListItem:
      type: object
      properties:
        id:
          type: string
        agent_id:
          type: string
        thread_id:
          type: string
        type:
          type: string
          enum:
            - inbound
            - outbound
        status:
          type: string
        answered_by:
          type: string
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
          nullable: true
        ended_at:
          type: string
          format: date-time
          nullable: true
        ended_by:
          type: string
        ended_reason:
          type: string
        duration:
          description: Call duration in seconds
          type: integer
        billed_duration:
          description: Billed call duration in seconds
          type: integer
        phone_number:
          description: 'The end user''s phone number: inbound caller or outbound recipient'
          type: string
        extracted_data:
          description: >-
            Data extracted from this call, as field name to value. Only this
            call's own answers.
          type: object
          example:
            promesa_pago: 'true'
            monto_prometido: '1000'
        recording_url:
          description: >-
            URL to fetch the call recording. null for failed calls and calls
            without audio.
          type: string
          nullable: true
          example: /api/v1.0/call/call_abc123def456/recording
    CallsPagination:
      type: object
      properties:
        has_next:
          type: boolean
        next_cursor:
          type: string
          nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Add `api-key YOUR_API_SECRET_KEY` as the value of the `Authorization`
        header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.