Node.js SDK usage
Initialize the Telnyx Node.js client and make your first typed API request.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check out our upcoming events and meetups! View events →
Initialize the Telnyx Node.js client and make your first typed API request.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.calls.dial({
connection_id: 'conn12345',
from: '+15557654321',
to: '+15551234567',
webhook_url: 'https://your-webhook.url/events',
});
console.log(response.data);
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const params: Telnyx.NumberOrderCreateParams = { phone_numbers: [{ phone_number: '+15558675309' }] };
const numberOrder: Telnyx.NumberOrderCreateResponse = await client.numberOrders.create(params);
Was this page helpful?