LogoLogo
No-code docsResources
  • 🖥️Welcome to the Bird API Docs
  • API Access
    • Access Policies
    • Access Roles
    • API Authorization
    • Common API usage
  • Conversations API
    • API reference
      • Channel configuration
        • Get conversations configuration
        • Update conversations configuration
      • Conversations messaging
        • Create conversation message
        • List conversation messages
        • Get conversation message
        • Update conversation message
        • Delete conversation message
        • Create pre-signed upload
      • Conversations management
        • Create conversation
        • List conversations
        • Get conversation
        • Update conversation
        • Delete conversation
      • Conversation Participants
        • Add participant to conversation
        • List participants
        • Get participant by ID
        • Get participant by identifier key and value
        • Update participant by ID
        • Update participant by identifier key and value
        • Delete participant
        • List participant conversations by ID
        • List participant conversations by identifier key and value
      • Workspace settings
        • Get antispam setting
        • Update antispam setting
        • Create allow/block rule
        • Get allow/block rule
        • List allow/block rules
        • Update allow/block rule
        • Delete allow/block rule
        • Add allow/block rules in bulk
        • Get allow/block bulk upload status
      • Events
  • Collaborations API
    • API reference
      • Agent Management
      • Team Management
      • Feeds
      • Feed item activity
      • Tags
      • Automation Rules
      • Business Hours
      • Capacity Rules
      • Routing Queues
      • Skills
      • SLA Policies
      • Macros
      • Sender Profiles
      • Ticket fields
  • Channels API
    • Supported channels
      • Programmable WhatsApp
        • Sending WhatsApp messages
        • Customer service window
        • Receiving messages
        • Message interactions
        • WhatsApp ISV integration
          • Setting up your customer workspaces
            • API Access
            • Associating your Facebook solution ID and business ID with your Bird CRM Organization
            • Creating a workspace for your customer
            • Buying a number through Bird
            • Subscribing to channel created webhooks
          • WhatsApp channel onboarding
            • Setting up the WhatsApp Embedded flow
            • Install WhatsApp phone number in Bird CRM
            • Subscribe to channel webhooks
      • Programmable SMS
        • Installing an SMS channel
          • US 10DLC API Installation
          • Toll-Free Numbers Verification API
        • Sending SMS messages
        • Receiving messages
        • Twilio Exit API
          • Using Twilio PHP SDK
          • Using Twilio Go SDK
          • Using Twilio Ruby SDK
        • Sinch Exit API
      • Programmable RCS
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Email
        • Sending Emails
        • Receiving messages
        • Message status
        • Message interactions
      • Programmable Line
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Telegram
        • Sending messages
        • Receiving messages
        • Message interactions
    • Message types
      • Text
      • Images
      • Files
      • List
      • Carousel
      • Template
    • Message status and interactions
      • Message Failure Codes
      • Message Failure Sources
        • SMS Platform Extended Error Codes
    • Send batch messages
    • API reference
      • Channel Groups
      • Messaging
      • Channels management
      • Channel connectors
      • Navigators
      • Compliance Keywords Messages
      • Conversions Sharing
      • Events
    • Rate Limit
  • Voice API
    • Installing a Voice channel
    • Voice Calls API
      • Initiate an outbound call
      • List calls from a channel
      • Get a call
      • Update a call
      • Answer a call
      • Ring a call
      • Hangup a call
      • Play a message in a call
      • Say Text-To-Speech (TTS)
      • Gather DTMF from a call
      • Forward a call
      • Record a Call
      • Record a call session
      • Update a call recording
      • List call recordings of a call
      • Get a call recording
      • Get a call insights
      • Get calls log
    • Recordings API
      • List Recordings
      • Get a Recording
      • Delete a Recording
      • List recording storage metrics
    • Transcriptions API
      • Initiate a Transcription
      • List Transcriptions
      • Get a Transcription
      • Delete a Transcription
    • Voice webhooks
    • Flash Calling API
  • Verify API
    • Verify API: Quick Start
  • Contacts API
    • Tracking Contact Events
      • API Reference
        • Get configuration
        • Track events
    • API reference
      • Manage workspace contacts
        • Create a contact
        • Get a contact
        • List contacts
        • Search contact by identifier
        • Update a contact
        • Create or update a contact by identifier
        • Delete a contact
      • Manage contact identifiers
        • Create contact identifier
        • List contact identifiers
        • Delete contact identifier
      • Manage contact attribute definition
        • Create attribute definition
        • Get attribute definition
        • List attribute definitions
      • Manage contact lists
        • Create a list
        • Get a list
        • List lists
        • Update a list
        • Delete a list
        • Add contacts to a list
        • Get contact list memberships
        • List contacts in a list
        • Remove contacts from a list
      • Lookup
        • Network/Country information for a phone number
  • Numbers API
    • API reference
      • Search Available Numbers
      • Buy a Number
      • List your Numbers
      • Get Long Code Number Details
      • Manage Endpoint Subscriptions
        • Cancel Number Subscription
      • Manage Endpoint Compliance Requirements
        • List Workspace compliace Requirements
        • Get Workspace Compliace Requirements
        • Update Workspace Compliace Requirements
      • 10DLC Compliance
        • Brands - Organization
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
        • Brands - workspace
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
          • List brand vettings
        • Campaigns
          • Optional: acting as Reseller
          • Create a campaign
          • List all campaigns
          • Get a campaign
          • Update a campaign
          • Delete a campaign
        • TCR Enums
        • Events
      • Toll-Free Numbers Verification API
      • Long Code Numbers
      • Short Code Numbers
      • Alphanumeric Senders
      • Events
  • Know-Your-Customer (KYC) API
    • List KYC forms
    • Get KYC form
    • Create KYC form entry
    • Update KYC form entry
    • List KYC form entries
    • Get a KYC form entry details
  • Reporting API
    • API reference
      • Channel Metrics
      • Flow Run Metrics
      • Wallet Metrics
      • Campaign Metrics
      • Message Metrics
  • Accounts API
    • API reference
      • Current user
        • Change password
        • Presigned upload
        • Memberships
        • Sessions
        • Configurations
          • Groups
            • Keys
      • IAM policies
      • Organizations
        • Upload media
        • Profile
        • Workspaces
        • Users
        • Access keys
        • Organization roles
        • Organization policies
        • Teams
          • Members
        • Approvals
          • Runs
            • Reviews
        • Configurations
          • Groups
            • Keys
      • Region groups
  • Touchpoints API
    • Supported Projects
      • Whatsapp Approved Message Templates
        • Creating WhatsApp Message templates
          • Text template blocks
          • Blocks Documentation
    • API reference
      • Projects
      • Message Templates
  • Notifications API
    • API Reference
      • Webhook subscriptions
        • Create a webhook subscription
        • List available webhook events
        • Get a webhook subscription
        • List webhook subscriptions
        • Update a webhook subscription
        • Delete a webhook subscription
        • Verifying a webhook subscription
        • Webhook subscription logs
  • Knowledge Base (KB) API
    • API reference
      • Documents
      • Folders
        • Import
      • Search
      • Presigned upload
  • Email API
    • Transmissions
  • Connectivity platform migration guide
    • Channels API and Conversations API
    • Migrating conversations API actions
    • Migrating WhatsApp channels
  • Client SDKs
    • Applications
    • Contact Profiles
      • Signed Identity
    • Push notifications
      • Quick Start
      • Subscribe contacts to push notification campaigns
      • Notification Display Priority
    • Event Tracking
      • Quick Start
      • Track Events
        • App
        • Audiences
        • Conference
        • Ecommerce
        • Hospitality
        • Lists
        • Messaging
        • Payments
        • Subscription
        • Suppressions
        • Survey
        • Web
    • App Inbox
      • Quick Start
      • Usage
      • Subscribe contacts to app inbox campaigns
    • SDK Integration
      • Android SDK
        • Notification Interactions
      • Swift SDK
        • Notification Interactions
      • Web SDK
        • Quick Start
        • Usage
        • API Reference
          • IdentityManager
          • BirdSdkApi
          • BirdTracker
            • Ecommerce
            • Conference
            • Messaging
            • Suppressions
            • Subscription
            • Survey
            • Web
            • Audiences
        • Web Push Notifications
          • Notification Interactions
  • Quickstarts
    • Conversations
    • Send an SMS message
    • Send an Email message
    • Send a WhatsApp message
Powered by GitBook
On this page
  • Channels API Overview
  • When to use Channels API vs. Conversations API
  • Using the Channels API
  • Message lifecycle

Was this helpful?

  1. Connectivity platform migration guide

Channels API and Conversations API

Last updated 5 months ago

Was this helpful?

Bird’s Channels API and Conversations API are designed to power seamless messaging workflows for businesses. While both APIs serve distinct purposes, understanding their capabilities and use cases will ensure you select the right API for your needs.

This guide covers:

Channels API Overview

The Channels API by Bird enables businesses to send and receive messages across multiple communication platforms through a unified interface. It simplifies customer engagement by ensuring consistent messaging across all supported channels.

Primary Functions

  • Message Delivery: Send messages across platforms from a single endpoint.

  • Channel Management: Manage different channels such as SMS, Email, WhatsApp, etc., to suit business needs.

  • Message Tracking: Monitor message status and interactions.

  • Media Handling: Upload and manage media files across supported channels.

Supported Channels and Message Types

  • Supported Channels: WhatsApp, Email, SMS, Facebook Messenger, Instagram, Line, Telegram, Google RCS, Voice, LinkedIn Pages Messaging.

  • Supported Message Types: Text Messages, Image Messages, File Messages, List Messages, Carousel Messages.

When to use Channels API vs. Conversations API

Channels API

The Channels API is designed for direct and lightweight messaging scenarios, offering robust tools to integrate messaging workflows with external systems while simplifying communication management. Its design focuses on programmatic interactions across supported channels. Here’s when to use it:

Channels API use cases:

Integration with external systems
  • Seamless connections to CRM systems, e-commerce platforms, and other business tools.

  • Programmatic message sending from external applications or services.

  • Ideal for sending reminders, confirmations, or system-generated alerts.

  • Triggers messages based on specific events or conditions.

Automated messaging
  • Perfect for marketing campaigns, announcements, and updates.

  • Allows sending messages to multiple recipients simultaneously.

Campaign messaging
  • Designed for SMS, email, or other supported channels without complex conversation management.

  • Works best for straightforward, one-off messages like notifications or promotions.

Lightweight integrations for specific channels
  • Suitable for transactional messages, alerts, or simple notifications.

  • Ideal for scenarios where maintaining a conversation history isn’t required.

Conversations API

The Conversations API is designed for managing contextual, multi-channel conversations. It is perfect for workflows that involve customer support or unified communication across channels.

Conversations API use cases:

Omni-channel messaging with unified conversations
  • Consolidates communication across multiple channels (e.g., SMS, WhatsApp, Facebook Messenger) into a single conversation thread.

  • Provides a unified view of customer interactions to streamline workflows.

Advanced conversation management
  • Supports creating, updating, retrieving, and deleting conversations programmatically.

  • Allows adding/removing participants and managing message states efficiently.

Enhanced customer support and engagement
  • Enables real-time, two-way communication with advanced features like typing indicators, read receipts, and message threading.

  • Improves customer satisfaction by facilitating faster resolutions.

Integration with CRM and support systems
  • Integrates seamlessly with CRM systems to provide rich context for customer interactions.

  • Grants agents access to customer profiles, conversation histories, and other relevant data.

Comparison of use cases

Use Case
Channels API
Conversations API

Direct messaging without conversation context

âś…

❌

Lightweight integrations for specific channels

âś…

❌

Campaign messaging

âś…

❌

Automated messaging

âś…

❌

Integration with external systems

âś…

âś…

Omni-channel messaging with conversations

❌

âś…

Advanced conversation management

❌

âś…

Enhanced customer support and engagemen

❌

âś…

Integration with CRM and support systems

❌

âś…

Using the Channels API

Sending Messages

To start using the Channels API for messaging, follow these steps:

  1. Obtain an access key

  2. Set up API permissions

    Ensure your access key has the necessary permissions to send messages. Configure access policies to allow message creation for the specific channel. For example, to send messages via the API, your access policy should include:

    • Action: create

    • Resource: /workspaces/*/channels/*/messages

  3. Send a message

    • With the channel installed and permissions configured, you can send messages using the Channels API. Below are examples for sending SMS and WhatsApp messages.

Example: sending an SMS message (text) - POST request in HTTP
POST /v1/workspaces/{workspace_id}/channels/{channel_id}/messages
Content-Type: application/json
Authorization: AccessKey {your_access_key}
{
   "to": "+1234567890",
   "content": {
      "type": "text",
      "text": "Hello, this is a test message."
   }
}
Example: sending a WhatsApp message (image) - POST request in HTTP
POST /v1/workspaces/{workspace_id}/channels/{channel_id}/messages
Content-Type: application/json
Authorization: AccessKey {your_access_key}
{
  "to": "+1234567890",
  "content": {
    "type": "image",
    "image": {
      "images": [
        {
          "altText": "Label of first image",
          "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FRPPgQAGyZE7rvIh3WM2Z%2Fimage2.avif?alt=media"
        }
      ]
    }
  }
}

Note: Replace {workspace_id}, {channel_id}, and {your_access_key} with your actual workspace ID, channel ID, and access key, respectively.

Receiving Messages

After sending a message, the API returns a response indicating the status of the request. Ensure your application handles these responses properly to manage success and error scenarios.

Inbound Message Handling

To process incoming messages:

  1. Configure Webhooks: Set up webhooks to listen for incoming messages.

  2. Subscribe to Events: Use Bird’s Webhook Settings to subscribe to specific events like incoming messages.

    • Steps to set up webhooks:

      • Access Webhook Settings in your Bird account.

        • Create a new webhook subscription by providing your application's endpoint URL.

        • Select events to subscribe to, such as incoming messages.

        • Verify the webhook with Bird to confirm availability.

  3. Process Incoming Messages: When a message is received, the webhook sends an HTTP POST request containing the message data

Example of processing incoming messages

Example request - POST request in HTTP
{
   "service": "channels",
   "event": "whatsapp.inbound",
   "payload": {
      "id": "73d06288-de38-4277-9531-b9a43bd59833",
      "channelId": "511937e8-76d8-4f76-bb53-7196b05653f9",
      "sender": {
         "contact": {
            "id": "83fff87d-e9d5-44d2-bb8c-a9feda99051f",
            "identifierKey": "phonenumber",
            "identifierValue": "+123456789",
            "annotations": {
               "name": "John Doe"
            }
         }
      },
      "body": {
         "type": "text",
         "text": {
            "text": "Hello, this is a sample message."
         }
      },
      "status": "delivered",
      "direction": "incoming",
      "meta": {
         "extraInformation": {
            "timestamp": "1731503864",
            "user_locale": "en-US"
         }
      },
      "createdAt": "2024-11-13T13:17:46.973Z"
   }
}

Example: Processing an incoming message - Python

Below is a simple Flask app that processes incoming messages, extracting the sender’s name and message content:

from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
    data = request.json
    sender_name = data['payload']['sender']['contact']['annotations'].get('name')
    message_content = data['payload']['body']['text']['text']
    print(f"Received message from {sender_name}: {message_content}")
    # Add further processing logic as needed
    return jsonify({'status': 'success'}), 200
if __name__ == '__main__':
    app.run(port=5000)

Key parameters
  • direction: Specifies the message direction. For example, incoming indicates the message was received from an external sender.

  • annotations: Includes additional metadata, such as the sender’s name.

  • identifierKey: The type of identifier used (e.g., phonenumber).

  • identifierValue: The sender’s phone number.

  • contact.id: A unique identifier for the sender’s contact.

  • sender: Provides information about the message sender.

  • channelId: Identifies the specific channel through which the message was received, helping route messages in your application.

  • event: Defines the specific event type, such as whatsapp.inbound for inbound WhatsApp messages.

  • service: Specifies the type of API service. For example, channels indicates the message was received through Bird’s Channels API.

Handling message status updates

Tracking delivery and read receipts

With Bird’s Channels API, you can monitor the full lifecycle of a message, including when it’s sent, delivered, and read. Setting up webhooks enables you to receive real-time notifications for these events. To track message status updates:

  • Follow the same webhook setup process used for receiving incoming messages.

  • Select the {platform_id}.interactions event type (e.g., whatsapp.interaction) to receive notifications for delivery and read receipts.

Message lifecycle

Bird’s API provides status updates at key stages of the message lifecycle, giving businesses enhanced tracking capabilities and actionable insights. This level of granularity is particularly beneficial for businesses migrating from systems with limited tracking.

Key lifecycle events

  • Sent: The message has been successfully sent to the platform (e.g., WhatsApp, SMS provider).

  • Delivered: The message has reached the recipient’s device, confirming network delivery.

  • Read: The recipient has opened and read the message, providing assurance of engagement.

  • Failed: In cases where delivery fails, Bird provides a failure event, helping you identify issues like invalid numbers or network errors.

Tracking these events enables businesses to measure engagement, optimize communication strategies, and quickly troubleshoot delivery issues.

Example of a message status update event - JSON

When a message status update occurs, Bird sends a payload to your configured webhook endpoint. Below is an example of a read receipt event on the WhatsApp platform:

{
   "service": "channels",
   "event": "whatsapp.interaction",
   "payload": {
      "id": "ca4d7fbc-a1dc-11ef-88bc-0a58a9feac02",
      "type": "read",
      "createdAt": "2024-11-13T16:31:50Z",
      "messageId": "34d2d62f-b163-444e-9bb4-9345f957ef98",
      "channelId": "511937e8-76d8-4f76-bb53-7196b05653f9",
      "platformId": "whatsapp",
      "messageReference": "wamid.HBgLMzE2Mjc1NDM1ODEVAgARGBJBRDRGRDY3NjkxMTlCNEMyRUUA",
      "messagePartsCount": 1,
      "receiver": {
         "contacts": [
            {
               "id": "83fff87d-e9d5-44d2-bb8c-a9feda99051f",
               "identifierKey": "phonenumber",
               "identifierValue": "+123456789",
               "annotations": {
                  "name": "John Doe"
               },
               "countryCode": "NL"
            }
         ]
      }
   }
}

Key parameters
  • service: Indicates that this event is managed through the "channels" API.

  • event: "whatsapp.interaction" identifies this as an interaction event specific to WhatsApp.

  • type: Describes the type of interaction. Here it’s "read", signaling a read receipt.

  • createdAt: The timestamp for when the interaction was logged in Bird’s system.

  • messageId: A unique identifier for the message, enabling precise tracking and reference.

  • platformId: Specifies the platform type, here indicating "whatsapp".

  • receiver: Contains details about the recipient, such as phone number, name, and country.

Implementing message tracking

To track and process message statuses, follow these steps:

  1. Configure your webhook endpoint: Set up an endpoint to receive lifecycle events.

  2. When an event occurs, the application identifies the "whatsapp.interaction" event and logs key details such as:

    • Interaction type (e.g., read).

    • Message ID for precise tracking.

    • Recipient contact for auditing and reporting.

This setup can be extended to process various event types, including sent, delivered, and failed notifications, enabling your team to monitor message journeys in real time.

Example using Flask to demonstrate how to process message status updates - Python
from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/webhook', methods=['POST'])
def webhook():
    data = request.json
    if data['event'] == 'whatsapp.interaction':
        interaction_type = data['payload']['type']
        message_id = data['payload']['messageId']
        contact = data['payload']['receiver']['contacts'][0]['identifierValue']
        print(f"Message {message_id} to {contact} has been {interaction_type}")
        # Add further handling logic here
    return jsonify({'status': 'success'}), 200

if __name__ == '__main__':
    app.run(port=5000)

Benefits of message lifecycle tracking

Integrating Bird’s message lifecycle tracking into your workflow provides actionable insights into customer communication. This advanced tracking system:

  • Replaces traditional messaging methods by offering updates across multiple touchpoints.

  • Enhances engagement strategies, increasing response rates and reducing customer follow-up efforts.

For more detailed information on the Conversations API and its capabilities, refer to the .

Install the Desired Channel Install the communication channel (e.g., SMS, WhatsApp) you intend to use. For instructions, refer to .

An access key is required to authenticate API requests. Generate this key in your Bird account dashboard under the API settings section. For more information on API authorization, please refer to the detailed documentation .

Detailed information on setting up permissions is available in the .

For more details and examples, consult the .

For additional guidance, refer to Bird’s documentation on .

For further customization, refer to Bird’s for more details on processing incoming messages.

For more information on message status events, refer to Bird’s . This resource provides additional guidance on setting up and managing message lifecycle events to maximize the impact of your communication efforts.

official Bird API documentation
Bird's guid on finding and installing a channel
here
Channels API documentation
Channels API reference
receiving messages via webhooks
Channels API documentation
Channels API documentation
An overview of the Channels API.
When to use the Channels API vs. the Conversations API.
Detailed instructions for using the Channels API.
Message lifecycle tracking and webhook integrations.