Update a line

Updates one or more fields on a line. Only provided fields are changed, with one mode-switch exception: switching `mode` to `audio` while `webhook_url` is currently set implicitly clears `webhook_url` to null (so the SMS webhook route does not keep delivering to a URL the line no longer uses). To preserve `webhook_url` across an audio-mode switch, pass it explicitly in the same PATCH body.

Authentication

AuthorizationBearer

Send as Authorization: Bearer <your-key>. Obtain keys from the portal — prefix sk_live_ for production, sk_test_ for sandbox.

Path parameters

idstringRequiredformat: "uuid"
Line ID

Request

This endpoint expects an object.
namestringOptional>=1 character

Human-readable name for the line

modeenumOptional

Switch the line’s transport. Switching to audio while the line currently has a webhook_url set implicitly clears webhook_url to null unless webhook_url is also passed in this same request.

Allowed values:
audio_handler_urlstring or nullOptionalformat: "uri"

WebSocket URL for audio streaming (must be wss://)

webhook_urlstring or nullOptionalformat: "uri"
HTTPS URL to receive call events
status_callback_urlstring or nullOptionalformat: "uri"
HTTPS URL for call status updates
compliance_enabledbooleanOptional
Whether to enforce compliance checks
system_promptstring or nullOptional1-4000 characters
System prompt for hosted mode AI conversations
begin_messagestring or nullOptional1-500 characters
First message spoken by the AI when a call connects
voicestring or nullOptional

ElevenLabs voice ID from GET /v1/voices

context_limitinteger or nullOptional1-50
Number of conversation turns to include as context
recording_enabledbooleanOptional
Whether to record calls on this line

Response

Line updated
lineobject

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error