AMD

Get an AMD decision

The full decision for one call: answered_by, answered_by_twilio, confidence, decision_ms, and the word-level reason. Requires amd:read.

get/v1/amd/calls/{call_id}

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/amd/calls/{call_id}
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Path parameters

call_idstring required

Response

AMD decision detail

objectstring
call_idstring
session_labelstring nullable

The opaque tag passed on the connect URL / TwiML, if any.

status'completed' | 'failed'
answered_by'human' | 'machine' | 'voicemail' | 'live_voicemail' | 'screening' | 'ivr' | 'music' | 'human_gatekeeper' | 'sit_invalid' | 'fax' | 'silence' | 'unknown'

PyAI's richer answered-by vocabulary. machine means an automated answer without an established subtype; it does not establish voicemail readiness or authorize hanging up. screening = an iPhone/Google call-screening assistant; sit_invalid = a dead/disconnected number.

answered_by_twiliostring nullable

Twilio's exact AnsweredBy enum (human | machine_start | machine_end_beep | machine_end_silence | machine_end_other | fax | unknown), so a Twilio drop-in keeps its routing logic unchanged.

confidencenumber nullable
decision_msnumber nullable

Processed inbound audio through the decision, in ms; not elapsed time from carrier answer.

created_atinteger

Unix ms when the decision was written.

engine_versionstring

Decision-policy identity.

rule_idstring

Stable decision rule identifier.

decision_timeout_msinteger

Requested elapsed decision budget. Present when explicitly configured on the stream.

decision_elapsed_msinteger

Elapsed milliseconds from accepted authenticated start to result preparation; excludes webhook transport. Present when decision_timeout_ms was requested.

speech_msinteger nullable

Cumulative voiced audio excluding pauses; null if untracked.

silence_msinteger

Current contiguous silence in ms.

speech_elapsed_msinteger nullable

Audio since speech onset including pauses; null without onset.

thresholdsobject

Effective decision thresholds and rule flags.

reasonstring nullable

Human-readable evidence, e.g. "machine phrase: 'please leave a message' at 1.2s".

aggressivenessnumber nullable

Operating point used for this call.

custom_parametersAmdCustomParameters

Customer correlation parameters, excluding reserved controls and credentials. Names match [A-Za-z0-9][A-Za-z0-9_.-]{0,63}. Each value is bounded to 1024 UTF-8 bytes, and all names plus values to 8192 UTF-8 bytes; character limits alone do not express these byte limits. Nested fields never override AMD result fields.

started_atinteger nullable

Unix ms when the call was answered.

metaobject nullable
errorstring nullable

Present when status is failed.

Example response

{
  "object": "amd.call",
  "custom_parameters": {
    "lead_id": "lead-42",
    "campaign_id": "campaign-7"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.