Skip to main content
PATCH
/
whatsapp
/
phone_numbers
/
{phone_number}
/
calling_settings
JavaScript
import Telnyx from 'telnyx';

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

const callingSetting = await client.whatsapp.phoneNumbers.callingSettings.update('phone_number', {
  enabled: true,
});

console.log(callingSetting.data);
{
  "data": {
    "record_type": "whatsapp_calling_settings",
    "phone_number": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "enabled": true
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

phone_number
string
required

Phone number (E.164 format)

Body

application/json
enabled
boolean
required

Response

Updated calling settings

data
object