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 customer has given an order number and the email on the account, and they match.",
"toStateId": "<JOURNEY-STATE-ID>"
}'{
"success": true,
"data": {
"id": "<JOURNEY-EDGE-ID>",
"fromStateId": "<JOURNEY-STATE-ID>",
"toStateId": "<JOURNEY-STATE-ID>",
"when": "The customer has given an order number and the email on the account, and they match.",
"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
whenstringThe condition under which the conversation moves along this edge. Omit it to keep the current condition.
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 its condition holds.
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.
whenstringThe condition under which the conversation moves 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.