Update AI Connection
PUThttps://api.confident-ai.com/v1/ai-connections/{aiConnectionId}
Updates an AI connection. Only the fields you send are changed, and headers and queryParams each replace the whole list.
curl -X PUT "https://api.confident-ai.com/v1/ai-connections/{aiConnectionId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"timeout": 120,
"maxRetries": 3,
"maxConcurrency": 5
}'{
"success": true,
"data": {
"aiConnection": {
"id": "AI-CONNECTION-ID",
"name": "Production Chatbot",
"type": "ENDPOINT",
"active": true,
"endpoint": "https://api.example.com/chat",
"timeout": 120,
"maxRetries": 3,
"maxConcurrency": 5
}
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aiConnectionIdstringRequiredThe id of the AI connection.
Request body
namestringUnique within the project.
typeenumHow Confident AI reaches your application.
AGENT_HANDLERneeds no endpoint.Show 3 enum valuesHide 3 enum values
ENDPOINTRELAY_ENDPOINTAGENT_HANDLER
endpointstringThe
https://URL Confident AI calls —wss://whenresponseModeisWEBSOCKET.responseModeenumHow your endpoint replies. Streaming modes read the answer from an event stream rather than a completed body.
Show 4 enum valuesHide 4 enum values
HTTP_RESPONSESSE_STREAMINGHTTP_STREAMINGWEBSOCKET
asyncResponsebooleanYour endpoint acknowledges the request and posts results back later. Requires a
responseModeofHTTP_RESPONSE.timeoutintegerSeconds to wait for a response. Defaults to 60.
maxConcurrencyintegerMost simultaneous requests Confident AI will make.
maxRetriesintegerRetries per failed request.
defaultNumGenerationsintegerHow many times to call the endpoint per test case, so one unlucky output doesn't skew results.
headerslist of objectsFull replacement of the header list — include every header the connection should keep.
Show 2 propertiesHide 2 properties
keystringRequiredThe header or parameter name.
valuestringRequiredThe value. Read back masked unless the key is a common protocol header such as
Content-Type.
queryParamslist of objectsFull replacement of the query-parameter list.
Show 2 propertiesHide 2 properties
keystringRequiredThe header or parameter name.
valuestringRequiredThe value. Read back masked unless the key is a common protocol header such as
Content-Type.
payloadobjectThe request body template sent to your endpoint.
hyperparametersobjectRecorded against every test run that uses this connection.
authenticationobjectAuth configuration (Auth0, HMAC, or Azure AD). Secret values are read back masked.
cloudProviderobjectVault configuration for pulling credentials at call time.
actualOutputKeyPathlist of string | integerWhere your application's answer lives in the response. A connection needs this (or a transformer) to be usable.
Show 2 variantsHide 2 variants
string
- OR
integer
retrievalContextKeyPathlist of string | integerWhere the retrieved context lives, for RAG applications.
Show 2 variantsHide 2 variants
string
- OR
integer
toolsCalledKeyPathlist of string | integerWhere the list of called tools lives, for agents.
Show 2 variantsHide 2 variants
string
- OR
integer
stateKeyPathlist of string | integerWhere multi-turn state lives, carried between simulated turns.
Show 2 variantsHide 2 variants
string
- OR
integer
actualOutputTransformerIdstringExtract the output by running a transformer instead of walking a key path. Send this or
actualOutputKeyPath, never both.retrievalContextTransformerIdstringAs above, for the retrieved context.
toolsCalledTransformerIdstringAs above, for the called tools.
stateTransformerIdstringAs above, for multi-turn state.
actualOutputEventstringStreaming modes only — which event carries the output.
retrievalContextEventstringStreaming modes only — which event carries the retrieved context.
toolsCalledEventstringStreaming modes only — which event carries the called tools.
stateEventstringStreaming modes only — which event carries the state.
actualOutputAccumulatebooleanStreaming modes only — concatenate the streamed chunks rather than taking the last one.
Response
The updated AI connection.
successbooleanIndicates if the request was successful.
dataobjectThe AI connection, with secret values masked.
Show 1 propertyHide 1 property
aiConnectionobjectShow 32 propertiesHide 32 properties
namestringUnique within the project.
typeenumHow Confident AI reaches your application.
AGENT_HANDLERneeds no endpoint.Show 3 enum valuesHide 3 enum values
ENDPOINTRELAY_ENDPOINTAGENT_HANDLER
endpointstringThe
https://URL Confident AI calls —wss://whenresponseModeisWEBSOCKET.responseModeenumHow your endpoint replies. Streaming modes read the answer from an event stream rather than a completed body.
Show 4 enum valuesHide 4 enum values
HTTP_RESPONSESSE_STREAMINGHTTP_STREAMINGWEBSOCKET
asyncResponsebooleanYour endpoint acknowledges the request and posts results back later. Requires a
responseModeofHTTP_RESPONSE.timeoutintegerSeconds to wait for a response. Defaults to 60.
maxConcurrencyintegerMost simultaneous requests Confident AI will make.
maxRetriesintegerRetries per failed request.
defaultNumGenerationsintegerHow many times to call the endpoint per test case, so one unlucky output doesn't skew results.
headerslist of objectsFull replacement of the header list — include every header the connection should keep.
Show 2 propertiesHide 2 properties
keystringThe header or parameter name.
valuestringThe value. Read back masked unless the key is a common protocol header such as
Content-Type.
queryParamslist of objectsFull replacement of the query-parameter list.
Show 2 propertiesHide 2 properties
keystringThe header or parameter name.
valuestringThe value. Read back masked unless the key is a common protocol header such as
Content-Type.
payloadobjectThe request body template sent to your endpoint.
hyperparametersobjectRecorded against every test run that uses this connection.
authenticationobjectAuth configuration (Auth0, HMAC, or Azure AD). Secret values are read back masked.
cloudProviderobjectVault configuration for pulling credentials at call time.
actualOutputKeyPathlist of string | integerWhere your application's answer lives in the response. A connection needs this (or a transformer) to be usable.
Show 2 variantsHide 2 variants
string
- OR
integer
retrievalContextKeyPathlist of string | integerWhere the retrieved context lives, for RAG applications.
Show 2 variantsHide 2 variants
string
- OR
integer
toolsCalledKeyPathlist of string | integerWhere the list of called tools lives, for agents.
Show 2 variantsHide 2 variants
string
- OR
integer
stateKeyPathlist of string | integerWhere multi-turn state lives, carried between simulated turns.
Show 2 variantsHide 2 variants
string
- OR
integer
actualOutputTransformerIdstringExtract the output by running a transformer instead of walking a key path. Send this or
actualOutputKeyPath, never both.retrievalContextTransformerIdstringAs above, for the retrieved context.
toolsCalledTransformerIdstringAs above, for the called tools.
stateTransformerIdstringAs above, for multi-turn state.
actualOutputEventstringStreaming modes only — which event carries the output.
retrievalContextEventstringStreaming modes only — which event carries the retrieved context.
toolsCalledEventstringStreaming modes only — which event carries the called tools.
stateEventstringStreaming modes only — which event carries the state.
actualOutputAccumulatebooleanStreaming modes only — concatenate the streamed chunks rather than taking the last one.
idstringThe unique identifier of the AI connection.
namestringThe name of the AI connection.
activebooleanWhether Confident AI could successfully call this endpoint. Computed by Confident AI when the configuration changes — not writable.
payloadModestringWhether the payload is a JSON template or generated by code in the platform.
deprecatedbooleanIndicates if this endpoint is deprecated.