Introducing Confident Monitor

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.

PUT/v2/journeys/{journeyId}/edges/{edgeId}
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>"
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • journeyIdstringRequired

    The id of the journey the edge belongs to.

  • edgeIdstringRequired

    The id of the edge.

Request body

  • whenstring

    The condition under which the conversation moves along this edge. Omit it to keep the current condition.

  • toStateIdstring

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

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A transition from one state of a journey to another, taken when its condition holds.

    Show 6 propertiesHide 6 properties
    • idstring

      The id of the edge, generated by Confident AI.

    • fromStateIdstring

      The id of the state the edge leaves from.

    • toStateIdstring

      The id of the state the edge leads to.

    • whenstring

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

    • createdAtstring

      The time the edge was created, as an ISO 8601 datetime.

    • updatedAtstring

      The time the edge was last changed, as an ISO 8601 datetime.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI