> ## 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.

# Download Calls

> Download call records for a campaign as an exported file.

Use the request body to filter which calls to include:
- **start** / **end**: Date range filter.
- **status**: Filter by call status.
- **callIds**: Download only the specified call record IDs.
- **search**: Filter by search term.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/campaigns/api.json post /campaigns/v1/campaigns/{config_id}/calls/download
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:
  /campaigns/v1/campaigns/{config_id}/calls/download:
    post:
      tags:
        - Campaigns Calls
        - Campaign Calls
      summary: Download Calls
      description: |-
        Download call records for a campaign as an exported file.

        Use the request body to filter which calls to include:
        - **start** / **end**: Date range filter.
        - **status**: Filter by call status.
        - **callIds**: Download only the specified call record IDs.
        - **search**: Filter by search term.
      operationId: >-
        campaigns_service_download_calls_route_v1_campaigns__config_id__calls_download_post
      parameters:
        - name: config_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PydanticObjectId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadCallsBody'
      responses:
        '200':
          description: Call records matching the filter criteria
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadCallsResponse'
        '400':
          description: Bad request — invalid input or constraint violation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Requested resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer: []
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    DownloadCallsBody:
      properties:
        start:
          type: string
          title: Start
        end:
          type: string
          title: End
        status:
          type: string
          title: Status
        callType:
          type: string
          title: Calltype
        callIds:
          items: {}
          type: array
          title: Callids
          default: []
        teamId:
          type: string
          title: Teamid
        search:
          type: string
          title: Search
      type: object
      title: DownloadCallsBody
    DownloadCallsResponse:
      properties:
        message:
          type: string
          title: Message
          description: Result description
          examples:
            - Calls fetched successfully.
        data:
          $ref: '#/components/schemas/DownloadCallsData'
          description: Download result container
      type: object
      required:
        - message
        - data
      title: DownloadCallsResponse
    ErrorResponse:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error description
          examples:
            - Resource not found.
      type: object
      required:
        - message
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DownloadCallsData:
      properties:
        calls:
          items:
            $ref: '#/components/schemas/CampaignCallResponse'
          type: array
          title: Calls
          description: Call records matching the filter criteria
      type: object
      required:
        - calls
      title: DownloadCallsData
    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
    CampaignCallResponse:
      properties:
        _id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Unique call record identifier
        configId:
          anyOf:
            - type: string
            - type: 'null'
          title: Configid
          description: ID of the campaign configuration this call belongs to
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: Target phone number for this call
        status:
          type: string
          title: Status
          description: >-
            Current call status. Possible values: 'received', 'ready', 'queued',
            'ringing', 'processing', 'ended', 'completed', 'failed'
          default: received
        outcome:
          anyOf:
            - type: string
            - type: 'null'
          title: Outcome
          description: >-
            Call outcome label set by the AI assistant (e.g. 'conveyed',
            'voicemail', 'no_answer', 'callback_requested')
        errorCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Errorcode
          description: Error code when the call status is 'failed'
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
          description: Human-readable error description when the call failed
        collectedInformation:
          additionalProperties: true
          type: object
          title: Collectedinformation
          description: >-
            Structured data collected by the AI assistant during the call
            conversation
        conversationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversationid
          description: Unique conversation identifier assigned by the AI assistant platform
        retryCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retrycount
          description: Number of retry attempts made for this call so far
        maxRetries:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxretries
          description: Maximum number of retry attempts allowed for this call
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Tags attached to this call for filtering
        review:
          anyOf:
            - $ref: '#/components/schemas/Review'
            - type: 'null'
          description: >-
            Manual review details. review.status values: 'not_required',
            'pending', 'in_progress', 'rejected', 'approved'
        processTimings:
          anyOf:
            - $ref: >-
                #/components/schemas/campaigns_service__src__models__BenefitsVerificationCalls__ProcessTimings
            - type: 'null'
          description: 'Actual call execution timestamps: startAt and endAt (ISO 8601 UTC)'
        statusHistory:
          anyOf:
            - items:
                $ref: '#/components/schemas/StatusHistory-Output'
              type: array
            - type: 'null'
          title: Statushistory
          description: >-
            Chronological list of status transitions with timestamps and
            optional reasons
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
          description: UTC timestamp when this call record was created
        updatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatedat
          description: UTC timestamp of the most recent update to this call record
      type: object
      title: CampaignCallResponse
      description: Public-facing call fields returned in API responses.
    Review:
      properties:
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Review status
          default: not_required
        by:
          anyOf:
            - $ref: '#/components/schemas/PydanticObjectId'
            - type: 'null'
          description: Reviewer identifier
        timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Timestamp
          description: Review timestamp
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Review reason
        emails:
          items:
            type: string
          type: array
          title: Emails
          description: List of notification emails
        emailSent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Emailsent
          description: Whether notification email was sent
          default: false
        emailSentAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Emailsentat
          description: Timestamp of email sent
        checklist:
          additionalProperties: true
          type: object
          title: Checklist
          description: Review checklist items
      type: object
      title: Review
      description: Represents the review details for a call.
    campaigns_service__src__models__BenefitsVerificationCalls__ProcessTimings:
      properties:
        startAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startat
          description: Process start timestamp
        endAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Endat
          description: Process end timestamp
      type: object
      title: ProcessTimings
      description: Presents the actual timings of the call process.
    StatusHistory-Output:
      properties:
        status:
          type: string
          title: Status
          description: Current status of the call
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: Timestamp when status was updated
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Reason for status change
      type: object
      required:
        - status
        - timestamp
      title: StatusHistory
      description: Represents the history of status changes for a call.
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````