Update Journey Edge
(v2)PUT
Rewrites an edge's condition or points it at a different state, and returns it. Pointing it at a state another edge from the same state already leads to returns a 409.
curl -X PUT "https://api.confident-ai.com/v2/journeys/{journeyId}/edges/{edgeId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"when": "The assistant confirms the refund has been issued.",
"toStateId": "<JOURNEY-STATE-ID>"
}'{
"success": true,
"data": {
"id": "<JOURNEY-EDGE-ID>",
"fromStateId": "<JOURNEY-STATE-ID>",
"toStateId": "<JOURNEY-STATE-ID>",
"when": "The assistant confirms the refund has been issued.",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-16T09:12:00.000Z"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/journeys/<JOURNEY-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
journeyIdstringRequiredThe id of the journey the edge belongs to.
edgeIdstringRequiredThe id of the edge.
Request body
whenstringWhat the app does or says in its reply that moves the simulated user along this edge. Omit it to keep the current one.
toStateIdstringThe id of the state the edge should lead to instead, in this journey. It cannot be the state the edge leaves from. Goldens generated for a path through the old edge are kept but no longer belong to any path. Omit it to keep the current target.
Response
Update Journey Edge succeeded.
successbooleanIndicates if the request was successful.
dataobjectA transition from one state of a journey to another, taken when the app's reply matches its
when.Show 6 propertiesHide 6 properties
idstringThe id of the edge, generated by Confident AI.
fromStateIdstringThe id of the state the edge leaves from.
toStateIdstringThe id of the state the edge leads to.
whenstringWhat the app does or says in its reply that moves the simulated user along this edge. Empty when none has been given, which keeps the edge out of the journey's paths.
createdAtstringThe time the edge was created, as an ISO 8601 datetime.
updatedAtstringThe time the edge was last changed, as an ISO 8601 datetime.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.