Provision a new phone line
Provisions a new US phone number and creates a line with the specified configuration. Costs $2.50/month per number — first number free for 30 days. The phone number is assigned automatically.
Authentication
Send as Authorization: Bearer <your-key>. Obtain keys from the portal — prefix sk_live_ for production, sk_test_ for sandbox.
Request
Human-readable name for the line
audio: you handle audio via WebSocket. webhook: you receive transcript webhooks (canonical name). text: legacy alias for webhook — still accepted, normalized server-side. hosted: Saperly AI handles the conversation.
WebSocket URL for audio streaming (required for audio mode, must be wss://)
HTTPS URL to receive call events (required for webhook mode)
Whether to enforce compliance checks (disclosure, consent)
First message spoken by the AI when a call connects (hosted mode)
Saperly voice slug from GET /v1/voices (e.g. “aria”, “hebrew-warm”)
v0.5.10. Pin the Deepgram speech-to-text language for incoming callers. Defaults to multi (auto-detect per fragment). Pin to a specific code to dramatically improve accuracy on non-English callers — Deepgram’s nova-3 multilingual auto-detect can transcribe Hebrew as Hindi or Spanish as Italian; pinning fixes that. Not supported on hosted-mode lines — Saperly handles language automatically on hosted lines.
v0.5.10. Advanced. Override the Deepgram endpointing window for this line (the silence duration after the caller stops speaking before the transcript is finalized). Default: ~700ms platform-wide. Most customers should leave this null. Lower values produce snappier turn-taking; higher values produce cleaner transcripts for slow speakers. Not supported on hosted-mode lines.
