{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simple-ai/json-schema/simple-ai-external-call-list-response-schema.json",
  "title": "External Call List Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simple-ai-external-calls-api-openapi.yml#/components/schemas/ExternalCallListResponse",
  "type": "object",
  "required": [
    "external_calls",
    "total_count",
    "page",
    "page_size",
    "total_pages"
  ],
  "properties": {
    "external_calls": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExternalCallSummary"
      }
    },
    "total_count": {
      "type": "integer",
      "minimum": 0
    },
    "page": {
      "type": "integer",
      "minimum": 1
    },
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "total_pages": {
      "type": "integer",
      "minimum": 0
    }
  },
  "$defs": {
    "ExternalCallSource": {
      "type": "object",
      "required": [
        "id",
        "name",
        "provider"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        }
      },
      "title": "External Call Source"
    },
    "ExternalCallSummary": {
      "type": "object",
      "required": [
        "id",
        "external_call_id",
        "title",
        "direction",
        "from_number",
        "to_number",
        "duration_seconds",
        "started_at",
        "status",
        "recording_count",
        "source",
        "created_at",
        "updated_at",
        "recording_presigned_urls"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "external_call_id": {
          "type": "string"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "direction": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "inbound",
                "outbound"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "from_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "to_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "duration_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "started_at": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "type": "string",
          "enum": [
            "processing",
            "transcribed",
            "error"
          ]
        },
        "recording_count": {
          "type": "integer",
          "minimum": 0
        },
        "source": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExternalCallSource"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "recording_presigned_urls": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "description": "Presigned URLs for all playable recordings in chronological order. External calls can have multiple recordings per session. URLs expire after one hour. Deleted, excluded, and recordings awaiting required audio redaction are omitted; an empty array means no recordings are currently playable. If URL signing fails for a recording, its URL is omitted and the call data is still returned."
        }
      },
      "title": "External Call Summary"
    }
  }
}