Twilio: Retrieves a collection of calls made to and from your account
Twilio call.listCall: arguments, response, policy and SDK examples.
← Call operations · Get started
Operation twilio.listcall
Provider route: GET /2010-04-01/Accounts/{AccountSid}/Calls.json. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/twilio with npm, or alter-sdk-twilio with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { TwilioIntegration } from "@alter-ai/twilio";
async function execute(input: Parameters<TwilioIntegration["call"]["listCall"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new TwilioIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.call.listCall(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_twilio import TwilioIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = TwilioIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.call.list_call(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.AccountSid | string | Required within parent | Maximum length: 34 Minimum length: 34 Pattern: ^AC[0-9a-fA-F]{32}$ |
query | object | Optional | Additional keys: not allowed |
query.To | string | Optional | Format: phone-number |
query.From | string | Optional | Format: phone-number |
query.ParentCallSid | string | Optional | Maximum length: 34 Minimum length: 34 Pattern: ^CA[0-9a-fA-F]{32}$ |
query.Status | string | Optional | The status of this call. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy` or `no-answer`. See [Call Status Values](https://www.twilio.com/docs/voice/api/call-resource#call-status-values) below for more information. One of: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled |
query.StartTime | string | Optional | Format: date-time |
query.StartTime< | string | Optional | Format: date-time |
query.StartTime> | string | Optional | Format: date-time |
query.EndTime | string | Optional | Format: date-time |
query.EndTime< | string | Optional | Format: date-time |
query.EndTime> | string | Optional | Format: date-time |
query.PageSize | integer | Optional | Format: int64 Maximum: 1000 Minimum: 1 |
query.Page | integer | Optional | Minimum: 0 |
query.PageToken | string | Optional |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
calls | array | Optional | |
calls[] | Model | Each item | Expand Initiates a call redirect or terminates a call — response body |
end | JSON | Optional | |
end (anyOf 1) | integer | Alternative | |
end (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
first_page_uri | string | Optional | Format: uri |
next_page_uri | JSON | Optional | |
next_page_uri (anyOf 1) | string | Alternative | Format: uri |
next_page_uri (anyOf 2) | null | Alternative | |
page | JSON | Optional | |
page (anyOf 1) | integer | Alternative | |
page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
page_size | JSON | Optional | |
page_size (anyOf 1) | integer | Alternative | |
page_size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
previous_page_uri | JSON | Optional | |
previous_page_uri (anyOf 1) | string | Alternative | Format: uri |
previous_page_uri (anyOf 2) | null | Alternative | |
start | JSON | Optional | |
start (anyOf 1) | integer | Alternative | |
start (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
uri | string | Optional | Format: uri |
Referenced models: Initiates a call redirect or terminates a call — response body
Schemas
Section titled “Schemas”Initiates a call redirect or terminates a call — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
account_sid | JSON | Optional | |
account_sid (anyOf 1) | string | Alternative | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this Call resource. Maximum length: 34 Minimum length: 34 Pattern: ^AC[0-9a-fA-F]{32}$ |
account_sid (anyOf 2) | null | Alternative | |
answered_by | JSON | Optional | |
answered_by (anyOf 1) | string | Alternative | Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise. |
answered_by (anyOf 2) | null | Alternative | |
api_version | JSON | Optional | |
api_version (anyOf 1) | string | Alternative | The API version used to create the call. |
api_version (anyOf 2) | null | Alternative | |
caller_name | JSON | Optional | |
caller_name (anyOf 1) | string | Alternative | The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty. |
caller_name (anyOf 2) | null | Alternative | |
date_created | JSON | Optional | |
date_created (anyOf 1) | string | Alternative | The date and time in UTC that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Format: date-time-rfc-2822 |
date_created (anyOf 2) | null | Alternative | |
date_updated | JSON | Optional | |
date_updated (anyOf 1) | string | Alternative | The date and time in UTC that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Format: date-time-rfc-2822 |
date_updated (anyOf 2) | null | Alternative | |
direction | JSON | Optional | |
direction (anyOf 1) | string | Alternative | A string describing the direction of the call. Can be: `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `<Dial>` verb. Using [Elastic SIP Trunking](https://www.twilio.com/docs/sip-trunking), the values can be [`trunking-terminating`](https://www.twilio.com/docs/sip-trunking#termination) for outgoing calls from your communications infrastructure to the PSTN or [`trunking-originating`](https://www.twilio.com/docs/sip-trunking#origination) for incoming calls to your communications infrastructure from the PSTN. |
direction (anyOf 2) | null | Alternative | |
duration | JSON | Optional | |
duration (anyOf 1) | string | Alternative | The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls. |
duration (anyOf 2) | null | Alternative | |
end_time | JSON | Optional | |
end_time (anyOf 1) | string | Alternative | The time the call ended, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call did not complete successfully. Format: date-time-rfc-2822 |
end_time (anyOf 2) | null | Alternative | |
forwarded_from | JSON | Optional | |
forwarded_from (anyOf 1) | string | Alternative | The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty. |
forwarded_from (anyOf 2) | null | Alternative | |
from | JSON | Optional | |
from (anyOf 1) | string | Alternative | The phone number, SIP address, Client identifier or SIM SID that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@example.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. |
from (anyOf 2) | null | Alternative | |
from_formatted | JSON | Optional | |
from_formatted (anyOf 1) | string | Alternative | The calling phone number, SIP address, or Client identifier formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). |
from_formatted (anyOf 2) | null | Alternative | |
group_sid | JSON | Optional | |
group_sid (anyOf 1) | string | Alternative | The Group SID associated with this call. If no Group is associated with the call, the field is empty. Maximum length: 34 Minimum length: 34 Pattern: ^GP[0-9a-fA-F]{32}$ |
group_sid (anyOf 2) | null | Alternative | |
parent_call_sid | JSON | Optional | |
parent_call_sid (anyOf 1) | string | Alternative | The SID that identifies the call that created this leg. Maximum length: 34 Minimum length: 34 Pattern: ^CA[0-9a-fA-F]{32}$ |
parent_call_sid (anyOf 2) | null | Alternative | |
phone_number_sid | JSON | Optional | |
phone_number_sid (anyOf 1) | string | Alternative | If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed. Maximum length: 34 Minimum length: 34 Pattern: ^PN[0-9a-fA-F]{32}$ |
phone_number_sid (anyOf 2) | null | Alternative | |
price | JSON | Optional | |
price (anyOf 1) | string | Alternative | The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available. The price associated with a call only reflects the charge for connectivity. Charges for other call-related features such as Answering Machine Detection, Text-To-Speech, and SIP REFER are not included in this value. |
price (anyOf 2) | null | Alternative | |
price_unit | JSON | Optional | |
price_unit (anyOf 1) | string | Alternative | The currency in which `Price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g., `USD`, `EUR`, `JPY`). Always capitalized for calls. Format: currency |
price_unit (anyOf 2) | null | Alternative | |
queue_time | JSON | Optional | |
queue_time (anyOf 1) | string | Alternative | The wait time in milliseconds before the call is placed. |
queue_time (anyOf 2) | null | Alternative | |
sid | JSON | Optional | |
sid (anyOf 1) | string | Alternative | The unique string that we created to identify this Call resource. Maximum length: 34 Minimum length: 34 Pattern: ^CA[0-9a-fA-F]{32}$ |
sid (anyOf 2) | null | Alternative | |
start_time | JSON | Optional | |
start_time (anyOf 1) | string | Alternative | The start time of the call, given as UTC in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format. Empty if the call has not yet been dialed. Format: date-time-rfc-2822 |
start_time (anyOf 2) | null | Alternative | |
status | string | Optional | The status of this call. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy` or `no-answer`. See [Call Status Values](https://www.twilio.com/docs/voice/api/call-resource#call-status-values) below for more information. Known values: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled |
stir_verstat | JSON | Optional | |
stir_verstat (anyOf 1) | string | Alternative | The STIR/SHAKEN verification status of the call, for example `TN-Validation-Passed-A`. Empty if the incoming call had no STIR/SHAKEN information. |
stir_verstat (anyOf 2) | null | Alternative | |
subresource_uris | JSON | Optional | |
subresource_uris (anyOf 1) | object | Alternative | A list of subresources available to this call, identified by their URIs relative to `https://api.twilio.com`. Format: uri-map |
subresource_uris (anyOf 2) | null | Alternative | |
to | JSON | Optional | |
to (anyOf 1) | string | Alternative | The phone number, SIP address, Client identifier or SIM SID that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `name@example.com`. Client identifiers are formatted `client:name`. SIM SIDs are formatted as `sim:sid`. |
to (anyOf 2) | null | Alternative | |
to_formatted | JSON | Optional | |
to_formatted (anyOf 1) | string | Alternative | The phone number, SIP address or Client identifier that received this call. Formatted for display. Non-North American phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +442071838750). |
to_formatted (anyOf 2) | null | Alternative | |
trunk_sid | JSON | Optional | |
trunk_sid (anyOf 1) | string | Alternative | The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated. Maximum length: 34 Minimum length: 34 Pattern: ^TK[0-9a-fA-F]{32}$ |
trunk_sid (anyOf 2) | null | Alternative | |
uri | JSON | Optional | |
uri (anyOf 1) | string | Alternative | The URI of this resource, relative to `https://api.twilio.com`. |
uri (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: twilio.listcall. Catalog operation: ListCall. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.