Introducing Confident Voice: Watch the Launch Video Now

Get Voice Connection

(v2)

GET

Retrieves a voice connection by id with its full configuration. Stored credentials are returned as saved, so treat the response as carrying secrets.

GET/v2/voice-connections/{voiceConnectionId}
curl -X GET "https://api.confident-ai.com/v2/voice-connections/{voiceConnectionId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • voiceConnectionIdstringRequired

    The id of the voice connection.

Response

Get Voice Connection succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A 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
    • idstring

      The id of the voice connection, generated by Confident AI.

    • projectIdstring

      The id of the project the connection belongs to.

    • namestring

      The name of the voice connection.

    • activeboolean

      Whether the last test call reached your agent. Changing config resets it to false.

    • configobject | object | object

      How Confident AI reaches your voice agent. transport decides which shape applies.

      Show 3 variantsHide 3 variants
      • Phone Voice Configobject

        Dials your agent over the phone network.

        Show 7 propertiesHide 7 properties
        • transportenum

          Show 1 enum valueHide 1 enum value
          • PHONE
        • phoneNumberstring

          The E.164 phone number to dial.

        • carrierenum

          Who carries the call to the phone network: CONFIDENT uses Confident AI's own trunk, CUSTOM_TRUNK uses yours.

          Show 2 enum valuesHide 2 enum values
          • CONFIDENT
          • CUSTOM_TRUNK
        • trunkUristring

          The sip: address of your outbound trunk. Required when carrier is CUSTOM_TRUNK.

        • trunkCredentialsobject | null

          Digest credentials used to authenticate a SIP call.

          Show 2 propertiesHide 2 properties
          • usernamestring

            The SIP digest username.

          • passwordstring

            The SIP digest password. Reads return it masked; send that masked value back to keep the stored one.

        • callerIdstring

          The number or sip: address presented to your agent as the caller. Leave it empty to use the default.

        • mediaEncryptionenum

          Whether call audio is encrypted with SRTP. DISABLED sends plain RTP, ALLOWED offers SRTP and falls back to plain RTP, and REQUIRED fails calls that can't be encrypted.

          Show 3 enum valuesHide 3 enum values
          • DISABLED
          • ALLOWED
          • REQUIRED
      • OR
      • SIP Voice Configobject

        Calls your agent's SIP address directly.

        Show 8 propertiesHide 8 properties
        • transportenum

          Show 1 enum valueHide 1 enum value
          • SIP
        • sipUristring

          The sip: address of your agent.

        • signalingTransportenum

          The transport used for SIP signaling. A ;transport= parameter on sipUri takes precedence.

          Show 3 enum valuesHide 3 enum values
          • UDP
          • TCP
          • TLS
        • credentialsobject | null

          Digest credentials used to authenticate a SIP call.

          Show 2 propertiesHide 2 properties
          • usernamestring

            The SIP digest username.

          • passwordstring

            The SIP digest password. Reads return it masked; send that masked value back to keep the stored one.

        • callerIdstring

          The number or sip: address presented to your agent as the caller. Leave it empty to use the default.

        • headerslist of objects

          Extra 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
          • keystring

            The header name.

          • valuestring

            The header value.

        • mediaEncryptionenum

          Whether call audio is encrypted with SRTP. DISABLED sends plain RTP, ALLOWED offers SRTP and falls back to plain RTP, and REQUIRED fails calls that can't be encrypted.

          Show 3 enum valuesHide 3 enum values
          • DISABLED
          • ALLOWED
          • REQUIRED
        • handleTransfersboolean

          Whether 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 Configobject

        Joins a WebRTC session with your agent.

        Show 10 propertiesHide 10 properties
        • transportenum

          Show 1 enum valueHide 1 enum value
          • WEBRTC
        • providerenum

          Where your agent runs: LIVEKIT joins a LiveKit room, PIPECAT starts a Pipecat session, and CUSTOM posts an SDP offer to your own signaling URL.

          Show 3 enum valuesHide 3 enum values
          • LIVEKIT
          • CUSTOM
          • PIPECAT
        • urlstring

          The LiveKit server URL (wss://), the Pipecat start URL (https://), or your signaling URL (wss:// or https://).

        • livekitobject

          LiveKit settings, read when provider is LIVEKIT.

          Show 3 propertiesHide 3 properties
          • apiKeystring

            The LiveKit API key. Reads return it masked; send that masked value back to keep the stored one.

          • apiSecretstring

            The LiveKit API secret. Reads return it masked; send that masked value back to keep the stored one.

          • agentNamestring

            The LiveKit agent to dispatch into the room, if any.

        • pipecatobject

          Pipecat settings, read when provider is PIPECAT.

          Show 2 propertiesHide 2 properties
          • transportenum

            The transport your Pipecat agent runs on.

            Show 2 enum valuesHide 2 enum values
            • DAILY
            • WEBRTC
          • apiKeystring

            The Pipecat Cloud API key, if any. Reads return it masked; send that masked value back to keep the stored one.

        • headerslist of objects

          Headers sent to your signaling URL, read when provider is CUSTOM or PIPECAT. Reads return each value masked, and a header sent back with its masked value keeps the stored one.

          Show 2 propertiesHide 2 properties
          • keystring

            The header name.

          • valuestring

            The header value.

        • metadataobject

          The JSON object sent to your agent when each call starts, read when metadataMode is JSON. Values can reference the same arguments metadataCode receives: golden.<field> (like golden.scenario), prompts, test_case_id and mcp_servers, bare or inside a string as "call-{{test_case_id}}". Sent as JSON dispatch metadata (ctx.job.metadata) for LIVEKIT, which needs agentName, and in the start body for PIPECAT. Not sent for CUSTOM.

        • metadataModeenum

          How the values sent to your agent are built: JSON fills in the metadata template, CODE runs metadataCode for each simulated call.

          Show 2 enum valuesHide 2 enum values
          • JSON
          • CODE
        • metadataCodestring

          Python defining generate_payload(golden, prompts=None, test_case_id=None, mcp_servers=None), read when metadataMode is CODE. 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 it testConversationalGolden.

        • testConversationalGoldenobject | null

          The conversational golden the metadata is built from on test calls, e.g. {"scenario": "...", "additionalMetadata": {...}}. An example golden with every field filled in is used when null.

    • callSettingsobject

      Limits applied to every call placed to your agent.

      Show 6 propertiesHide 6 properties
      • maxConcurrentCallsinteger

        The most calls placed to your agent at once.

      • ringTimeoutSinteger

        Seconds to wait for your agent to answer, for PHONE and SIP.

      • maxCallDurationSinteger

        Seconds after which a call is hung up.

      • silenceTimeoutSinteger | null

        Seconds of silence from both sides after which a call is hung up, or null to never hang up for silence.

      • recordCallsboolean

        Whether simulated calls are recorded.

      • traceTimeoutinteger

        Seconds 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.

    • createdAtstring

      When the connection was created, as an ISO 8601 timestamp.

    • updatedAtstring

      When the connection last changed, as an ISO 8601 timestamp.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI