Create Journey Edge
(v2)POST
Adds an edge between two states of a journey and returns its id. A state cannot lead to itself, and only one edge may run from one state to another; a second returns a 409.
curl -X POST "https://api.confident-ai.com/v2/journeys/{journeyId}/edges" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"fromStateId": "<JOURNEY-STATE-ID>",
"toStateId": "<JOURNEY-STATE-ID>",
"when": "The assistant confirms the refund has been issued."
}'{
"success": true,
"data": {
"id": "<JOURNEY-EDGE-ID>"
},
"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.
Request body
fromStateIdstringRequiredThe id of the state the edge leaves from.
toStateIdstringRequiredThe id of the state the edge leads to. It must differ from
fromStateId, and both must be in this journey.whenstringRequiredWhat the app does or says in its reply that moves the simulated user along this edge; describe the app's reply, not the user. An empty
whenkeeps the edge out of the journey's paths until it is given one.
Response
Create Journey Edge succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to a journey edge by its id.
Show 1 propertyHide 1 property
idstringThe id of the edge, generated by Confident AI.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.