MessageBird (now Bird)

2.2.0 · deprecated · verified Fri Mar 27

MessageBird rebranded as Bird in February 2024. The old messagebird PyPI package (last version 2.2.0, released 2022) is no longer maintained and targets the legacy API. The new Python SDK is bird-python on PyPI, targeting the Bird API at docs.bird.com. LLMs almost universally generate the old package name.

Warnings

Install

Imports

Quickstart

New Bird SDK pattern. Requires workspace and channel selection before sending.

# Install: pip install bird-python
import messagebird  # import name unchanged in bird-python

client = messagebird.Client('YOUR_ACCESS_KEY')

try:
    # New Bird API — workspace + channel based
    client.workspaces = client.workspace_list()['results'][0]['id']
    channel_id = client.channel_list()['results'][0]['id']

    response = client.send_message(
        channels_id=channel_id,
        body={
            'receiver': {
                'contacts': [{'identifierValue': '+14155551234'}]
            },
            'body': {
                'type': 'text',
                'text': {'text': 'Hello from Bird!'}
            }
        }
    )
except messagebird.client.ErrorException as e:
    for error in e.errors:
        print(error.description)

view raw JSON →