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

# 通話の一覧

> 通話を新しい順に返します。次のページは `next_cursor` を `cursor` に渡して取得します。



## OpenAPI

````yaml GET /calls
openapi: 3.1.0
info:
  title: AIコール API
  version: '1.0'
  description: 自社のシステムからAIエージェントで電話をかけ、通話の結果を受け取るためのAPIです。
servers:
  - url: https://api.ai-call.co
security:
  - bearerAuth: []
tags:
  - name: 通話
  - name: エージェント・電話番号
  - name: Webhook
paths:
  /calls:
    get:
      tags:
        - 通話
      summary: 通話の一覧
      description: 通話を新しい順に返します。次のページは `next_cursor` を `cursor` に渡して取得します。
      operationId: listCalls
      parameters:
        - name: limit
          in: query
          description: 1ページの件数（1〜100）
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: cursor
          in: query
          description: 前の応答の `next_cursor`
          schema:
            type: string
        - name: agent_id
          in: query
          description: このAIエージェントの通話だけ
          schema:
            type: string
        - name: direction
          in: query
          description: '`inbound`（受電）か `outbound`（架電）'
          schema:
            type: string
            enum:
              - inbound
              - outbound
        - name: result
          in: query
          description: 結果で絞り込む（例：`completed`、`no_answer`）
          schema:
            type: string
        - name: created_after
          in: query
          description: この日時以降（ISO 8601）
          schema:
            type: string
            format: date-time
        - name: created_before
          in: query
          description: この日時より前（ISO 8601）
          schema:
            type: string
            format: date-time
        - name: include_transcript
          in: query
          description: 文字起こしも返す
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: 通話の一覧
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Call'
                  has_more:
                    type: boolean
                  next_cursor:
                    type:
                      - string
                      - 'null'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    Call:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        ended_at:
          type:
            - string
            - 'null'
          format: date-time
        direction:
          type:
            - string
            - 'null'
          enum:
            - inbound
            - outbound
            - null
        status:
          type:
            - string
            - 'null'
          description: >-
            `queued` `dialing` `initiated` `answered` `active` `ended` `failed`
            `canceled`
        result:
          type:
            - string
            - 'null'
          description: >-
            `calling` `connected` `completed` `no_answer` `busy` `rejected`
            `canceled` `invalid_number` `failed` `timeout` `voicemail`
            `unknown`（未確定は null）
        duration_seconds:
          type:
            - number
            - 'null'
        from:
          type:
            - string
            - 'null'
        to:
          type:
            - string
            - 'null'
        agent:
          $ref: '#/components/schemas/AgentRef'
        purpose:
          type:
            - string
            - 'null'
        contact:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
            company:
              type:
                - string
                - 'null'
            email:
              type:
                - string
                - 'null'
        variables:
          type: object
          additionalProperties:
            type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        cost_yen:
          type:
            - number
            - 'null'
          description: 請求額（税抜）。精算前は null
        failure_reason:
          type:
            - string
            - 'null'
        hangup_cause:
          type:
            - string
            - 'null'
        transfer:
          type:
            - object
            - 'null'
          properties:
            status:
              type: string
            target_name:
              type:
                - string
                - 'null'
        do_not_call_requested:
          type: boolean
          description: 相手から今後の電話を断られた
        placed_via:
          type:
            - string
            - 'null'
          description: '`api` など'
        transcript:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                  - ai
                  - caller
              text:
                type: string
              at:
                type:
                  - string
                  - 'null'
                format: date-time
    AgentRef:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: 機械で判断するための英字のコード
              example: do_not_call
            message:
              type: string
              description: 日本語の説明
              example: この番号は架電しない設定です。
  responses:
    BadRequest:
      description: >-
        入力が正しくありません（`invalid_request` `invalid_json` `invalid_number`
        `invalid_email` `invalid_url` `invalid_cursor`
        `idempotency_key_required`）。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: APIキーがないか無効です（`missing_api_key` `invalid_api_key`）。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: このAPIキーに必要な権限がありません（`insufficient_scope`）。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: 回数の上限を超えました（`rate_limited`）。少し待って再試行してください。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 管理画面「設定 → API」で作成したAPIキー（`aic_sk_…`）。

````

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