Skip to main content

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 AccountSign 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
WhatsApp Business Platform requires business verification through Meta’s process. Personal WhatsApp accounts cannot send template messages via the API.
  1. Create a Telnyx account and verify your email
  2. Navigate to the Portal and complete account verification
  3. Add billing information to enable message sending
  4. Generate an API key from Developer Center → API Keys → Create API Key
Store your API key securely — you’ll need it for all API requests. Complete the WhatsApp Embedded Signup to connect your Meta Business Manager:
  1. Navigate to Messaging → WhatsApp in the Telnyx Portal
  2. Click Connect WhatsApp Business Account
  3. Sign in with your Facebook Business Manager credentials
  4. Select the Business Manager account to connect
  5. Follow Meta’s prompts to create or select a WhatsApp Business Account
  6. Verify your business phone number when prompted
Use a Telnyx number with an active messaging profile that you haven’t used with personal WhatsApp. The embedded signup flow currently requires Telnyx-owned numbers — bring-your-own-number is not yet supported through the portal. If you’re registering a landline number, choose phone call verification instead of SMS when prompted. SMS delivery to landline numbers can be unreliable — call verification is more consistent. WhatsApp requires pre-approved templates for outbound marketing and notifications: Set a display name for the phone number before submitting templates. Templates submitted from numbers without an approved display name are rejected by Meta. When a template contains parameters (e.g., \{\{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
Meta typically reviews templates within 24-48 hours. You’ll receive an email when approved. Start with simple templates for faster approval. Avoid promotional language or special characters in your first template. Once your template is approved, send your first message:
cURL
Python
Node.js
Ruby
Go
Java
The messaging profile is automatically resolved from your WhatsApp-enabled phone number specified in the from field. Configure webhooks to receive real-time delivery status updates:
  1. In the Telnyx Portal, navigate to Messaging → Messaging Profiles
  2. Select your messaging profile
  3. Set Webhook URL to your endpoint (e.g., https://yourapp.com/webhooks/telnyx)
  4. Enable Failover URL for redundancy (optional)
  5. Save the configuration
Your webhook endpoint will receive delivery reports and inbound message notifications.
Implement webhook handling to track message status and respond to inbound messages:
Python
Node.js

Verify Message Delivery

Check message delivery through multiple channels:

Portal Dashboard

  1. Navigate to Messaging → Message Logs in the Telnyx Portal
  2. Filter by Channel: WhatsApp and Date Range
  3. View delivery status, timestamps, and any error codes
  4. Click individual messages for detailed delivery information

Webhook Events

Monitor these key webhook events:
  • message.sent — Message successfully submitted to WhatsApp
  • message.delivered — Message delivered to recipient’s device
  • message.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 a 40008 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
Symptoms: API returns a 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
Symptoms: Free-form (session) message fails with a 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
Symptoms: Message status webhook returns 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 callbacks

Embedded 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
Portal access:
  • Log in to Telnyx Portal
  • Navigate to MessagingWhatsApp
  • Ensure you have admin permissions for your organization
Business Manager requirements:
  • Facebook Business Manager account (business.facebook.com)
  • Admin access to the Business Manager account
  • Business verification completed (recommended for production use)
Important limitations:
  • 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
Ensure your Facebook Business Manager is fully set up and verified before starting embedded signup. Incomplete Business Manager setup can cause signup failures that require manual intervention.

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:
  1. Navigate to MessagingWhatsAppGetting Started
  2. Click Connect WhatsApp Business
  3. Review the permissions and requirements displayed
  4. Click Begin Setup to start the embedded signup flow
What happens:
  • Telnyx creates a signup session with state initiated
  • Portal generates a secure OAuth URL for Facebook authorization
  • Session tracking begins for completion monitoring
Verification: Signup session monitoring is handled automatically by the portal. API-based signup tracking may not be available in all configurations.
Facebook authorization flow:
  1. Browser redirects to Facebook Business Manager OAuth consent screen
  2. 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
  3. Click Continue to grant permissions
  4. Select target Business Manager if you have multiple
What happens:
  • Facebook validates your Business Manager admin status
  • OAuth token is generated and securely transmitted to Telnyx
  • Signup state advances to facebook_auth
Common issues:
  • 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
Verification: The Portal will show “Connected to Facebook” with Business Manager details when successful. WABA provisioning: Telnyx automatically creates your WhatsApp Business Account using the connected Business Manager:
  1. WABA is created under your Business Manager
  2. Telnyx is granted the necessary permissions as a solution partner
  3. Initial configuration is applied (timezone, business category)
  4. Webhook endpoints are pre-configured for Telnyx integration
What happens:
  • 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
WABA configuration:
  • Business category: Inherited from Business Manager
  • Webhooks: Configured via your messaging profile webhook settings
Verification:
Number selection and registration:
  1. Portal displays available phone numbers from your Telnyx inventory
  2. Select the phone number to register for WhatsApp
  3. Choose the WABA to associate with the number
  4. Confirm the registration request
Phone number requirements:
  • 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
The embedded signup flow currently requires a Telnyx-owned number with a messaging profile. Bring-your-own-number (non-Telnyx numbers) is not yet supported through the portal signup flow. If you need to register an external number, contact support for assistance. What happens:
  • 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”
Registration details:
  • Number format: E.164 format (+1234567890)
  • Verification method: Automatically determined by Facebook
  • Processing time: Usually 1-5 minutes for verification
Verification:
Facebook verification process: Facebook automatically verifies phone numbers using multiple methods:
  1. Carrier validation: Facebook verifies number ownership with telecom provider
  2. SMS verification: Test SMS may be sent to validate delivery capability
  3. API validation: Facebook tests webhook delivery and response handling
Verification timeline:
  • Typical duration: 1-15 minutes
  • Complex cases: Up to 24 hours for carrier validation
  • Failed attempts: May require manual review or different number
What happens:
  • Facebook completes all verification checks
  • Number status updates to “verified” in Facebook systems
  • Signup state advances to verified
  • Number becomes available for sending messages
Verification methods Facebook may use: Automated voice call to verify number is operational and accessible. Duration: 30 seconds Requirements: Number must accept incoming calls Test SMS sent to verify message delivery capability. Message: “Facebook verification code: [CODE]” Requirements: Number must receive SMS messages Direct verification with mobile carrier for number ownership. Duration: Instant to 24 hours Requirements: Carrier must support Facebook verification API Verification completion:

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 callbacks

Troubleshooting 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
Solutions:
  1. Verify admin access in Business Manager
  2. Contact Facebook Business Support if account restricted
  3. Use different Business Manager account
  4. Check account verification status
Error: “Unable to create WhatsApp Business Account” Causes:
  • Business Manager doesn’t meet Facebook requirements
  • Too many existing WABAs on Business Manager
  • Business policy violations
Solutions:
  1. Complete Business Manager verification
  2. Review and resolve any policy violations
  3. Remove unused WABAs from Business Manager
  4. Contact Telnyx support with signup session ID
Error: “This phone number is already connected to WhatsApp Business API” Causes:
  • Number registered with another Business Service Provider
  • Number previously registered but not properly disconnected
  • Number registered to different WABA
Solutions:
  1. Disconnect number from previous provider
  2. Contact previous provider to release number
  3. Use different phone number for registration
  4. Contact Facebook Business Support for assistance
Error: “Phone number verification failed” or timeout Causes:
  • Number doesn’t support voice calls or SMS
  • Carrier blocking verification attempts
  • Number routing issues
Solutions:
  1. Verify number accepts incoming calls and SMS
  2. Try different phone number if possible
  3. Contact carrier to check for blocks
  4. Wait and retry verification process
  5. Contact Telnyx support with verification details
Error: Webhooks not receiving events after successful signup Causes:
  • Webhook URL not properly configured
  • Firewall blocking webhook delivery
  • Invalid webhook signature verification
Solutions:
  1. Verify webhook URL accessibility from Facebook servers
  2. Check webhook signature verification implementation
  3. Review webhook configuration in Portal
  4. Test webhook endpoint with manual POST requests
  5. Check logs for delivery attempts and errors
Symptom: Embedded signup popup fails to load, shows a blank page, or gets stuck during the Facebook OAuth step. Causes:
  • 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
Solutions:
  1. Temporarily disable ad blockers and privacy extensions for the signup flow
  2. Add facebook.com and meta.com domains to your extension’s allowlist
  3. Try using a different browser profile without extensions
  4. Use Chrome Incognito mode (extensions are typically disabled by default)
  5. Ensure popup blockers allow popups from the Telnyx Portal domain
Note: The WhatsApp embedded signup flow is powered by Meta/Facebook. The OAuth consent screen and business verification steps are hosted on Facebook’s servers, which means browser extensions that block Facebook domains will prevent the signup from completing.

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.md
WhatsApp 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_messaging
    • whatsapp_business_management
  • The Tech Provider onboarding process completed in Meta App Dashboard
  • A Telnyx account with an API key
All links to Meta documentation in this guide require that you are logged in to a Meta Business account. If you don’t have one, create one at business.facebook.com before proceeding.

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. 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.
You must switch your app to Live mode before Telnyx can send the partner invitation. The invitation will fail if your app is in Development mode. After accepting the invite, you can switch back to Development mode for testing.

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 the url to your end-customer via email, SMS, or embed it as a link in your own portal. When the customer visits the URL:
  1. Telnyx validates the JWT and renders a signup page branded with your app’s Meta configuration
  2. The customer clicks Get Started to launch Meta’s embedded signup popup
  3. The customer signs in to Facebook, creates or selects a WABA, and verifies their phone number
  4. On completion, Telnyx automatically handles the backend: code exchange, webhook subscription, credit line sharing, and phone number registration
You can poll the signup status via GET /v2/whatsapp/signup/{session_id}/status to track progress and surface it in your own dashboard.

Step 3A.3: Check signup status (optional)

Returns the signup session record with 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:
  1. Credit line is applied — The WABA is associated with your Telnyx billing account
  2. WABA is registered — The WhatsApp Business Account is linked to Telnyx’s messaging infrastructure
  3. Webhooks are subscribed — Telnyx subscribes to Meta webhook events on the WABA’s behalf
  4. Number is ready for messaging — The phone number can send and receive WhatsApp messages through Telnyx
If you prefer to embed Meta’s signup flow directly into your own portal and handle the code exchange yourself, follow the steps below. This gives you full control over the UX but requires integrating the Facebook JavaScript SDK and calling Meta’s Graph API.

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:
Call FB.login() with the config_id of your WhatsApp Business Configuration. This opens Meta’s embedded signup dialog for your end-customer.
After the user completes the signup, Meta returns an authorization code. Exchange this code using Meta’s API to obtain the WABA ID and phone number ID.
The response contains access token information. Use this access token to retrieve the WABA ID and phone number ID from the signed request or the response payload:
From the embedded signup response, extract the two critical identifiers: 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 the waba_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:
  1. Credit line is applied — The WABA is associated with your Telnyx billing account
  2. WABA is registered — The WhatsApp Business Account is linked to Telnyx’s messaging infrastructure
  3. 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_id is correct and matches a WhatsApp Business Configuration in your app
  • Ensure your app has the whatsapp_business_messaging and whatsapp_business_management permissions
  • 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_KEY header is included in your request
  • Check that your API key has not expired or been revoked
  • Ensure the response_type parameter includes code
  • Check that override_default_response_type is set to true
  • 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 channels

Sending Messages

Send Messages

Source: https://developers.telnyx.com/docs/messaging/whatsapp/send-messages.md
Send 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 code 40008 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 specifying name and language, you can reference a template by its Telnyx UUID (template_id). The name and language are resolved automatically from the database.
cURL
You can find a template’s UUID by listing templates via GET /v2/whatsapp/message_templates. The id field in the response is the template_id you can use when sending.

Template Components

Templates use components to pass dynamic content into header, body, and button slots:

Media Header Template

To send a template with an image header:
Header parameters also support 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
Set 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 of link (URL) or id (Meta media ID). Captions are optional and limited to 1024 bytes.

Image

Document

Video

Audio

Sticker

Stickers do not support captions. Audio does not support captions. Only one media type per message.

Location Messages

Share a location pin. Latitude and longitude are passed as strings (decimal format).
Latitude must be between -90 and 90. Longitude must be between -180 and 180.

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. Supported interactive.type values:

Quick Reply Buttons

When a recipient taps a button, you receive an inbound webhook with the button’s 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 including context.message_id:

Callback Tracking

Use biz_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 code 40008. 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 callbacks

Manage 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 the example 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 in APPROVED 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.
Edit and resubmit rejected templates rather than creating new ones. Meta enforces a 30-day restriction on reusing template names.

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 example field 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
For detailed best practices and troubleshooting, see our WhatsApp Message Templates Guide on the support center.

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 example values match parameter count in template body

Next Steps


API Reference (WhatsApp)

Whatsapp Business Accounts

Whatsapp Phone Numbers

Whatsapp Message Templates