Skip to main content

Fetch multiple call resources

GET 
/texml/Accounts/:account_sid/Calls

Returns multiple call resouces for an account. This endpoint is eventually consistent.

Request

Path Parameters

    account_sid stringrequired

    The id of the account the resource belongs to.

Query Parameters

    Page integer

    The number of the page to be displayed, zero-indexed, should be used in conjuction with PageToken.

    Example: 1
    PageSize integer

    The number of records to be displayed on a page

    Example: 10
    PageToken string

    Used to request the next page of results.

    To string

    Filters calls by the to number.

    Example: +1312345678
    From string

    Filters calls by the from number.

    Example: +1312345678
    Status string

    Possible values: [canceled, completed, failed, busy, no-answer]

    Filters calls by status.

    Example: no-answer
    StartTime string

    Filters calls by their start date. Expected format is YYYY-MM-DD.

    Example: 2023-05-22
    StartTime> string

    Filters calls by their start date (after). Expected format is YYYY-MM-DD

    Example: 2023-05-22
    StartTime< string

    Filters calls by their start date (before). Expected format is YYYY-MM-DD

    Example: 2023-05-22
    EndTime string

    Filters calls by their end date. Expected format is YYYY-MM-DD

    Example: 2023-05-22
    EndTime> string

    Filters calls by their end date (after). Expected format is YYYY-MM-DD

    Example: 2023-05-22
    EndTime< string

    Filters calls by their end date (before). Expected format is YYYY-MM-DD

    Example: 2023-05-22

Responses

200: Multiple call resources.

404: Resource not found

Request samples


curl -L 'https://api.telnyx.com/v2/texml/Accounts/:account_sid/Calls' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

Response samples


{
"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"
}