Twilio · Schema

Twilio Call

Represents a voice call made to or from a Twilio account, including call status, duration, pricing, and related metadata.

AuthenticationCommunicationsContact CenterEmailIoTMessagingPhoneSMST1VerificationVideoVoice

Properties

Name Type Description
sid string Unique 34-character identifier for the call
account_sid string SID of the Twilio account that created the call
parent_call_sid stringnull SID of the parent call if this is a child call leg
to string Phone number, SIP URI, or client identifier that received the call
to_formatted string Formatted version of the To number
from string Phone number or client identifier that initiated the call
from_formatted string Formatted version of the From number
phone_number_sid stringnull SID of the Twilio phone number used
status string Current status of the call
direction string Direction of the call
price stringnull Price of the call in the account currency
price_unit string ISO 4217 currency code
duration stringnull Duration of the call in seconds
start_time stringnull ISO 8601 timestamp when the call started
end_time stringnull ISO 8601 timestamp when the call ended
answered_by stringnull Whether the call was answered by a human or machine
caller_name stringnull Caller name from CNAM lookup
forwarded_from stringnull Number that forwarded the inbound call
group_sid stringnull SID identifying the call group
queue_time stringnull Time the call spent in queue in milliseconds
trunk_sid stringnull SID of the SIP trunk used for the call
date_created string ISO 8601 timestamp when the resource was created
date_updated string ISO 8601 timestamp when the resource was last updated
api_version string Twilio API version used
uri string Relative URI for this call resource
subresource_uris object URIs of related subresources
View JSON Schema on GitHub

JSON Schema

twilio-call-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.twilio.com/docs/schemas/twilio/call.json",
  "title": "Twilio Call",
  "description": "Represents a voice call made to or from a Twilio account, including call status, duration, pricing, and related metadata.",
  "type": "object",
  "properties": {
    "sid": {
      "type": "string",
      "pattern": "^CA[0-9a-fA-F]{32}$",
      "description": "Unique 34-character identifier for the call"
    },
    "account_sid": {
      "type": "string",
      "pattern": "^AC[0-9a-fA-F]{32}$",
      "description": "SID of the Twilio account that created the call"
    },
    "parent_call_sid": {
      "type": ["string", "null"],
      "pattern": "^CA[0-9a-fA-F]{32}$",
      "description": "SID of the parent call if this is a child call leg"
    },
    "to": {
      "type": "string",
      "description": "Phone number, SIP URI, or client identifier that received the call"
    },
    "to_formatted": {
      "type": "string",
      "description": "Formatted version of the To number"
    },
    "from": {
      "type": "string",
      "description": "Phone number or client identifier that initiated the call"
    },
    "from_formatted": {
      "type": "string",
      "description": "Formatted version of the From number"
    },
    "phone_number_sid": {
      "type": ["string", "null"],
      "pattern": "^PN[0-9a-fA-F]{32}$",
      "description": "SID of the Twilio phone number used"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "ringing",
        "in-progress",
        "canceled",
        "completed",
        "failed",
        "busy",
        "no-answer"
      ],
      "description": "Current status of the call"
    },
    "direction": {
      "type": "string",
      "enum": [
        "inbound",
        "outbound-api",
        "outbound-dial"
      ],
      "description": "Direction of the call"
    },
    "price": {
      "type": ["string", "null"],
      "description": "Price of the call in the account currency"
    },
    "price_unit": {
      "type": "string",
      "description": "ISO 4217 currency code"
    },
    "duration": {
      "type": ["string", "null"],
      "description": "Duration of the call in seconds"
    },
    "start_time": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "ISO 8601 timestamp when the call started"
    },
    "end_time": {
      "type": ["string", "null"],
      "format": "date-time",
      "description": "ISO 8601 timestamp when the call ended"
    },
    "answered_by": {
      "type": ["string", "null"],
      "enum": ["human", "machine", null],
      "description": "Whether the call was answered by a human or machine"
    },
    "caller_name": {
      "type": ["string", "null"],
      "description": "Caller name from CNAM lookup"
    },
    "forwarded_from": {
      "type": ["string", "null"],
      "description": "Number that forwarded the inbound call"
    },
    "group_sid": {
      "type": ["string", "null"],
      "description": "SID identifying the call group"
    },
    "queue_time": {
      "type": ["string", "null"],
      "description": "Time the call spent in queue in milliseconds"
    },
    "trunk_sid": {
      "type": ["string", "null"],
      "description": "SID of the SIP trunk used for the call"
    },
    "date_created": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the resource was created"
    },
    "date_updated": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the resource was last updated"
    },
    "api_version": {
      "type": "string",
      "description": "Twilio API version used"
    },
    "uri": {
      "type": "string",
      "description": "Relative URI for this call resource"
    },
    "subresource_uris": {
      "type": "object",
      "description": "URIs of related subresources",
      "properties": {
        "recordings": {
          "type": "string"
        },
        "notifications": {
          "type": "string"
        },
        "feedback": {
          "type": "string"
        },
        "feedback_summaries": {
          "type": "string"
        },
        "payments": {
          "type": "string"
        },
        "events": {
          "type": "string"
        }
      }
    }
  },
  "required": ["sid", "account_sid", "to", "from", "status", "direction"]
}