connections

Create a connection (provisions inline)

post/connections

Request

  • Base URL: https://api.saperly.com
  • URL: https://api.saperly.com/connections
  • Auth: none required

Request body

namestring required

A human-readable name for the connection (1–120 characters).

mode'hosted' | 'manual' nullable

How the line is handled. 'hosted' (default): an in-network voice assistant (cascade STT → LLM → TTS) is the brain. 'manual': your own LLM is the brain — Saperly forwards text turns and executes the directives you return. Audio stays in-network in both modes.

backend'network' | 'openai_realtime' nullable

The hosted brain backend. Today only 'network' (an in-network voice assistant) is available; 'openai_realtime' is disabled and rejected on create/update.

instructionsstring nullable

The system prompt that defines the assistant's behavior. Put any opening line here — there is no separate greeting field.

languagestring nullable

The spoken language as a BCP-47 tag (e.g. "en", "es", "en-US"). On hosted lines it is the in-network transcription hint — which language the caller speaks (pair it with a voice that speaks the same language, and instruct the model to reply in it). On manual lines it is the Conversation Relay language, steering in-network transcription AND the spoken voice. Discover the supported set from GET /languages (or filter GET /voices by language); any well-formed tag is accepted. Send "" to clear it (auto-detect).

complianceEnabledboolean nullable

When true (the default), the do-not-message tool is exposed and disclosure is spoken as the line's first, uninterruptible utterance (the TCPA notice). When on with no disclosure, a standard org-named default is filled in.

smsAutoReplyboolean nullable

Hosted-line opt-in to auto-answer inbound SMS with the model. Defaults off. (Manual lines forward to their webhook brain regardless.)

disclosurestring nullable

The TCPA notice spoken first, uninterruptibly, when complianceEnabled is on. Leave empty with compliance on and Saperly fills a standard org-named default.

manualWebhookUrlstring nullable

Manual-mode webhook-brain URL: where Saperly POSTs each turn (signed with the connection's manualSecret) when no live agent socket is connected. Only meaningful for manual mode; send "" to clear it.

Response

Success

idstring required
namestring required
mode'hosted' | 'manual' required
instructionsstring required
languagestring nullable required
complianceEnabledboolean required
smsAutoReplyboolean required
disclosurestring required
recordingEnabledboolean required
manualSecretstring nullable required
manualWebhookUrlstring nullable required
createdAtstring required
backend'network' | 'openai_realtime' required

Changes

No recorded changes to this operation across all 1 revision of this API.