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

# 通話を取得する

> 1件の通話の状況・結果・料金・文字起こしを返します。



## OpenAPI

````yaml GET /calls/{id}
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/{id}:
    get:
      tags:
        - 通話
      summary: 通話を取得する
      description: 1件の通話の状況・結果・料金・文字起こしを返します。
      operationId: getCall
      parameters:
        - name: id
          in: path
          required: true
          description: 通話のID
          schema:
            type: string
        - name: include_transcript
          in: query
          description: '`false` で文字起こしを省く'
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: 通話
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Call'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '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:
    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'
    NotFound:
      description: >-
        見つかりません（`not_found` `call_not_found` `agent_not_found`
        `webhook_not_found`）。
      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.