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

# 列出組織完整通話歷史

> 查詢後台撥號、進線、人工通話、批次、自動化與公開 API 的留存歷史，包含已封存通話。排除技術用途的號碼檢測，以及沒有開始或建立時間的資料。source 表示資料來源，human 也可能包含 AI 進線。時間篩選依開始時間計算，缺少時使用建立時間。請沿用 next_cursor 直到分頁完成。歷史 ID 與可執行操作的通話 ID 不同。引用證據另需 transcripts:read。



## OpenAPI

````yaml /openapi/openapi.zh-Hant.yaml get /call-history
openapi: 3.1.0
info:
  title: Brightalk 公開 API
  version: '2026-07-16'
  description: 用於 AI 通話、批次撥號與儀表板管理之自動化定義的伺服器對伺服器 REST API。
  license:
    name: Brightalk API Terms
    identifier: LicenseRef-Brightalk-API
servers:
  - url: https://api.brightalk.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: 符合 API 使用資格且由儀表板管理的 AI 語音代理。
  - name: 自動化
    description: 由儀表板管理的自動化摘要。
  - name: Contacts
    description: 組織的聯絡人與外部識別。
  - name: Calls
    description: 立即執行的非同步 AI 通話及其純量結果。
  - name: 批次撥號
    description: 建立、排程及控制批次撥號，並查詢彙總狀態。
  - name: 自動化執行
    description: 建立及控制單一聯絡人的自動化執行。
  - name: Recordings
    description: 通話錄音的中繼資料，以及短效的簽名下載網址。
  - name: LINE messages
    description: 傳送文字給已綁定的聯絡人，並查詢發送紀錄。
paths:
  /call-history:
    get:
      tags:
        - Calls
      summary: 列出組織完整通話歷史
      description: >-
        查詢後台撥號、進線、人工通話、批次、自動化與公開 API
        的留存歷史，包含已封存通話。排除技術用途的號碼檢測，以及沒有開始或建立時間的資料。source 表示資料來源，human 也可能包含 AI
        進線。時間篩選依開始時間計算，缺少時使用建立時間。請沿用 next_cursor 直到分頁完成。歷史 ID 與可執行操作的通話 ID
        不同。引用證據另需 transcripts:read。
      operationId: listCallHistory
      parameters:
        - $ref: '#/components/parameters/BrightalkVersion'
        - $ref: '#/components/parameters/XRequestId'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/HistorySource'
        - $ref: '#/components/parameters/CallContactId'
        - $ref: '#/components/parameters/CreatedAfter'
        - $ref: '#/components/parameters/CreatedBefore'
      responses:
        '200':
          description: 已傳回目前的通話歷史或結果。
          headers:
            Brightalk-Version:
              $ref: '#/components/headers/Brightalk-Version'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallHistoryList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl --request GET 'https://api.brightalk.ai/call-history?limit=20'
            \
              --header "Authorization: Bearer $BRIGHTALK_API_KEY" \
              --header "Brightalk-Version: 2026-07-16"
        - lang: javascript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.brightalk.ai/call-history?limit=20", {
              method: "GET",
              headers: {
                Authorization: `Bearer ${process.env.BRIGHTALK_API_KEY}`,
                "Brightalk-Version": "2026-07-16",
              },
            });

            console.log(response.status, await response.json());
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            response = requests.request(
                "GET",
                "https://api.brightalk.ai/call-history?limit=20",
                headers={
                "Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
                "Brightalk-Version": "2026-07-16",
                },
            )
            print(response.status_code, response.json())
components:
  parameters:
    BrightalkVersion:
      name: Brightalk-Version
      in: header
      required: false
      description: 選擇以日期為基礎的 API 版本。省略時會使用組織固定的預設版本。
      schema:
        type: string
        const: '2026-07-16'
        default: '2026-07-16'
    XRequestId:
      name: X-Request-Id
      in: header
      required: false
      description: 由呼叫端產生且符合 [A-Za-z0-9._:-]{1,64} 的關聯值。無效值會被取代。
      schema:
        type: string
        pattern: ^[A-Za-z0-9._:-]{1,64}$
        maxLength: 64
    Limit:
      name: limit
      in: query
      required: false
      description: 要傳回的資源數量。預設為 20，上限為 100。
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    Cursor:
      name: cursor
      in: query
      required: false
      description: 前一頁傳回的不透明游標。
      schema:
        type: string
        minLength: 1
        maxLength: 2048
    HistorySource:
      name: source
      in: query
      required: false
      schema:
        type: string
        enum:
          - ai
          - human
    CallContactId:
      name: contact_id
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 255
        description: 不透明的資源識別碼。
        example: con_demo_001
    CreatedAfter:
      name: created_after
      in: query
      required: false
      schema:
        type: string
        format: date-time
    CreatedBefore:
      name: created_before
      in: query
      required: false
      schema:
        type: string
        format: date-time
  headers:
    Brightalk-Version:
      description: The date-based version applied to the request.
      required: true
      schema:
        type: string
        const: '2026-07-16'
    X-Request-Id:
      description: The accepted caller correlation value or a server-generated replacement.
      required: true
      schema:
        type: string
        pattern: ^[A-Za-z0-9._:-]{1,64}$
    RateLimit-Limit:
      description: The effective request allowance for the selected bucket.
      schema:
        type: integer
        minimum: 1
    RateLimit-Remaining:
      description: The nonnegative number of requests remaining in the selected bucket.
      schema:
        type: integer
        minimum: 0
    RateLimit-Reset:
      description: >-
        A nonnegative integer number of delta-seconds from response generation
        until the effective bucket resets; never an epoch timestamp.
      schema:
        type: integer
        minimum: 0
    Allow:
      description: A comma-separated list of methods allowed on the known path.
      schema:
        type: string
        example: GET, POST
    Retry-After:
      description: >-
        A nonnegative integer number of delta-seconds to wait before retrying;
        never an epoch timestamp.
      schema:
        type: integer
        minimum: 0
  schemas:
    CallHistoryList:
      type: object
      additionalProperties: false
      required:
        - data
        - next_cursor
      properties:
        data:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/CallHistoryEntry'
        next_cursor:
          type:
            - string
            - 'null'
    CallHistoryEntry:
      type: object
      properties:
        object:
          type: string
          const: call_history_entry
        id:
          type: string
          pattern: >-
            ^(?:ai|human)_[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
        source:
          type: string
          enum:
            - ai
            - human
        call_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        contact_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        direction:
          type: string
          enum:
            - inbound
            - outbound
            - unknown
        status:
          anyOf:
            - type: string
              pattern: ^[a-z][a-z0-9_]{0,63}$
            - type: 'null'
        occurred_at:
          type: string
          allOf:
            - pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - pattern: >-
                ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$
        connected_at:
          anyOf:
            - type: string
              allOf:
                - pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - pattern: >-
                    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$
            - type: 'null'
        ended_at:
          anyOf:
            - type: string
              allOf:
                - pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - pattern: >-
                    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$
            - type: 'null'
        duration_seconds:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
        is_archived:
          type: boolean
        result:
          $ref: '#/components/schemas/CallResult'
      required:
        - object
        - id
        - source
        - call_id
        - contact_id
        - direction
        - status
        - occurred_at
        - connected_at
        - ended_at
        - duration_seconds
        - is_archived
        - result
      additionalProperties: false
    ErrorEnvelope:
      type: object
      additionalProperties: false
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    CallResult:
      type: object
      properties:
        object:
          type: string
          const: call_result
        schema_version:
          type: string
          const: '2026-11-18'
        call_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: string
              pattern: >-
                ^(?:ai|human)_[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
        revision:
          type: string
          pattern: ^[a-f0-9]{64}$
          description: 此份回應內容的 SHA-256 指紋，供比較內容是否相同，不表示遞增順序。
        classification_status:
          type: string
          enum:
            - processing
            - ready
            - unavailable
          description: >-
            留存分類的可用狀態：ready 表示目前有有效分類；processing
            表示通話仍在進行或通話後摘要流程尚未完成，不保證分類器正在執行；unavailable
            表示目前沒有分類，包含摘要失敗的情況，後續分類仍可能更新。
        classification_unavailable_reason:
          anyOf:
            - type: string
              enum:
                - not_recorded
                - manually_corrected
            - type: 'null'
        poll_after_seconds:
          anyOf:
            - type: number
              const: 5
            - type: 'null'
        outcome:
          anyOf:
            - type: string
            - type: 'null'
        outcome_reason:
          anyOf:
            - type: string
            - type: 'null'
        conversation_result:
          anyOf:
            - $ref: '#/components/schemas/ConversationResult'
            - type: 'null'
        voicemail:
          $ref: '#/components/schemas/VoicemailResult'
      required:
        - object
        - schema_version
        - call_id
        - revision
        - classification_status
        - classification_unavailable_reason
        - poll_after_seconds
        - outcome
        - outcome_reason
        - conversation_result
        - voicemail
      additionalProperties: false
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          enum:
            - authentication_required
            - invalid_api_key
            - api_key_expired
            - organization_not_enabled
            - insufficient_scope
            - unsupported_version
            - validation_error
            - invalid_json
            - resource_not_found
            - resource_state_conflict
            - method_not_allowed
            - request_too_large
            - unsupported_destination
            - contact_identity_conflict
            - idempotency_key_required
            - idempotency_conflict
            - idempotency_in_progress
            - duplicate_active_run
            - rate_limit_exceeded
            - recipient_blocked_by_policy
            - internal_error
          example: validation_error
        message:
          type: string
          example: The request could not be validated.
        request_id:
          type: string
          pattern: ^[A-Za-z0-9._:-]{1,64}$
          example: req_demo_001
        details:
          $ref: '#/components/schemas/ErrorDetails'
      required:
        - code
        - message
        - request_id
    ConversationResult:
      type: object
      properties:
        version:
          type: string
          const: universal-v1
        code:
          type: string
          enum:
            - agreed_human_contact
            - booking_requested
            - booking_confirmed
            - attendance_confirmed
            - reschedule_requested
            - cancellation_requested
            - information_requested
            - considering
            - no_current_need
            - declined
            - do_not_contact
            - temporarily_unavailable
            - callback_requested
            - customer_will_contact
            - unclear_intent
            - no_effective_response
            - service_resolved
            - service_pending
            - gatekeeper_reached
            - wrong_contact
            - voicemail_reached
            - unable_to_determine
        reason:
          type: string
          minLength: 1
          maxLength: 240
        evidence:
          maxItems: 3
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 300
          description: 只有具備 transcripts:read 才提供引用證據；空陣列表示分類器沒有提供引文。
      required:
        - version
        - code
        - reason
      additionalProperties: false
    VoicemailResult:
      type: object
      properties:
        detected:
          anyOf:
            - type: boolean
            - type: 'null'
          description: null 表示沒有留存的判定依據，不等於否；只有人工明確修正為非語音信箱時才回傳 false。
        source:
          type: string
          enum:
            - operator
            - transcript_analysis
            - call_signal
            - unknown
        message_status:
          type: string
          enum:
            - reported_complete
            - failed
            - unknown
          description: reported_complete 只表示執行端回報留言流程完成，不證明完整播放或留言送達；歷史缺漏的回報維持 unknown。
      required:
        - detected
        - source
        - message_status
      additionalProperties: false
    ErrorDetails:
      type: object
      additionalProperties: false
      properties:
        reason:
          type: string
          description: LINE 資源衝突原因。此時尚未建立發送紀錄；請修正綁定或頻道設定後重試。
          enum:
            - line_multiple_accounts
            - line_not_following
            - line_not_linked
            - line_recipient_invalid
            - line_channel_missing
        fields:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/ErrorField'
        truncated:
          type: boolean
          const: true
        supported_versions:
          type: array
          items:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        existing_run_id:
          type: string
          minLength: 1
          maxLength: 255
          description: 不透明的資源識別碼。
          example: run_demo_001
    ErrorField:
      type: object
      additionalProperties: false
      properties:
        path:
          type: string
          example: recipient.phone_number
        code:
          type: string
          example: invalid_e164
      required:
        - path
        - code
  responses:
    BadRequest:
      description: 版本、請求、查詢或與狀態無關的目的地驗證失敗。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            validationError:
              value:
                error:
                  code: validation_error
                  message: The request could not be validated.
                  request_id: req_demo_001
                  details:
                    fields:
                      - path: recipient.phone_number
                        code: invalid_e164
            unsupportedVersion:
              value:
                error:
                  code: unsupported_version
                  message: The requested API version is not supported.
                  request_id: req_demo_001
                  details:
                    supported_versions:
                      - '2026-07-16'
            unsupportedDestination:
              value:
                error:
                  code: unsupported_destination
                  message: The destination is not supported.
                  request_id: req_demo_001
    Unauthorized:
      description: 身分驗證失敗。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            missingBearer:
              value:
                error:
                  code: authentication_required
                  message: Authentication is required.
                  request_id: req_demo_001
            malformedBearer:
              value:
                error:
                  code: authentication_required
                  message: Authentication is required.
                  request_id: req_demo_001
            unknownOrRevokedCredential:
              value:
                error:
                  code: invalid_api_key
                  message: The API key is invalid.
                  request_id: req_demo_001
            expiredCredential:
              value:
                error:
                  code: api_key_expired
                  message: The API key has expired.
                  request_id: req_demo_001
    Forbidden:
      description: 此請求未獲授權執行這項 API 操作。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            organizationNotEnabled:
              value:
                error:
                  code: organization_not_enabled
                  message: The organization is not enabled for the Public API.
                  request_id: req_demo_001
            insufficientScope:
              value:
                error:
                  code: insufficient_scope
                  message: The API key does not have the required scope.
                  request_id: req_demo_001
    MethodNotAllowed:
      description: 路徑已知，但不允許使用此方法。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Allow:
          $ref: '#/components/headers/Allow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            methodNotAllowed:
              value:
                error:
                  code: method_not_allowed
                  message: The method is not allowed for this resource.
                  request_id: req_demo_001
    TooManyRequests:
      description: 所選的請求配額群組已用盡。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            rateLimitExceeded:
              value:
                error:
                  code: rate_limit_exceeded
                  message: The rate limit has been exceeded.
                  request_id: req_demo_001
    InternalError:
      description: 無法安全完成請求。
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            internalError:
              value:
                error:
                  code: internal_error
                  message: An unexpected error occurred.
                  request_id: req_demo_001
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Brightalk API key
      description: Use a server-side Brightalk API key in the Authorization header.

````

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