Skip to main content
GET
/
usage_reports
/
options
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.usageReports.getOptions();

console.log(response.data);
{
  "data": [
    {
      "product": "wireless",
      "product_dimensions": [
        "mnc",
        "mcc",
        "sim_card_id",
        "sim_group_name"
      ],
      "product_metrics": [
        "uplink_data_bytes",
        "downlink_data",
        "downlink_data_bytes",
        "uplink_data",
        "data_cost"
      ],
      "record_types": [
        {
          "record_type": "conversation_event",
          "product_dimensions": [
            "direction",
            "currency",
            "message_type"
          ],
          "product_metrics": [
            "cost",
            "billed_sec"
          ]
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization_bearer
string

Authenticates the request with your Telnyx API V2 KEY

Query Parameters

product
string

Options (dimensions and metrics) for a given product. If none specified, all products will be returned.

Response

Successful

An object following one of the schemas published in https://developers.telnyx.com/docs/api/v2/detail-records

data
object[]

Collection of product description