{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/voxplo-ai/json-schema/voxplo-ai-agent-call-schema.json",
  "title": "AgentCall",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/voxplo-ai-openapi.json#/components/schemas/AgentCall",
  "type": "object",
  "required": [
    "id",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The call ID."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "dialing",
        "in_progress",
        "completed",
        "no_answer",
        "voicemail",
        "declined",
        "failed"
      ],
      "description": "Current call status."
    },
    "to": {
      "type": [
        "string",
        "null"
      ],
      "description": "Destination number (E.164)."
    },
    "objective": {
      "type": [
        "string",
        "null"
      ],
      "description": "The objective you supplied."
    },
    "voice": {
      "type": [
        "string",
        "null"
      ],
      "description": "The voice the AI used on the call."
    },
    "language": {
      "type": [
        "string",
        "null"
      ],
      "description": "The language the AI spoke (BCP-47, e.g. en-US)."
    },
    "languageSource": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "explicit",
        "inferred",
        "auto"
      ],
      "description": "How the language was chosen."
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "description": "Plain-English summary. Set on completed."
    },
    "transcript": {
      "type": [
        "string",
        "null"
      ],
      "description": "Full transcript of the conversation."
    },
    "extracted": {
      "type": [
        "object",
        "null"
      ],
      "description": "Extracted field values keyed by field name.",
      "additionalProperties": true
    },
    "recordingUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "Authenticated URL to the call recording."
    },
    "startedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO 8601 timestamp when the call was answered."
    },
    "endedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "ISO 8601 timestamp when the call ended."
    },
    "durationSec": {
      "type": [
        "number",
        "null"
      ],
      "description": "Call duration in seconds."
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Error token on failed calls."
    }
  }
}