Skip to main content

Install

Requires Python 3.10+.

Quickstart

Verifying webhooks

Rate-limit handling

By default the client retries 429s up to 3 times, respecting Retry-After:

Async

Both sync and async clients ship in the same package.

Error handling

OAuth helpers

For partner apps that act on behalf of individual Yotel users, the SDK ships PKCE-ready OAuth helpers in yotel.oauth:
For the server-to-server JWT Bearer grant, install the oauth extra:
See OAuth 2.0 for the full flow reference.

Recordings

Access call recordings — signed URLs, raw bytes, or streamed to disk.
get_signed_url requires calls:read scope. fetch_bytes and download require the separate recordings:download scope.
See Recordings API for response details.

Voice agents

Full CRUD for voice agent routing aliases.
See Voice agents CRUD and Voice agent defaults.

AI sessions

Control active voice AI sessions with typed verb methods.
All 25 control verbs are available as typed methods: transfer, hangup, log, mute, unmute, hold, unhold, send_dtmf, play_audio, set_disposition, recording_pause, recording_resume, get_call_state, conference_start, conference_add, conference_remove, conference_leave, request_supervisor, whisper, barge, monitor_start, monitor_stop, set_lead_field, set_lead_status, schedule_callback. report_outcome is not one of them — it is the post-call report, so send it after the call has ended. The per-call callback token stays valid for 180 seconds after the audio WebSocket closes, for this endpoint only, and the endpoint accepts a session that has already ended, so it never returns a 409. Last write wins, which makes retries safe: unlike the control verbs, this call deliberately sends no Idempotency-Key header. end_initiated_by and summary are left out of the request body when you pass None. See AI sessions and the Control API reference for verb parameters, and Report a post-call outcome for the full body rules.

Additional error types

Beyond the base errors, voice agent and AI session operations can raise:
See Error reference for details.

Source

github.com/kamal-zetta/dialer/tree/main/sdks/python