How to Connect Bird API For WhatsApp
Connect your Flametree AI agent to WhatsApp through Bird API to enable automated conversations without requiring a SIM card or direct Meta integration. This integration provides reliable WhatsApp communication through Bird's unified API platform.
What is Bird API
Bird.com is a communication channel aggregator that offers a unified API for platforms like WhatsApp, Telegram, SMS, and others.
Benefits:
- No SIM card required for WhatsApp setup
- Quick deployment of virtual WhatsApp numbers
- Reliable support and SLA (unlike direct Meta integration)
- Centralized number management through Bird platform
- Professional business messaging capabilities
Prerequisites
Before setting up the integration, ensure you have:
- Bird.com account with active subscription and admin access
- WhatsApp Business number registered through Bird
- A Flametree account with agent creation permissions
Step-by-Step Integration Setup
Step 1: Set Up Bird Account
-
Create Bird Account
- Sign up at https://app.bird.com
- Complete account verification process
- Set up your organization and workspace
-
Register WhatsApp Number
- Navigate to Developer → WhatsApp → WhatsApp Setup
- Follow Bird's WhatsApp number registration process
- Ensure the number is verified and active
Step 2: Create Access Key
-
Generate Access Key
- Go to Admin Console > Settings > Security → Access Keys
- Create a new access key
- Assign it to the correct role
-
Configure Access Policy
- Navigate to Admin Console > Settings > Security > Access Policies
- Choose existing policy or create new one
- Add permissions for the following URLs:
/organizations/<client_organization_id>/workspaces/*/*
/workspaces/*/channels/*/messages/*
/organizations/<client_organization_id>/workspaces/*/webhook-subscriptions/*
/workspaces/*/channels/*/messages
/workspaces/*/projects/*/channel-templates/*
/workspaces/*/messages/*/media/*The asterisk (
*) means access to all items at that level (for example, all workspaces, all channels, or all messages). Keep it as is — do not replace it.warningThe Access Key must include all listed permissions. Missing permissions may prevent the integration from starting
Step 3: Gather Required Information
| Parameter | Where to Find It | Description |
|---|---|---|
| Organization ID | Admin Console > Settings > Organization | Your Bird organization identifier |
| Organization Name | Admin Console > Settings > Organization | Your Bird organization name |
| Workspace ID | Admin Console > Settings > Workspaces | Target workspace for the integration |
| Channel ID | Developer > WhatsApp > WhatsApp Setup | WhatsApp channel identifier |
| Sender Address | Developer > WhatsApp → WhatsApp Setup > <phone-number> | Phone number identifier (found in URL .../whatsapp:1/<sender-address>) |
| Access Key | Admin Console > Bird AI > Security > Access Keys | API authentication token |
Step 4: Configure Integration in Flametree
-
Navigate to Settings
- Go to Settings > Channels.
- Open Bird.
- Select Add +.
-
Fill Configuration Fields
Field Description Required Where to Get Value Name Connector name ✅ — Description Optional notes ❌ — Organization ID Bird organization ID ✅ Admin Console Organization name Bird organization name ✅ Admin Console Workspace ID Bird workspace ID ✅ Admin Console Channel ID Bird channel ID ✅ Developer section Sender address Phone number ID ✅ Developer section Access key Bird API key ✅ Admin Console Subscription check interval, cron-style Cron expression for refreshing webhook subscriptions (default 0 0 * * *)❌ — Field notes
-
Sender address: Must match the WhatsApp number registered in Bird. It cannot be arbitrary.
-
Access key: If the integration is inactive, verify that the key is valid and has the required permissions.
-
Organization ID, Workspace ID, Channel ID: If messages are not received, verify that all values match the Bird configuration.
-
-
Important Notes for Sender Name
- Must match the name registered with Meta via Bird
- Set during number registration or auto-generated based on account
- Cannot be arbitrary - must comply with WhatsApp Business policies
-
Save Integration
- Click Save to create the integration
- Verify all fields are correctly filled
-
Click Start in the upper-right corner to start the channel.
Step 5: Connect to AI Agent
-
Open Agent Configuration
- Navigate to your target AI agent's settings
- Go to Communication channels section
-
Assign Channel
- Select your Bird API integration from the list
- Save the agent configuration
infoYou can use the same WhatsApp number for multiple agents only for outbound communication. For inbound messaging, every connected agent would reply to the same customer message, causing duplicate or conflicting answers — so use a dedicated number per agent.
-
Restart the agent: click Stop agent then Start agent to apply the changes.
Environment Variables
The following advanced environment variables can be set for Bird API integration:
| Variable | Description | Default |
|---|---|---|
BIRD_TEMPLATE_LOCALE | Default locale for message templates | None |
BIRD_SESSION_TIMEOUT | Session timeout in seconds | 86400 (24h) |
IS_OUTBOUND_ONLY | If true, channel operates in outbound-only mode | false |
BIRD_OUTBOUND_SESSION_IS_ENDED_MESSAGE | Message sent when outbound session ends | See code default |
FLAMETREE_CALLBACK_PORT | Port for webhook server | None |
BIRD_WEBHOOK_ADDRESS | Explicit webhook callback URL | None |
FLAMETREE_CALLBACK_URL | Fallback webhook callback URL | None |
BIRD_CRON_SUBSCRIPTION_RENEWAL | Cron expression for webhook subscription renewal | 0 0 * * * |
BIRD_SENDER_NAME | Displayed sender name for Bird messages | Flametree AI Agent |
Testing the Integration
-
Send Test Message
- Use any WhatsApp-enabled device to send a message to your registered number
- Verify the AI agent responds appropriately
- If no response is received, verify that the channel is active and the agent has been restarted
-
Check Message Delivery
- Confirm messages appear in Bird dashboard
- Verify webhook subscriptions are active
- If messages do not appear, verify webhook subscriptions and channel ID in Bird
-
Check supported message types
- The integration supports text messages, images, and voice messages
- Voice calls and video calls are not supported
Security Considerations
API Token Security
- Never share your Bird access token publicly or in version control
- Store tokens securely
- Rotate tokens regularly
- Monitor API usage for suspicious activity
WhatsApp Compliance
- Follow WhatsApp Business API policies
- Ensure proper opt-in mechanisms for customers
- Maintain message quality standards
- Respect rate limits and messaging windows