Skip to main content
GET
/
mobile_phone_numbers
/
{id}
/
messaging
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const messaging = await client.mobilePhoneNumbers.messaging.retrieve('id');

console.log(messaging.data);
{
  "data": {
    "record_type": "messaging_settings",
    "id": "2126210528794641864",
    "phone_number": "++13127367407",
    "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "created_at": "2019-01-23T18:10:02.574Z",
    "updated_at": "2019-01-23T18:10:02.574Z",
    "country_code": "US",
    "type": "longcode",
    "traffic_type": "P2P",
    "messaging_product": "P2P",
    "features": {
      "sms": {
        "domestic_two_way": true,
        "international_inbound": true,
        "international_outbound": true
      }
    }
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Identifies the type of resource.

Response

Successful response with details about a mobile phone number.

data
object
Example:
{
"record_type": "messaging_settings",
"id": "2126210528794641864",
"phone_number": "++13127367407",
"messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"country_code": "US",
"type": "longcode",
"traffic_type": "P2P",
"messaging_product": "P2P",
"features": {
"sms": {
"domestic_two_way": true,
"international_inbound": true,
"international_outbound": true
}
}
}