Skip to main content
Organizations with multiple WhatsApp numbers can control which instance sends each message using the from parameter.

How It Works

When your organization has multiple connected WhatsApp instances:
  1. Without from: API selects the most recently connected instance
  2. With from: API uses the specified instance

Specifying the Sender

The from parameter accepts two formats:
Phone numbers are the recommended format as they’re easier to remember and manage.

Example Usage

Send from a specific number

Use different numbers for different purposes

Default Behavior

If you don’t specify from:
  • Single instance: The only available instance is used
  • Multiple instances: The most recently connected instance is automatically selected
For organizations with multiple numbers, we recommend always specifying from to ensure predictable behavior.

Error Handling

If you specify an invalid from value:

Best Practices

Use environment variables

Store your WhatsApp numbers in environment variables for easy management across environments.

Map numbers to departments

Create a mapping of department names to phone numbers for cleaner code.

Always specify from

For multi-instance orgs, always specify from to avoid unexpected behavior.

Monitor instance status

Ensure your instances are connected before sending messages.