from parameter.
How It Works
When your organization has multiple connected WhatsApp instances:- Without
from: API selects the most recently connected instance - With
from: API uses the specified instance
Specifying the Sender
Thefrom parameter accepts two formats:
| Format | Example | Description |
|---|---|---|
| Phone number | 5585912345678 | WhatsApp number without + or @ |
| Instance ID | uuid-xxx-xxx | Internal instance identifier |
Example Usage
Send from a specific number
Use different numbers for different purposes
Default Behavior
If you don’t specifyfrom:
- Single instance: The only available instance is used
- Multiple instances: The most recently connected instance is automatically selected
Error Handling
If you specify an invalidfrom 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.