Telnyx Messaging: WhatsApp — Full Documentation
Complete page content for WhatsApp (Messaging section) of the Telnyx developer docs (https://developers.telnyx.com). Root index: https://developers.telnyx.com/llms.txt · Lightweight index for this subsection: https://developers.telnyx.com/development/llms/messaging-whatsapp-llms-txt.md
Getting Started
Quickstart
Source: https://developers.telnyx.com/docs/messaging/whatsapp/quickstart.md
Send Your First WhatsApp Message
Get started with WhatsApp Business messaging via Telnyx in minutes. This guide covers account setup, template creation, and sending your first message with delivery confirmation.Prerequisites
Before sending WhatsApp messages, ensure you have:- Telnyx Account — Sign up and verify your account
- Meta Business Manager Account — Required for WhatsApp Business Platform access
- WhatsApp Business Account (WABA) — Connected via Telnyx’s Embedded Signup
- Verified phone number — Added to your WABA and verified with Meta
- Create a Telnyx account and verify your email
- Navigate to the Portal and complete account verification
- Add billing information to enable message sending
- Generate an API key from Developer Center → API Keys → Create API Key
- Navigate to Messaging → WhatsApp in the Telnyx Portal
- Click Connect WhatsApp Business Account
- Sign in with your Facebook Business Manager credentials
- Select the Business Manager account to connect
- Follow Meta’s prompts to create or select a WhatsApp Business Account
- Verify your business phone number when prompted
\{\{1\}\}), provide sample values in the example field. Meta reviewers use these to evaluate the template. Without sample values, templates are typically rejected.
Complete the business profile (website, description, industry category) before submitting templates. Incomplete profiles increase rejection rates, especially for new WhatsApp Business Accounts.
Create a message template using the API:
cURL
JavaScript
Python
Ruby
cURL
Python
Node.js
Ruby
Go
Java
from field.
Configure webhooks to receive real-time delivery status updates:
- In the Telnyx Portal, navigate to Messaging → Messaging Profiles
- Select your messaging profile
- Set Webhook URL to your endpoint (e.g.,
https://yourapp.com/webhooks/telnyx) - Enable Failover URL for redundancy (optional)
- Save the configuration
Python
Node.js
Verify Message Delivery
Check message delivery through multiple channels:Portal Dashboard
- Navigate to Messaging → Message Logs in the Telnyx Portal
- Filter by Channel: WhatsApp and Date Range
- View delivery status, timestamps, and any error codes
- Click individual messages for detailed delivery information
Webhook Events
Monitor these key webhook events:message.sent— Message successfully submitted to WhatsAppmessage.delivered— Message delivered to recipient’s devicemessage.read— Recipient opened and read the message (when enabled by recipient)message.failed— Message delivery failed (with error details)
API Response
The initial API response includes:Common Issues
Symptoms: API returns a40008 error indicating the template was not found or not approved
Solutions:
- Verify template status in Portal under Messaging → WhatsApp → Send Messages
- Ensure template name matches exactly (case-sensitive)
- Wait for Meta’s approval (typically 24-48 hours for first templates)
- Review Meta’s template guidelines for approval requirements
40008 error indicating the sender phone number is not registered with WhatsApp
Solutions:
- Complete phone number verification in the Telnyx Portal
- Ensure number is added to your WhatsApp Business Account
- Verify the number through Meta’s verification process
- Check that the number hasn’t been used with personal WhatsApp
40008 error. WhatsApp requires a template to initiate conversations outside the 24-hour window
Solutions:
- Use approved message templates for outbound messaging
- Only send free-form messages within 24 hours of customer’s last message
- Check conversation window status via webhook events
- Consider switching to template-based messaging for customer re-engagement
undeliverable with Meta API error details in the response
Solutions:
- Verify recipient has WhatsApp installed and active
- Ensure phone number format includes country code (+1…)
- Check that recipient hasn’t blocked your business number
- Confirm recipient’s WhatsApp account is not banned or restricted
Next Steps
Send templates, text, media, and interactive messages Set up your WhatsApp Business Account and verify your number Handle inbound messages and delivery status callbacksEmbedded Signup
Source: https://developers.telnyx.com/docs/messaging/whatsapp/embedded-signup.md
WhatsApp Embedded Signup
WhatsApp Embedded Signup enables businesses to connect their Facebook Business Manager account to Telnyx and provision WhatsApp Business Account (WABA) resources through a streamlined browser-based workflow.Prerequisites
Before starting the embedded signup process: Required account status:- Active Telnyx account with messaging enabled
- Valid payment method configured
- Account in good standing with no billing issues
- Log in to Telnyx Portal
- Navigate to Messaging → WhatsApp
- Ensure you have admin permissions for your organization
- Facebook Business Manager account (business.facebook.com)
- Admin access to the Business Manager account
- Business verification completed (recommended for production use)
- Each phone number can only be associated with one Business Manager
- Business Manager must have appropriate permissions for WhatsApp Business API
- Account must comply with Facebook Business policies
Signup Flow Overview
The embedded signup process follows a multi-step finite state machine (FSM) that progresses through these states: Each state represents a checkpoint in the signup process with specific completion criteria and potential failure points.Step-by-Step Signup Process
From Telnyx Portal:- Navigate to Messaging → WhatsApp → Getting Started
- Click Connect WhatsApp Business
- Review the permissions and requirements displayed
- Click Begin Setup to start the embedded signup flow
- Telnyx creates a signup session with state
initiated - Portal generates a secure OAuth URL for Facebook authorization
- Session tracking begins for completion monitoring
- Browser redirects to Facebook Business Manager OAuth consent screen
-
Review the requested permissions:
- WhatsApp Business Management — Create and manage WABA
- Business Asset Management — Associate phone numbers and templates
- Webhook Management — Configure message and status webhooks
- Click Continue to grant permissions
- Select target Business Manager if you have multiple
- Facebook validates your Business Manager admin status
- OAuth token is generated and securely transmitted to Telnyx
- Signup state advances to
facebook_auth
- Permission denied: Ensure you have admin access to Business Manager
- Business not verified: Some features require verified Business Manager
- Already connected: Phone number may be connected to another provider
- WABA is created under your Business Manager
- Telnyx is granted the necessary permissions as a solution partner
- Initial configuration is applied (timezone, business category)
- Webhook endpoints are pre-configured for Telnyx integration
- Facebook creates the WABA resource
- Telnyx receives WABA credentials and configuration details
- Signup state advances to
waba_created - WABA settings are synced to Telnyx systems
- Business category: Inherited from Business Manager
- Webhooks: Configured via your messaging profile webhook settings
- Portal displays available phone numbers from your Telnyx inventory
- Select the phone number to register for WhatsApp
- Choose the WABA to associate with the number
- Confirm the registration request
- Must be a Telnyx number with an active messaging profile assigned
- Cannot be currently registered with another WhatsApp provider
- Can be used alongside SMS/voice on the same number — WhatsApp uses a separate API path
- Phone number is submitted to Facebook for WhatsApp registration
- Facebook begins the verification process
- Signup state advances to
phone_registered - Number status changes to “pending verification”
- Number format: E.164 format (+1234567890)
- Verification method: Automatically determined by Facebook
- Processing time: Usually 1-5 minutes for verification
- Carrier validation: Facebook verifies number ownership with telecom provider
- SMS verification: Test SMS may be sent to validate delivery capability
- API validation: Facebook tests webhook delivery and response handling
- Typical duration: 1-15 minutes
- Complex cases: Up to 24 hours for carrier validation
- Failed attempts: May require manual review or different number
- Facebook completes all verification checks
- Number status updates to “verified” in Facebook systems
- Signup state advances to
verified - Number becomes available for sending messages
Signup Completion
When verification succeeds, your WhatsApp integration is ready:Account Status
- WABA Status: Active and ready for messaging
- Phone Number: Verified and enabled for sending/receiving
- Webhooks: Configured and receiving events
- Templates: Ready for submission and approval
Next Steps After Signup
Send templates, text, media, and interactive messages Send your first WhatsApp message end-to-end Handle inbound messages and delivery status callbacksTroubleshooting Common Issues
Error: “You don’t have permission to complete this action” Causes:- Not admin of Business Manager account
- Business Manager doesn’t have WhatsApp permissions
- Account suspended or restricted
- Verify admin access in Business Manager
- Contact Facebook Business Support if account restricted
- Use different Business Manager account
- Check account verification status
- Business Manager doesn’t meet Facebook requirements
- Too many existing WABAs on Business Manager
- Business policy violations
- Complete Business Manager verification
- Review and resolve any policy violations
- Remove unused WABAs from Business Manager
- Contact Telnyx support with signup session ID
- Number registered with another Business Service Provider
- Number previously registered but not properly disconnected
- Number registered to different WABA
- Disconnect number from previous provider
- Contact previous provider to release number
- Use different phone number for registration
- Contact Facebook Business Support for assistance
- Number doesn’t support voice calls or SMS
- Carrier blocking verification attempts
- Number routing issues
- Verify number accepts incoming calls and SMS
- Try different phone number if possible
- Contact carrier to check for blocks
- Wait and retry verification process
- Contact Telnyx support with verification details
- Webhook URL not properly configured
- Firewall blocking webhook delivery
- Invalid webhook signature verification
- Verify webhook URL accessibility from Facebook servers
- Check webhook signature verification implementation
- Review webhook configuration in Portal
- Test webhook endpoint with manual POST requests
- Check logs for delivery attempts and errors
- Ad blockers (uBlock Origin, Adblock Plus, etc.) blocking Facebook/Meta domains
- Privacy extensions (Privacy Badger, Ghostery) blocking third-party scripts
- Browser security settings blocking cross-origin popups
- Temporarily disable ad blockers and privacy extensions for the signup flow
- Add
facebook.comandmeta.comdomains to your extension’s allowlist - Try using a different browser profile without extensions
- Use Chrome Incognito mode (extensions are typically disabled by default)
- Ensure popup blockers allow popups from the Telnyx Portal domain
API Integration
Signup Session Monitoring
Monitor signup progress programmatically using the Signup API:cURL
Webhook Events
Receive real-time signup progress updates:Tech Provider Embedded Signup
Source: https://developers.telnyx.com/docs/messaging/whatsapp/embedded-signup/tech-provider.mdWhatsApp Tech Provider Embedded Signup lets ISVs and SaaS platforms embed Meta’s WhatsApp onboarding flow directly into their own portal. Your end-customers can create and register a WhatsApp Business Account (WABA), claim a phone number, and begin messaging — all without leaving your application. Unlike the standard embedded signup flow, which is designed for direct Telnyx customers, the Tech Provider flow is built for partners who manage multiple end-customers and need programmatic control over WABA provisioning.
Overview
As a Tech Provider, you build the onboarding experience into your own product. The end-customer clicks a button in your portal, completes Meta’s embedded signup flow, and your backend receives the resulting WABA ID and phone number ID. You then register the WABA with Telnyx so that it can use Telnyx’s messaging infrastructure. Telnyx offers two integration paths: a hosted signup option where Telnyx manages the entire signup UI and backend processing (recommended for most Tech Providers), and a custom integration option where you embed Meta’s Facebook SDK directly into your own portal for full control over the experience. See Step 3 for a comparison.Tech Provider vs. Direct Customer
Prerequisites
Before you begin, make sure you have:- A Meta Business Account with admin access
- A Meta Tech Provider App that has been approved by Meta with the following permissions:
whatsapp_business_messagingwhatsapp_business_management
- The Tech Provider onboarding process completed in Meta App Dashboard
- A Telnyx account with an API key
Step 1: Create and configure your Meta Tech Provider App
Go to Meta App Dashboard and create a new app. Select Business as the app type. In your app’s dashboard, add the WhatsApp product. This will generate the permissions you need. Under App Review > Permissions and Features, request the following permissions:
Both permissions require Advanced Access for production use.
Follow Meta’s Tech Provider onboarding guide to complete the Tech Provider registration process. This includes business verification and agreeing to Meta’s Tech Provider terms.
Submit your app for Meta’s App Review. Meta will evaluate your use case and grant (or deny) the requested permissions. This process typically takes several business days.
While waiting for App Review approval, you can test in Development Mode with your own test users. Production use requires Live Mode and Advanced Access permissions.
Step 2: Link your Meta App to Telnyx
Once your Meta App is configured, you need to link it to Telnyx so that WABAs created through your embedded signup flow are registered on Telnyx’s infrastructure. In the Meta App Dashboard, change your app mode from Development to Live. This is required for Telnyx to initiate the partner invitation. Reach out to your Telnyx representative or contact support and provide:- Your Meta App ID (found in your app’s dashboard)
- Your business name as registered with Meta Within 1–2 business days, you’ll receive an email from Meta containing a partner invitation link. Click the link and accept the invitation to link your app with Telnyx. After accepting the invitation, you can switch your app back to Development mode for testing. The link persists regardless of the app mode.
Step 3: Choose your integration path
After your Meta App is linked to Telnyx, you have two ways to onboard your end-customers’ WABAs. Both paths complete the same Meta embedded signup — the difference is where the signup UI lives and how much you build.
With the hosted signup flow, Telnyx hosts the embedded signup page. You generate a time-limited onboarding URL via API and share it with your end-customer. The customer visits the URL, completes Meta’s signup, and Telnyx handles the rest — code exchange, webhook subscription, credit line sharing, and phone number registration. No Facebook SDK, no custom JavaScript.
Step 3A.1: Generate an onboarding URL
Call the Telnyx API to create a JWT-authenticated onboarding URL for your end-customer. The URL is valid for up to 3 days.Request body parameters
This endpoint requires authentication with a Telnyx API key. You can create one in the API Keys page.
Response
Step 3A.2: Share the URL with your end-customer
Send theurl to your end-customer via email, SMS, or embed it as a link in your own portal. When the customer visits the URL:
- Telnyx validates the JWT and renders a signup page branded with your app’s Meta configuration
- The customer clicks Get Started to launch Meta’s embedded signup popup
- The customer signs in to Facebook, creates or selects a WABA, and verifies their phone number
- On completion, Telnyx automatically handles the backend: code exchange, webhook subscription, credit line sharing, and phone number registration
GET /v2/whatsapp/signup/{session_id}/status to track progress and surface it in your own dashboard.
Step 3A.3: Check signup status (optional)
status, state, waba_id, and any errors. Use this to build a progress indicator in your portal or trigger downstream workflows when onboarding completes.
What happens after signup
When the end-customer completes the hosted signup:- Credit line is applied — The WABA is associated with your Telnyx billing account
- WABA is registered — The WhatsApp Business Account is linked to Telnyx’s messaging infrastructure
- Webhooks are subscribed — Telnyx subscribes to Meta webhook events on the WABA’s behalf
- Number is ready for messaging — The phone number can send and receive WhatsApp messages through Telnyx
Step 3B.1: Implement the frontend embedded signup
Meta’s embedded signup flow is triggered from your web application using the Facebook JavaScript SDK. Your frontend launches the signup dialog, the end-customer completes it, and you receive the resulting credentials. Add the Facebook SDK to your web application:FB.login() with the config_id of your WhatsApp Business Configuration. This opens Meta’s embedded signup dialog for your end-customer.
Refer to Meta’s embedded signup documentation for full details on parsing the response. You only need the frontend (web) portion of Meta’s guide — the backend registration is handled by Telnyx in the next step.
Step 3B.2: Register the WABA with Telnyx
Once you have thewaba_id and phone_number_id from the embedded signup flow, send them to Telnyx to register the WABA and activate messaging.
Request
Request body parameters
This endpoint requires authentication with a Telnyx API key via the
Authorization: Bearer header. Use an API key from your Telnyx account — you can create one in the API Keys page.
Response
A successful response confirms that the WABA has been registered with Telnyx:What happens after registration
When the Telnyx API returns a successful response:- Credit line is applied — The WABA is associated with your Telnyx billing account
- WABA is registered — The WhatsApp Business Account is linked to Telnyx’s messaging infrastructure
- Number is ready for messaging — The phone number can send and receive WhatsApp messages through Telnyx
Troubleshooting
- Verify that your app was in Live mode when you contacted Telnyx
- Check your spam and junk folders
- Ensure the email associated with your Meta Business account is correct
- Confirm with your Telnyx representative that they initiated the invitation
- The invitation typically arrives within 1–2 business days
- Review Meta’s rejection reasons carefully in the App Review section of your dashboard
- Common reasons include: insufficient permissions justification, unclear use case description, or missing screencast
- Update your submission with clearer documentation and resubmit
- Ensure your app is functional and testable during the review period
-
Confirm the Facebook SDK is loaded before calling
FB.login() -
Check that your
config_idis correct and matches a WhatsApp Business Configuration in your app -
Ensure your app has the
whatsapp_business_messagingandwhatsapp_business_managementpermissions - Open your browser’s developer console for error messages from the SDK
- Verify you are using a valid Telnyx API key
-
Ensure the
Authorization: Bearer YOUR_API_KEYheader is included in your request - Check that your API key has not expired or been revoked
-
Ensure the
response_typeparameter includescode -
Check that
override_default_response_typeis set totrue - Verify the user completed all steps in the Meta signup flow (business verification, phone number selection)
-
Inspect the full response object in your
FB.login()callback for debug information -
Ensure you’re using the full URL returned by
POST /v2/whatsapp_hosted_signups, including the?token=query parameter - Check that the JWT hasn’t expired — tokens are valid for a maximum of 3 days from creation
- If the token has expired, generate a new one via the API
- Verify the phone number entered by the end-customer is correct and can receive SMS
- Check that the phone number is not already registered with another WhatsApp account
- Try requesting the verification code via phone call instead of SMS
- Ensure the end-customer’s phone carrier is not blocking Meta’s verification messages
Next steps
Send your first WhatsApp message with Telnyx Direct customer embedded signup flow Explore WhatsApp API endpoints Send messages across all channelsSending Messages
Send Messages
Source: https://developers.telnyx.com/docs/messaging/whatsapp/send-messages.mdSend WhatsApp messages using
POST /v2/messages/whatsapp. All message types use the same endpoint — the whatsapp_message object determines the message type.
Request Structure
Every request requires these fields:
The messaging profile is automatically resolved from the
from number. You do not need to pass messaging_profile_id.
The whatsapp_message object must include a type field and the corresponding content object. Supported types: text, template, image, video, document, audio, sticker, location, contacts, interactive, reaction.
Template Messages
Template messages are required to start conversations outside the 24-hour window. Templates must be pre-approved by Meta. Error code40008 indicates the template could not be used for sending. Possible causes include: the template is still pending review, was rejected by Meta, has been paused due to quality issues, or was disabled. Check template status in the Telnyx Portal or via GET /v2/whatsapp/message_templates.
Text, media, and interactive messages can only be sent within a 24-hour conversation window. The window opens when the recipient sends a message to the business number. Outside this window, use an approved template message to initiate the conversation.
For comprehensive template creation guidance, see the Manage Templates guide.
cURL
Python
Node.js
Sending by Template ID
Instead of specifyingname and language, you can reference a template by its Telnyx UUID (template_id). The name and language are resolved automatically from the database.
cURL
GET /v2/whatsapp/message_templates. The id field in the response is the template_id you can use when sending.
Template Components
Templates usecomponents to pass dynamic content into header, body, and button slots:
Media Header Template
To send a template with an image header:document and video types with the same {link, caption, filename} structure.
Text Messages
Send plain text within the 24-hour conversation window. Body must be 1–4096 bytes.cURL
Python
Node.js
preview_url: true to render link previews when the message body contains a URL.
Media Messages
Send images, videos, documents, audio, and stickers. Each media object requires exactly one oflink (URL) or id (Meta media ID). Captions are optional and limited to 1024 bytes.
Image
Document
Video
Audio
Sticker
Location Messages
Share a location pin. Latitude and longitude are passed as strings (decimal format).Contact Messages
Share one or more contact cards (1–257 contacts per message).Interactive Messages
Interactive messages let recipients tap buttons, select from lists, or open URLs. Supportedinteractive.type values:
Quick Reply Buttons
id in the payload.
CTA URL Button
List Messages
Location Request
Reactions
React to a received message with an emoji.Reply Context
Reply to a specific message by includingcontext.message_id:
Callback Tracking
Usebiz_opaque_callback_data to attach tracking data that will be returned in delivery webhooks:
API Response
All message types return the same response structure:Validation Rules
Error Handling
Common WhatsApp errors return error code40008. This is a catch-all code covering template issues (pending, rejected, paused, disabled) and delivery failures. For general API errors, see the Error Codes Reference.
Template, text, media, and interactive messages all use the same endpoint. The type field inside whatsapp_message determines which content object is required.
Next Steps
Send your first WhatsApp message end-to-end Set up your WhatsApp Business Account and verify your number Handle inbound messages and delivery status callbacksManage Templates
Source: https://developers.telnyx.com/docs/messaging/whatsapp/manage-templates.md
Manage WhatsApp Message Templates
WhatsApp requires pre-approved message templates for business-initiated conversations. Use the Telnyx Management API to create, review, and manage templates programmatically. For template best practices and approval tips, see the Approval Tips guide.Template Lifecycle
Templates must be approved by Meta before they can be used. Review typically takes 24-48 hours.List Templates
Retrieve all templates for your WhatsApp Business Account.cURL
Python
Node.js
Filter by Status
Response
Create a Template
Submit a new template for Meta review. Set a display name for the phone number before submitting templates. Templates submitted from numbers without an approved display name are rejected by Meta. Always include sample values in theexample field when your template contains parameters (\{\{1\}\}, \{\{2\}\}). Templates without examples are typically rejected.
Authentication Template
Authentication templates include an OTP code with a copy-code button.cURL
Python
Node.js
Marketing Template
Marketing templates support rich media headers, body text with parameters, and call-to-action buttons.Utility Template
Utility templates are for transactional updates like order confirmations, shipping notifications, and account alerts.Get a Template
Retrieve details of a specific template by ID.Update a Template
Edit a template’s content. Only templates inAPPROVED or REJECTED status can be updated. Updated templates are re-submitted for Meta review.
Editing an approved template resets its status to PENDING while Meta reviews the changes. Your template will be temporarily unavailable for sending.
Delete a Template
Remove a template permanently. This action cannot be undone.Template Categories
Choose the most specific category. Meta may reclassify templates that don’t match their declared category, which can affect pricing and delivery.
Authentication Rules
- Must contain a one-time code or password
- Must include a copy-code or one-tap button
- Cannot include URLs or media (except the OTP button)
- Limited to one code parameter
Naming Rules
- Lowercase letters, numbers, and underscores only
- Maximum 512 characters
- Must be unique within your WABA for each language
- Avoid words like
test,sample,demo— Meta flags these for extra review
Approval Tips
- Always include sample values — Templates with parameters but no
examplefield are almost always rejected - Set a display name first — Templates submitted from numbers without an approved display name get rejected
- Complete your business profile — Add website, description, and category before submitting. Incomplete profiles increase rejection rates
- Edit rejected templates, don’t recreate — Meta enforces a 30-day restriction on reusing template names
- Match category to content — Meta may reclassify miscategorized templates, affecting pricing and delivery
Multi-Language Templates
Create the same template in multiple languages. Each language variant is reviewed independently.Error Handling
Common issues:
- Rejected templates: Review Template Best Practices for approval tips
- Duplicate name: Template names must be unique per language within a WABA
- Invalid parameters: Ensure
examplevalues match parameter count in template body
Next Steps
- Send Messages — Use approved templates to send messages
- Approval Tips — Tips for getting templates approved
- Quickstart — End-to-end setup guide
API Reference (WhatsApp)
Whatsapp Business Accounts
- List Whatsapp Business Accounts
- Get a single Whatsapp Business Account
- Delete a Whatsapp Business Account
- List phone numbers for a WABA
- Get WABA settings
- Update WABA settings
Whatsapp Phone Numbers
- Initialize Whatsapp phone number verification
- List Whatsapp phone numbers
- Delete a Whatsapp phone number
- Get calling settings for a phone number
- Enable or disable Whatsapp calling for a phone number
- Get phone number business profile
- Update phone number business profile
- Get Whatsapp profile photo
- Upload Whatsapp profile photo
- Delete Whatsapp profile photo
- Resend verification code
- Submit verification code for a phone number
- Get conversation window status for a phone number: Returns whether the 24-hour conversation window is currently open for a given source/destination pair. If window_active is false, only template messages may be…