Check out our upcoming events and meetups! View events →
Returns multiple call resouces for an account. This endpoint is eventually consistent.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.texml.accounts.calls.retrieveCalls('account_sid');
console.log(response.calls);{
"calls": [],
"end": 0,
"first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1",
"next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ",
"page": 0,
"page_size": 1,
"start": 0,
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1"
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The id of the account the resource belongs to.
The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken.
The number of records to be displayed on a page
Used to request the next page of results.
Filters calls by the to number.
Filters calls by the from number.
Filters calls by status.
canceled, completed, failed, busy, no-answer Filters calls by their start date. Expected format is YYYY-MM-DD.
Filters calls by their start date (after). Expected format is YYYY-MM-DD
Filters calls by their start date (before). Expected format is YYYY-MM-DD
Filters calls by their end date. Expected format is YYYY-MM-DD
Filters calls by their end date (after). Expected format is YYYY-MM-DD
Filters calls by their end date (before). Expected format is YYYY-MM-DD
Multiple call resources.
Show child attributes
The number of the last element on the page, zero-indexed.
19
/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1
"accepted"
/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ
"accepted"
Current page number, zero-indexed.
0
The number of items on the page
20
The number of the first element on the page, zero-indexed.
0
The URI of the current page.
"/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1"
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.texml.accounts.calls.retrieveCalls('account_sid');
console.log(response.calls);{
"calls": [],
"end": 0,
"first_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1",
"next_page_uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=1&PageSize=1&PageToken=MTY4AjgyNDkwNzIxMQ",
"page": 0,
"page_size": 1,
"start": 0,
"uri": "/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18a1b/Calls.json?Page=0&PageSize=1"
}