# This script demonstrates how to make a voice call using the Telnyx API. curl -X POST https://api.telnyx.com/v2/calls \ -H "Authorization: Bearer KEY0196087A75998434A30FA637CE4FDAFF_ZljGj9KBSAQL0zXx4Sb5eW" \ -H 'Accept: application/json' \ -H "Content-Type: application/json" \ -d '{ "to": "+14082397258", "from": "+16505820706", "connection_id": "2671409623596009055", "custom_headers": [ { "name": "X-TTS-Payload", "value": "This is a test call TTS message" } ] }' #curl --location 'https://api.telnyx.com/v2/calls' \ #--header 'Content-Type: application/json' \ #--header 'Accept: application/json' \ #--header 'Authorization: Bearer YOUR_API_KEY' \ #--data '{ # "to": "+15551234567", # "from": "+16505820706", # "connection_id": "YOUR_CONNECTION_ID", # "audio_url": "https://example.com/your-audio-file.mp3", # "webhook_url": "https://your-webhook.url/events" #}'