Skip to main content

dial-sdk

Official Python SDK for Dial — phone numbers, SMS, WhatsApp, and voice calls for AI agents.

Install

pip install dial-sdk
# or
uv add dial-sdk

Requires Python 3.11+.

Quickstart

The client is async. Construct it with a DialConfig, then call its methods inside an async with block:

import asyncio
from dial_sdk import DialClient, DialConfig, SendMessageParams, MakeCallParams

async def main():
    async with DialClient(DialConfig(api_key="sk_live_...")) as dial:
        # List your numbers
        numbers = await dial.list_numbers()
        from_id = numbers[0].id

        # Send an SMS
        await dial.send_message(SendMessageParams(
            to="+15551234567",
            from_number_id=from_id,
            body="Hello from Dial",
        ))

        # Place an AI voice call
        call = await dial.make_call(MakeCallParams(
            to="+15551234567",
            from_number_id=from_id,
            outbound_instruction="You are a friendly assistant confirming an appointment.",
        ))
        print(call.id, call.status)

asyncio.run(main())

DialConfig.base_url defaults to https://api.getdial.ai. Override it for local or self-hosted setups.

Live events

Incoming messages and call transcripts stream via an async generator:

async with DialClient(DialConfig(api_key="sk_live_...")) as dial:
    async with dial.new_events_connection() as events:
        async for event in events:
            print(event)  # MessageEvent / CallEvent / CallTranscribed / ...

Client methods

Method Description
list_numbers() List the phone numbers on your account
purchase_number(params) Buy a new number (PurchaseNumberParams)
set_number_properties(...) Update a number's nickname / inbound instruction
send_message(params) Send an SMS or WhatsApp message (SendMessageParams)
reply_to_message(message_id, *, body=None, reaction=None) Reply or react to a message (exactly one of body/reaction)
list_messages(...) List messages, optionally filtered (contact for one conversation, search by text)
list_contacts(...) One page of the numbers your lines have talked to (number_id for one line's)
list_all_contacts(...) Every contact, following the cursor
make_call(params) Place an outbound AI voice call (MakeCallParams)
list_calls(...) List calls, optionally filtered
get_call(call_id) Fetch a single call
stop_call(call_id) Cancel a queued/ringing call, or hang up one in progress
new_events_connection() Open a live event stream

Metadata

Release files for dial-sdk 0.40.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dial-sdk 0.40.2
File Size Uploaded
dial_sdk-0.40.2.tar.gz 119.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dial-sdk 0.40.2
File Interpreter ABI Platform
dial_sdk-0.40.2-py3-none-any.whl Python 3 none any Details

Total release size: 150.4 kB

Release files / dial_sdk-0.40.2.tar.gz

Download URL dial_sdk-0.40.2.tar.gz
Size 119.0 kB
Tags Source
SHA-256 checksum
How to use checksums
de7a15d99d5e0d8ca2b0576a9d5f40526dc723f52c9a28f47ce8cd99c90f2281
BLAKE2b-256 checksum
How to use checksums
61f73b4459bee6b23e4bf57031f1cead9a42037f5b7cd254f0443f331c288d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / dial_sdk-0.40.2-py3-none-any.whl

Download URL dial_sdk-0.40.2-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5456f3a9644ca0ae3d20ac323c032e76e5a077875c7300a5d87be6d2fddcc591
BLAKE2b-256 checksum
How to use checksums
933fc11b157580cdaaf8228d5ee0eeb8ada4e7115447f197d6c17196569b157f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.41.1

2 release files

0.41.0

2 release files

This release

0.40.2 This release

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.21.0

2 release files

0.19.0

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.12.0

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page