Skip to main content
PATCH
/
whatsapp
/
business_accounts
/
{id}
/
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 setting = await client.whatsapp.businessAccounts.settings.update('id');

console.log(setting.data);
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "record_type": "whatsapp_business_account_settings",
    "name": "<string>",
    "timezone": "America/Chicago",
    "webhook_url": "<string>",
    "webhook_failover_url": "<string>",
    "webhook_enabled": true,
    "webhook_events": [
      "<string>"
    ],
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Whatsapp Business Account ID

Body

application/json
name
string
timezone
string

IANA timezone identifier

Example:

"America/New_York"

webhook_url
string<url>

URL to send Whatsapp events

webhook_failover_url
string<url>

Failover URL to send Whatsapp events

webhook_enabled
boolean

Enable/disable receiving Whatsapp events

webhook_events
string[]

Whatsapp event to subscribe to

Response

Updated settings

data
object