Introducing Confident Monitor

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.

POST/v2/journeys/{journeyId}/edges
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."
}'
200
{
  "success": true,
  "data": {
    "id": "<JOURNEY-EDGE-ID>"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/journeys/<JOURNEY-ID>",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • journeyIdstringRequired

    The id of the journey.

Request body

  • fromStateIdstringRequired

    The id of the state the edge leaves from.

  • toStateIdstringRequired

    The id of the state the edge leads to. It must differ from fromStateId, and both must be in this journey.

  • whenstringRequired

    The 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.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to a journey edge by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the edge, generated by Confident AI.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI