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 customer has given an order number and the email on the account, and they match."
}'{
"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.whenstringRequiredThe condition under which the conversation moves along this edge, in plain language. An empty condition keeps 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.