{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cekura-ai/json-schema/cekura-ai-create-call-log-schema.json",
  "title": "CreateCallLog",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cekura-ai-observability-api-openapi.yml#/components/schemas/CreateCallLog",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "call_id": {
      "type": "string",
      "description": "Unique identifier for the call.\nExample: \n- `\"call_abc123xyz\"`\n- `\"stereo_audio_session_456\"`",
      "maxLength": 100
    },
    "trace_id": {
      "type": "string",
      "default": "",
      "description": "OpenTelemetry trace ID (32-char hex string). Example: \"4bf92f3577b34da6a3ce929d0e0e4736\"",
      "maxLength": 32
    },
    "logs": {
      "writeOnly": true,
      "description": "\nExecution logs for this call: a list of entries, oldest first. Stored outside the\ncall record and read back from the call log's logs endpoint.\n\nEach entry is an object with:\n\n- `message` (required) — what happened, as a single line.\n- `ts` (optional) — when it happened. ISO 8601, a unix timestamp, or seconds\n  into the call (`0`, `4.5`). Shown as a time column.\n- `logger` (optional) — the component that emitted the line, e.g. `pipeline`,\n  `transcriber`, `my.app.tools`. Shown as its own column, and only when at\n  least one entry has it.\n- `level` (optional) — `info`, `warn`, `error`, `debug`, or your own label.\n- `raw` (optional) — an object holding any extra detail for that entry. It is\n  hidden by default and shown when the entry is expanded in the dashboard, so put\n  payloads, IDs and diagnostics here rather than in `message`.\n\nAny other keys you send on an entry are folded into `raw`.\n\nExample:\n```json\n[\n   {\n      \"ts\": \"2026-09-02T10:00:01.120Z\",\n      \"logger\": \"session\",\n      \"level\": \"info\",\n      \"message\": \"Session started\"\n   },\n   {\n      \"ts\": 4.5,\n      \"logger\": \"transcriber\",\n      \"level\": \"info\",\n      \"message\": \"Final transcript | provider=deepgram confidence=0.98\"\n   },\n   {\n      \"ts\": \"00:07\",\n      \"logger\": \"tools\",\n      \"level\": \"error\",\n      \"message\": \"Tool call failed: get_order timed out after 5s\",\n      \"raw\": {\n         \"tool\": \"get_order\",\n         \"timeout_ms\": 5000,\n         \"request\": {\"order_id\": \"ORD-12345\"},\n         \"error\": \"ETIMEDOUT\"\n      }\n   },\n   {\n      \"ts\": \"00:09\",\n      \"logger\": \"session\",\n      \"level\": \"info\",\n      \"message\": \"Session ended\"\n   }\n]\n```\n"
    },
    "agent": {
      "type": "integer",
      "description": "\nAgent ID, required if assistant_id not provided\nExample: `2421`\n"
    },
    "assistant_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "\nProvider's Assistant ID, required if agent not provided\nExample: \n- `\"asst_abc123xyz\"`\n- `\"agent_xyz789\"`\n"
    },
    "voice_recording": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Audio recording file of the call.\nExample: Binary data `\"recordings/call_123_20240315.mp3\"`"
    },
    "voice_recording_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "\nURL to call recording audio file\nExample: `\"https://storage.example.com/recordings/call_123.mp3\"`\n"
    },
    "transcript_type": {
      "enum": [
        "cekura",
        "vocera",
        "vapi",
        "retell",
        "deepgram",
        "pipecat",
        "livekit",
        "elevenlabs",
        "bland",
        "none-mono"
      ],
      "type": "string",
      "x-spec-enum-id": "5bd44c2413a0d481",
      "writeOnly": true,
      "description": "Format of the `transcript_json` payload. Tells Cekura how to parse roles and timestamps.\n\n- `vapi` — Vapi webhook format: `[{\"role\": \"bot\"|\"user\", \"message\": \"...\", \"time\": 0.0}]`\n- `retell` — Retell webhook format\n- `elevenlabs` — ElevenLabs format\n- `bland` — Bland call-detail format, or its `transcripts` array\n- `livekit` — LiveKit format\n- `pipecat` — Pipecat format\n- `deepgram` — Deepgram format\n- `cekura` (default) — `[{\"role\": \"Testing Agent\"|\"Main Agent\", \"content\": \"...\", \"start_time\": 0.0, \"end_time\": 2.5}]`. **Valid roles are `\"Testing Agent\"` and `\"Main Agent\"` only** — using `\"agent\"` or `\"user\"` will return a validation error.\n- `none-mono` — mono audio with no transcript; Cekura generates the transcript automatically.\n\nOmit this field to use the default Cekura format.\n\n* `cekura` - cekura\n* `vocera` - vocera\n* `vapi` - vapi\n* `retell` - retell\n* `deepgram` - deepgram\n* `pipecat` - pipecat\n* `livekit` - livekit\n* `elevenlabs` - elevenlabs\n* `bland` - bland\n* `none-mono` - none-mono"
    },
    "transcript_json": {
      "description": "\nCall transcript in supported format (Vapi, Retell, Deepgram, ElevenLabs, Cekura)\n\nCheck the [Transcript Format](/documentation/advanced/transcript-format) documentation for more details.\n\nCekura Transcript Format Example:\n```json\n[\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Hello.\",\n      \"end_time\": 1.9399999,\n      \"start_time\": 1.4399999\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"Hello. I want to book appointment today. My name is John.\",\n      \"end_time\": 7.539999511718751,\n      \"start_time\": 3.1\n   },\n   {\n      \"role\": \"Testing Agent\",\n      \"content\": \"Well, I mean, sure. What time exactly are we talking about here\",\n      \"end_time\": 15.71,\n      \"start_time\": 12.01\n   },\n   {\n      \"role\": \"Main Agent\",\n      \"content\": \"6 PM.\",\n      \"end_time\": 18.269999,\n      \"start_time\": 17.609999\n   }\n]\n```\n"
    },
    "reconcile_with_cekura_transcript": {
      "type": [
        "boolean",
        "null"
      ],
      "writeOnly": true,
      "description": "Per-request override of the project's `reconcile_transcripts_with_cekura` setting. Omit (or send null) to use the project setting. `true` requires both a recording and a provider transcript: for dual-channel audio Cekura transcribes the recording and publishes its speaker-exact transcript (keeping the provider's tool and system events) before metrics run; mono audio and transcription failures keep the provider transcript. `false` keeps the provider transcript even when the project setting is on. Billed per minute of audio at the reconciliation rate whenever a Cekura transcript is published."
    },
    "call_ended_reason": {
      "type": [
        "string",
        "null"
      ],
      "description": "\nReason why the call ended\nExample: \n- `\"customer-ended-call\"`\n- `\"agent-ended-call\"`\n"
    },
    "customer_number": {
      "type": [
        "string",
        "null"
      ],
      "description": "\nCustomer's phone number or identifier\nExample: \n- `\"+1234567890\"`\n- `\"customer_abc123\"`\n"
    },
    "metadata": {
      "description": "\nAdditional call metadata\nExample:\n```json\n{\n    \"customer_id\": \"123\",\n    \"order_id\": \"ORD-12345\",\n    \"name\": \"John Doe\"\n}\n```\n"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "When the call occurred.\nExample: `2024-03-15T10:15:45Z`"
    },
    "dynamic_variables": {
      "description": "\nDynamic variables used to replace {{variables}} in agent description.\nExample:\n```json\n{\n    \"subscription_id\": \"SUB-12345\",\n    \"product_type\": \"premium\"\n}\n```\n"
    },
    "feedback": {
      "type": [
        "string",
        "null"
      ],
      "description": "\nFeedback about the call\nExample: `\"Great call\"`\n"
    },
    "redact_fields": {
      "type": "array",
      "items": {
        "enum": [
          "person_name",
          "age",
          "phone_number",
          "email_address",
          "date",
          "time",
          "location",
          "origin",
          "gender_sexuality",
          "physical_attribute",
          "occupation",
          "username",
          "password",
          "ip_address",
          "url",
          "filename",
          "event",
          "vehicle_id",
          "dob",
          "healthcare_number",
          "medical_professional",
          "credit_card",
          "account_number",
          "bank_account",
          "money",
          "ssn",
          "passport_number",
          "driver_license",
          "numerical_pii"
        ],
        "type": "string",
        "description": "* `person_name` - person_name\n* `age` - age\n* `phone_number` - phone_number\n* `email_address` - email_address\n* `date` - date\n* `time` - time\n* `location` - location\n* `origin` - origin\n* `gender_sexuality` - gender_sexuality\n* `physical_attribute` - physical_attribute\n* `occupation` - occupation\n* `username` - username\n* `password` - password\n* `ip_address` - ip_address\n* `url` - url\n* `filename` - filename\n* `event` - event\n* `vehicle_id` - vehicle_id\n* `dob` - dob\n* `healthcare_number` - healthcare_number\n* `medical_professional` - medical_professional\n* `credit_card` - credit_card\n* `account_number` - account_number\n* `bank_account` - bank_account\n* `money` - money\n* `ssn` - ssn\n* `passport_number` - passport_number\n* `driver_license` - driver_license\n* `numerical_pii` - numerical_pii",
        "x-spec-enum-id": "99d2b7efd95189c4"
      },
      "description": "\nOptional list of sensitive fields to redact from the transcript and audio. Overrides the agent's configured redaction fields for this call; when omitted, the agent's configuration applies.\nAvailable fields include: phone_number, email_address, credit_card, ssn, dob, healthcare_number, etc.\nNote: Redacting any fields incurs a cost of 0.1 credits per minute by default, regardless of how many fields are selected.\nExample: `[\"phone_number\", \"email_address\", \"credit_card\"]`\n"
    },
    "metric_ids": {
      "type": "string",
      "writeOnly": true,
      "description": "Comma-separated metric IDs to evaluate for this call. Example: \"118,119\". To run metrics after the call is created, use the evaluate_metrics endpoint instead."
    },
    "main_agent_channel_index": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Channel index (0 or 1) of the main agent in stereo recordings. When provided, skips automatic channel detection. Example: `0` means channel 0 is the main agent, channel 1 is the customer/testing agent."
    }
  },
  "required": [
    "call_id"
  ]
}