Infobip
Official Python client for Infobip communications APIs (SMS, WhatsApp, Email, Voice). Current version is 6.0.0 (Jan 2026). Requires Python >=3.9. Auto-generated from OpenAPI spec — every major version contains breaking changes. Requires account-specific base URL (not a generic endpoint). Two separate packages exist: the official infobip-api-python-client and the community infobip-api-python-sdk.
Warnings
- breaking Every major version of infobip-api-python-client contains breaking changes. The library is auto-generated from OpenAPI spec — model names, method signatures, and endpoint paths change between versions. Code written for v3 will not work on v5 or v6.
- breaking Account-specific base URL is required. Using a generic URL like https://api.infobip.com causes authentication failures. Each Infobip account has a unique subdomain assigned at account creation.
- breaking SMS API endpoint changed: /sms/3/messages (V3) replaced /sms/2/text/advanced (V2) in v5.x. Email API /email/4/messages (V4) replaced /email/3/send (V3). Old endpoint paths and corresponding SDK methods are removed.
- breaking Python 3.8 support dropped in v6.0. Minimum is now Python 3.9.
- breaking HTTPS enforcement added in v6.0. Passing http:// as the host URL now raises ValueError at configuration time.
- gotcha Two separate packages exist: infobip-api-python-client (official, auto-generated, breaking changes each major) and infobip-api-python-sdk (community, different API style, last updated 2023). They have different import patterns and are not interchangeable.
Install
-
pip install infobip-api-python-client -
pip install infobip-api-python-sdk
Imports
- infobip_api_client
from infobip_api_client.api.sms_api import SmsApi from infobip_api_client.api_client import ApiClient, Configuration from infobip_api_client.models import SmsAdvancedTextualRequest, SmsDestination, SmsTextualMessage # Account-specific base URL required — not a generic URL configuration = Configuration( host='https://ACCOUNT_BASE_URL.api.infobip.com', # from Infobip dashboard api_key={'APIKeyHeader': 'App YOUR_API_KEY'} ) with ApiClient(configuration) as api_client: api_instance = SmsApi(api_client) request = SmsAdvancedTextualRequest( messages=[SmsTextualMessage( destinations=[SmsDestination(to='+14155551234')], from_='InfoSMS', text='Hello World!' )] ) response = api_instance.send_sms_message(sms_advanced_textual_request=request)
Quickstart
from infobip_api_client.api.sms_api import SmsApi
from infobip_api_client.api_client import ApiClient, Configuration
from infobip_api_client.models import (
SmsAdvancedTextualRequest,
SmsDestination,
SmsTextualMessage
)
# Get base_url from: app.infobip.com → API Keys
configuration = Configuration(
host='https://XXXXX.api.infobip.com',
api_key={'APIKeyHeader': 'App YOUR_API_KEY'}
)
with ApiClient(configuration) as api_client:
sms_api = SmsApi(api_client)
request = SmsAdvancedTextualRequest(
messages=[
SmsTextualMessage(
destinations=[SmsDestination(to='+14155551234')],
from_='InfoSMS',
text='Hello from Infobip!'
)
]
)
response = sms_api.send_sms_message(
sms_advanced_textual_request=request
)
print(response.messages[0].message_id)