Introducing Confident Voice: Watch the Launch Video Now

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 assistant confirms the refund has been issued.",
  "toStateId": "<JOURNEY-STATE-ID>"
}'
200
{
  "success": true,
  "data": {
    "id": "<JOURNEY-EDGE-ID>",
    "fromStateId": "<JOURNEY-STATE-ID>",
    "toStateId": "<JOURNEY-STATE-ID>",
    "when": "The assistant confirms the refund has been issued.",
    "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

    What the app does or says in its reply that moves the simulated user along this edge. Omit it to keep the current one.

  • 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 the app's reply matches its when.

    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

      What the app does or says in its reply that moves the simulated user 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