Update Voice Connection
(v2)PUT
Changes a voice connection and returns it. Only the fields you send are touched. Sending config replaces it whole and marks the connection unverified until its next test call.
curl -X PUT "https://api.confident-ai.com/v2/voice-connections/{voiceConnectionId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Support line",
"config": {
"transport": "PHONE",
"phoneNumber": "+14155550100",
"carrier": "CONFIDENT",
"trunkUri": "sip:outbound@trunk.example.com",
"trunkCredentials": {
"username": "confident",
"password": "YOUR-SIP-PASSWORD"
},
"callerId": "+14155550199",
"mediaEncryption": "DISABLED"
},
"callSettings": {
"maxConcurrentCalls": 1,
"ringTimeoutS": 45,
"maxCallDurationS": 1800,
"silenceTimeoutS": 30,
"recordCalls": true,
"traceTimeout": 120
}
}'{
"success": true,
"data": {
"id": "<VOICE-CONNECTION-ID>",
"projectId": "<PROJECT-ID>",
"name": "Support line",
"active": true,
"config": {
"transport": "PHONE",
"phoneNumber": "+14155550100",
"carrier": "CONFIDENT",
"trunkUri": "sip:outbound@trunk.example.com",
"trunkCredentials": {
"username": "confident",
"password": "YOUR-SIP-PASSWORD"
},
"callerId": "+14155550199",
"mediaEncryption": "DISABLED"
},
"callSettings": {
"maxConcurrentCalls": 1,
"ringTimeoutS": 45,
"maxCallDurationS": 1800,
"silenceTimeoutS": 30,
"recordCalls": true,
"traceTimeout": 120
},
"createdAt": "2026-10-01T09:12:00.000Z",
"updatedAt": "2026-10-08T16:40:00.000Z"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/voice-connections/<VOICE-CONNECTION-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
voiceConnectionIdstringRequiredThe id of the voice connection.
Request body
namestringA new name, unique within the project.
configobject | object | objectHow Confident AI reaches your voice agent.
transportdecides which shape applies.Show 3 variantsHide 3 variants
Phone Voice ConfigobjectDials your agent over the phone network.
Show 7 propertiesHide 7 properties
transportenumRequiredShow 1 enum valueHide 1 enum value
PHONE
phoneNumberstringRequiredThe E.164 phone number to dial.
carrierenumRequiredWho carries the call to the phone network:
CONFIDENTuses Confident AI's own trunk,CUSTOM_TRUNKuses yours.Show 2 enum valuesHide 2 enum values
CONFIDENTCUSTOM_TRUNK
trunkUristringRequiredThe sip: address of your outbound trunk. Required when
carrierisCUSTOM_TRUNK.trunkCredentialsobject | nullRequiredDigest credentials used to authenticate a SIP call.
Show 2 propertiesHide 2 properties
usernamestringRequiredThe SIP digest username.
passwordstringRequiredThe SIP digest password. Reads return it masked; send that masked value back to keep the stored one.
callerIdstringRequiredThe number or sip: address presented to your agent as the caller. Leave it empty to use the default.
mediaEncryptionenumWhether call audio is encrypted with SRTP.
DISABLEDsends plain RTP,ALLOWEDoffers SRTP and falls back to plain RTP, andREQUIREDfails calls that can't be encrypted.Show 3 enum valuesHide 3 enum values
DISABLEDALLOWEDREQUIRED
- OR
SIP Voice ConfigobjectCalls your agent's SIP address directly.
Show 8 propertiesHide 8 properties
transportenumRequiredShow 1 enum valueHide 1 enum value
SIP
sipUristringRequiredThe sip: address of your agent.
signalingTransportenumRequiredThe transport used for SIP signaling. A
;transport=parameter onsipUritakes precedence.Show 3 enum valuesHide 3 enum values
UDPTCPTLS
credentialsobject | nullRequiredDigest credentials used to authenticate a SIP call.
Show 2 propertiesHide 2 properties
usernamestringRequiredThe SIP digest username.
passwordstringRequiredThe SIP digest password. Reads return it masked; send that masked value back to keep the stored one.
callerIdstringRequiredThe number or sip: address presented to your agent as the caller. Leave it empty to use the default.
headerslist of objectsRequiredExtra
X-headers sent on the INVITE, for routing on your side. Reads return each value masked, and a header sent back with its masked value keeps the stored one.Show 2 propertiesHide 2 properties
keystringRequiredThe header name.
valuestringRequiredThe header value.
mediaEncryptionenumWhether call audio is encrypted with SRTP.
DISABLEDsends plain RTP,ALLOWEDoffers SRTP and falls back to plain RTP, andREQUIREDfails calls that can't be encrypted.Show 3 enum valuesHide 3 enum values
DISABLEDALLOWEDREQUIRED
handleTransfersbooleanWhether to accept call transfers (SIP REFER) from your agent. When on, the call is routed through Confident AI's transfer relay, and a transfer ends the call and is recorded on the call log.
- OR
WebRTC Voice ConfigobjectJoins a WebRTC session with your agent.
Show 10 propertiesHide 10 properties
transportenumRequiredShow 1 enum valueHide 1 enum value
WEBRTC
providerenumRequiredWhere your agent runs:
LIVEKITjoins a LiveKit room,PIPECATstarts a Pipecat session, andCUSTOMposts an SDP offer to your own signaling URL.Show 3 enum valuesHide 3 enum values
LIVEKITCUSTOMPIPECAT
urlstringRequiredThe LiveKit server URL (wss://), the Pipecat start URL (https://), or your signaling URL (wss:// or https://).
livekitobjectRequiredLiveKit settings, read when
providerisLIVEKIT.Show 3 propertiesHide 3 properties
apiKeystringRequiredThe LiveKit API key. Reads return it masked; send that masked value back to keep the stored one.
apiSecretstringRequiredThe LiveKit API secret. Reads return it masked; send that masked value back to keep the stored one.
agentNamestringRequiredThe LiveKit agent to dispatch into the room, if any.
pipecatobjectRequiredPipecat settings, read when
providerisPIPECAT.Show 2 propertiesHide 2 properties
transportenumRequiredThe transport your Pipecat agent runs on.
Show 2 enum valuesHide 2 enum values
DAILYWEBRTC
apiKeystringRequiredThe Pipecat Cloud API key, if any. Reads return it masked; send that masked value back to keep the stored one.
headerslist of objectsRequiredHeaders sent to your signaling URL, read when
providerisCUSTOMorPIPECAT. Reads return each value masked, and a header sent back with its masked value keeps the stored one.Show 2 propertiesHide 2 properties
keystringRequiredThe header name.
valuestringRequiredThe header value.
metadataobjectThe JSON object sent to your agent when each call starts, read when
metadataModeisJSON. Values can reference the same argumentsmetadataCodereceives:golden.<field>(likegolden.scenario),prompts,test_case_idandmcp_servers, bare or inside a string as"call-{{test_case_id}}". Sent as JSON dispatch metadata (ctx.job.metadata) forLIVEKIT, which needsagentName, and in the startbodyforPIPECAT. Not sent forCUSTOM.metadataModeenumHow the values sent to your agent are built:
JSONfills in themetadatatemplate,CODErunsmetadataCodefor each simulated call.Show 2 enum valuesHide 2 enum values
JSONCODE
metadataCodestringPython defining
generate_payload(golden, prompts=None, test_case_id=None, mcp_servers=None), read whenmetadataModeisCODE. It receives the call's conversational golden, the connection's linked prompts, the test case id and its attached MCP servers (label, url, description and headers), and returns the dict sent to your agent. Test calls pass ittestConversationalGolden.testConversationalGoldenobject | nullThe conversational golden the metadata is built from on test calls, e.g.
{"scenario": "...", "additionalMetadata": {...}}. An example golden with every field filled in is used whennull.
callSettingsobjectThe call limits to set. Omitted settings keep their value.
Show 6 propertiesHide 6 properties
maxConcurrentCallsintegerThe most calls placed to your agent at once.
ringTimeoutSintegerSeconds to wait for your agent to answer, for
PHONEandSIP.maxCallDurationSintegerSeconds after which a call is hung up.
silenceTimeoutSinteger | nullSeconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
recordCallsbooleanWhether simulated calls are recorded.
traceTimeoutintegerSeconds to wait after a call ends before its trace metrics are scored, so every span has arrived. If no trace has arrived by then, they are skipped.
Response
Update Voice Connection succeeded.
successbooleanIndicates if the request was successful.
dataobjectA voice agent Confident AI calls during simulations. Stored credentials are returned as saved, so treat the response as carrying secrets.
Show 8 propertiesHide 8 properties
idstringThe id of the voice connection, generated by Confident AI.
projectIdstringThe id of the project the connection belongs to.
namestringThe name of the voice connection.
activebooleanWhether the last test call reached your agent. Changing
configresets it to false.configobject | object | objectHow Confident AI reaches your voice agent.
transportdecides which shape applies.Show 3 variantsHide 3 variants
Phone Voice ConfigobjectDials your agent over the phone network.
Show 7 propertiesHide 7 properties
transportenumShow 1 enum valueHide 1 enum value
PHONE
phoneNumberstringThe E.164 phone number to dial.
carrierenumWho carries the call to the phone network:
CONFIDENTuses Confident AI's own trunk,CUSTOM_TRUNKuses yours.Show 2 enum valuesHide 2 enum values
CONFIDENTCUSTOM_TRUNK
trunkUristringThe sip: address of your outbound trunk. Required when
carrierisCUSTOM_TRUNK.trunkCredentialsobject | nullDigest credentials used to authenticate a SIP call.
Show 2 propertiesHide 2 properties
usernamestringThe SIP digest username.
passwordstringThe SIP digest password. Reads return it masked; send that masked value back to keep the stored one.
callerIdstringThe number or sip: address presented to your agent as the caller. Leave it empty to use the default.
mediaEncryptionenumWhether call audio is encrypted with SRTP.
DISABLEDsends plain RTP,ALLOWEDoffers SRTP and falls back to plain RTP, andREQUIREDfails calls that can't be encrypted.Show 3 enum valuesHide 3 enum values
DISABLEDALLOWEDREQUIRED
- OR
SIP Voice ConfigobjectCalls your agent's SIP address directly.
Show 8 propertiesHide 8 properties
transportenumShow 1 enum valueHide 1 enum value
SIP
sipUristringThe sip: address of your agent.
signalingTransportenumThe transport used for SIP signaling. A
;transport=parameter onsipUritakes precedence.Show 3 enum valuesHide 3 enum values
UDPTCPTLS
credentialsobject | nullDigest credentials used to authenticate a SIP call.
Show 2 propertiesHide 2 properties
usernamestringThe SIP digest username.
passwordstringThe SIP digest password. Reads return it masked; send that masked value back to keep the stored one.
callerIdstringThe number or sip: address presented to your agent as the caller. Leave it empty to use the default.
headerslist of objectsExtra
X-headers sent on the INVITE, for routing on your side. Reads return each value masked, and a header sent back with its masked value keeps the stored one.Show 2 propertiesHide 2 properties
keystringThe header name.
valuestringThe header value.
mediaEncryptionenumWhether call audio is encrypted with SRTP.
DISABLEDsends plain RTP,ALLOWEDoffers SRTP and falls back to plain RTP, andREQUIREDfails calls that can't be encrypted.Show 3 enum valuesHide 3 enum values
DISABLEDALLOWEDREQUIRED
handleTransfersbooleanWhether to accept call transfers (SIP REFER) from your agent. When on, the call is routed through Confident AI's transfer relay, and a transfer ends the call and is recorded on the call log.
- OR
WebRTC Voice ConfigobjectJoins a WebRTC session with your agent.
Show 10 propertiesHide 10 properties
transportenumShow 1 enum valueHide 1 enum value
WEBRTC
providerenumWhere your agent runs:
LIVEKITjoins a LiveKit room,PIPECATstarts a Pipecat session, andCUSTOMposts an SDP offer to your own signaling URL.Show 3 enum valuesHide 3 enum values
LIVEKITCUSTOMPIPECAT
urlstringThe LiveKit server URL (wss://), the Pipecat start URL (https://), or your signaling URL (wss:// or https://).
livekitobjectLiveKit settings, read when
providerisLIVEKIT.Show 3 propertiesHide 3 properties
apiKeystringThe LiveKit API key. Reads return it masked; send that masked value back to keep the stored one.
apiSecretstringThe LiveKit API secret. Reads return it masked; send that masked value back to keep the stored one.
agentNamestringThe LiveKit agent to dispatch into the room, if any.
pipecatobjectPipecat settings, read when
providerisPIPECAT.Show 2 propertiesHide 2 properties
transportenumThe transport your Pipecat agent runs on.
Show 2 enum valuesHide 2 enum values
DAILYWEBRTC
apiKeystringThe Pipecat Cloud API key, if any. Reads return it masked; send that masked value back to keep the stored one.
headerslist of objectsHeaders sent to your signaling URL, read when
providerisCUSTOMorPIPECAT. Reads return each value masked, and a header sent back with its masked value keeps the stored one.Show 2 propertiesHide 2 properties
keystringThe header name.
valuestringThe header value.
metadataobjectThe JSON object sent to your agent when each call starts, read when
metadataModeisJSON. Values can reference the same argumentsmetadataCodereceives:golden.<field>(likegolden.scenario),prompts,test_case_idandmcp_servers, bare or inside a string as"call-{{test_case_id}}". Sent as JSON dispatch metadata (ctx.job.metadata) forLIVEKIT, which needsagentName, and in the startbodyforPIPECAT. Not sent forCUSTOM.metadataModeenumHow the values sent to your agent are built:
JSONfills in themetadatatemplate,CODErunsmetadataCodefor each simulated call.Show 2 enum valuesHide 2 enum values
JSONCODE
metadataCodestringPython defining
generate_payload(golden, prompts=None, test_case_id=None, mcp_servers=None), read whenmetadataModeisCODE. It receives the call's conversational golden, the connection's linked prompts, the test case id and its attached MCP servers (label, url, description and headers), and returns the dict sent to your agent. Test calls pass ittestConversationalGolden.testConversationalGoldenobject | nullThe conversational golden the metadata is built from on test calls, e.g.
{"scenario": "...", "additionalMetadata": {...}}. An example golden with every field filled in is used whennull.
callSettingsobjectLimits applied to every call placed to your agent.
Show 6 propertiesHide 6 properties
maxConcurrentCallsintegerThe most calls placed to your agent at once.
ringTimeoutSintegerSeconds to wait for your agent to answer, for
PHONEandSIP.maxCallDurationSintegerSeconds after which a call is hung up.
silenceTimeoutSinteger | nullSeconds of silence from both sides after which a call is hung up, or null to never hang up for silence.
recordCallsbooleanWhether simulated calls are recorded.
traceTimeoutintegerSeconds to wait after a call ends before its trace metrics are scored, so every span has arrived. If no trace has arrived by then, they are skipped.
createdAtstringWhen the connection was created, as an ISO 8601 timestamp.
updatedAtstringWhen the connection last changed, as an ISO 8601 timestamp.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.