Skip to main content

Official Python SDK for the SIPTEL REST API (voice, AI agents, SMS, numbers, SIP).

Project description

SIPTEL Python SDK

Official Python client for the SIPTEL REST API — AI voice agents, programmable Voice API, SMS, phone numbers, and SIP trunks.

Install

pip install siptel

Quick start

Set your API key (from the dashboard):

export SIPTEL_API_KEY="sk_live_..."   # Linux/macOS
# set SIPTEL_API_KEY=sk_live_...      # Windows CMD
from siptel import Client

client = Client()

# List AI agents
agents = client.agent.list_agents()

# Outbound AI agent call (see docs for all parameters)
result = client.agent.create_call(
    phone_number="+31612345678",
    caller_id="+31201234567",
    voice="Rachel",
    record=True,
    voicemail_action="hangup",
    greeting_message="Hello!",
    task_prompt="You are a helpful assistant.",
    language="en-US",
)

# Voice API
call = client.voice.retrieve_call("CA20251109171204335505")

# SMS
client.sms.send(
    app_id="...",
    phone_number="+31612345678",
    sender_id="SIPTEL",
    text="Hello from SIPTEL",
)

# Numbers
numbers = client.numbers.list()

Authentication

All requests use Authorization: Bearer <api_key>. You can pass the key explicitly:

client = Client(api_key="sk_live_...")

Configuration

Option Environment variable Default
API key SIPTEL_API_KEY
Base URL SIPTEL_BASE_URL (not auto-read; pass base_url=) https://api.siptel.ai
User-Agent SIPTEL_USER_AGENT SiptelPythonSDK/0.1
client = Client(
    api_key="sk_live_...",
    base_url="https://api.siptel.ai",
    timeout=60.0,
)

Resource layout

Namespace API area
client.agent AI agent calls, list/get agents
client.voice Voice API (play, gather, transfer, hangup, call status)
client.sip SIP users / trunks
client.sms Send SMS, list SMS apps
client.numbers List/search/purchase/assign numbers

Errors

The SDK raises typed exceptions on HTTP error responses:

from siptel import (
    Client,
    AuthenticationError,
    InvalidRequestError,
    NotFoundError,
    PaymentRequiredError,
    RateLimitError,
    APIError,
)

try:
    client.sms.send(...)
except InvalidRequestError as e:
    print(e.status_code, e.response_body)

Low-level API

For endpoints not yet wrapped, use the escape hatch:

client.post("/v1/agent/call", json={...})
client.get("/v1/custom/path")

Requirements

  • Python 3.10+
  • requests

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siptel-0.1.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

siptel-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file siptel-0.1.1.tar.gz.

File metadata

  • Download URL: siptel-0.1.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for siptel-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a85afa4668a9f40454f1fa5ba0e2fd70a51355009ca885203b6504243f1f003
MD5 40296cac12ac25372dbb83908ac0cf58
BLAKE2b-256 a7875953ac19b9de0573bdd5939705cca5bbb52477102004304c115d70d101f6

See more details on using hashes here.

File details

Details for the file siptel-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: siptel-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for siptel-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b7c8c3c9c07ab7641017ad06571f90139c6aaafb1237b1a224509ec878c741a
MD5 4822ff4fbc1a0bc72954e3092581df45
BLAKE2b-256 2c9cabd940f3deb49ece8c150541a08eded9cc30f08ae264e370a7dd7270213e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page