Email API for
Python.
Use the synchronous Bird client in a script, web handler or worker that can wait for the API result. Treat a successful send call as acceptance and observe recipient outcomes separately.

To a traceable send.
See the first send.
python -m pip install messagebird-sdkpython send.pyfrom bird import APIError, Bird
with Bird() as client:
try:
message = client.email.send(
from_={"email": "onboarding@messagebird.dev", "name": "Bird"},
to=["delivered@messagebird.dev"],
subject="Hello from Bird",
html="<p>My first Bird email.</p>",
)
print(message.id, message.status)
except APIError as err:
print("send failed:", err)
Onboarding sender and sandbox recipient only. This page does not send an email or contain a key.
ZIP with the displayed request, setup notes and an empty key template. A sandbox code sample, not a complete application. SDK version in the sample: 0.66.0; review current maintained setup before adapting it.
em_01ky7ma8y2es1s2akzk53tmjn0 accepted
The returned ID lets you retrieve the message and follow recipient events. Acceptance does not prove delivery or inbox placement.
If your sender is not verified
A sender outside your verified domain or the onboarding domain is refused before sending. Correct the sender setup; a rejected request is not a delivery event.
Sending domains guideIf the response is missing
Keep the original operation unresolved and inspect its record before repeating it. The SDK reuses identity for retries within one call; a new invocation normally creates a new operation. Your application owns durable job identity and deliberate replay. Completed responses are retained for three hours; after expiry, the same key can start a new operation. Retention does not make side effects atomic. Follow the idempotency guide before replaying. This sample does not provide a retry queue.
Idempotency and recovery guide ↗SDK request and retry optionsRuntime and installation.
Bird’s Python quickstart requires Python 3.10+ and messagebird-sdk. Its sample imports Bird from the bird package and uses the synchronous context manager.
Choose where to send.
A worker can store the accepted ID alongside its own task. In an async web path, assess event-loop blocking and use only an async API supported by the installed SDK; follow the synchronous example in Bird’s Python quickstart.
Track delivery and retries.
The context manager closes the client. Handle APIError as a send failure; use the returned ID to inspect a later delivery result. A transport error or “send failed” log can leave acceptance unknown; reconcile the original operation before retrying.
Prepare for
production sending.
Verify a production domain, keep your key on the server, and follow the recipient outcome separately from request acceptance.
For example, 10,000 signups with one welcome and one follow-up imply 20,000 planned sends before other traffic. Confirm actual processed units and peak daily volume, then compare included units, domain/webhook limits, overage and the send ceiling. Count dedicated IPs or other Email products separately where applicable. Sandbox testing is not an unlimited free-production offer.
Current Email plans and usage rates ↗ · Compare provider responsibilities and commercial units ↗