{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/heimster-ch/json-schema/heimster-ch-post-api-v1-telephony-calls-request-schema.json",
  "title": "PostApiV1TelephonyCallsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/heimster-ch-openapi-generated.yml#/components/schemas/PostApiV1TelephonyCallsRequest",
  "type": "object",
  "properties": {
    "callId": {
      "type": "string",
      "description": "The phone system's call id (idempotency key). Derived from agent + number + start when missing."
    },
    "number": {
      "type": "string",
      "description": "The external number."
    },
    "direction": {
      "type": "string",
      "description": "in | out (also inbound / outbound)."
    },
    "status": {
      "type": "string",
      "description": "answered | missed."
    },
    "callType": {
      "type": "string",
      "description": "Alternatively 3CX's Inbound | Outbound | Missed | Notanswered."
    },
    "start": {
      "type": "string",
      "description": "Call start: ISO-8601 or epoch milliseconds (default now)."
    },
    "duration": {
      "type": "string",
      "description": "Talk time in seconds or hh:mm:ss."
    },
    "agentEmail": {
      "type": "string",
      "description": "E‑mail of the agent (a member of your organisation)."
    },
    "agent": {
      "type": "string",
      "description": "Extension of the agent («Durchwahl»)."
    },
    "contactId": {
      "type": "string",
      "description": "The contact, when already known (e.g. from the lookup)."
    },
    "createContact": {
      "type": "boolean",
      "description": "Create a minimal contact for an unknown number (default false)."
    },
    "name": {
      "type": "string",
      "description": "Caller name for a created contact."
    },
    "note": {
      "type": "string",
      "description": "Note stored with the call."
    }
  },
  "required": [
    "number"
  ]
}