Introducing Confident Monitor

Update Journey

(v2)

PUT

Renames a journey or rewrites its description, and returns it with its whole graph. Names are unique within a project; taking another journey's name returns a 409.

PUT/v2/journeys/{journeyId}
curl -X PUT "https://api.confident-ai.com/v2/journeys/{journeyId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Refund request",
  "description": "A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human."
}'
200
{
  "success": true,
  "data": {
    "id": "<JOURNEY-ID>",
    "name": "Refund request",
    "description": "A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human.",
    "rootStateId": "<JOURNEY-STATE-ID>",
    "states": [
      {
        "id": "<JOURNEY-STATE-ID>",
        "name": "Verify identity",
        "instructions": "The agent asks for the order number and the email on the account, and checks they match before going further.",
        "goldenCount": 10,
        "createdAt": "2025-01-15T10:30:00.000Z",
        "updatedAt": "2025-01-16T09:12:00.000Z"
      }
    ],
    "edges": [
      {
        "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"
      }
    ],
    "paths": [
      {
        "stateIds": [
          "<JOURNEY-STATE-ID>"
        ],
        "goldenCount": 4,
        "datasets": [
          {
            "id": "<DATASET-ID>",
            "alias": "refund-conversations",
            "goldenCount": 6
          }
        ]
      }
    ],
    "pathsTruncated": false,
    "datasets": [
      {
        "id": "<DATASET-ID>",
        "alias": "refund-conversations",
        "goldenCount": 6
      }
    ],
    "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.

Request body

  • namestring

    The name of the journey, unique within the project. Omit it to keep the current name.

  • descriptionstring | null

    What the user is trying to get done on this journey. Send null to clear it, or omit it to keep the current one.

Response

Update Journey succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A map of the ways a conversation with your LLM app can go. States are the steps, edges are the conditions that move the conversation between them, and each route from the root state to an end is a path you can generate multi-turn goldens for, so every branch gets tested.

    Show 11 propertiesHide 11 properties
    • idstring

      The id of the journey, generated by Confident AI.

    • namestring

      The name of the journey, unique within the project.

    • descriptionstring | null

      What the user is trying to get done on this journey, or null when none was given.

    • rootStateIdstring | null

      The id of the root Start state, which every path begins at. It cannot be deleted.

    • stateslist of objects

      Every state in the journey, oldest first.

      Show 6 propertiesHide 6 properties
      • idstring

        The id of the state, generated by Confident AI.

      • namestring

        The name of the state, unique within the journey.

      • instructionsstring

        What happens at this step of the conversation, as golden generation reads it.

      • goldenCountinteger

        The number of goldens generated for a path through this state.

      • createdAtstring

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

      • updatedAtstring

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

    • edgeslist of objects

      Every edge in the journey, oldest first.

      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.

    • pathslist of objects

      Every route from the root state to a state with no further edges, following only edges with a non-empty when and never visiting a state twice. At most 50 are listed.

      Show 3 propertiesHide 3 properties
      • stateIdslist of strings

        The ids of the states along the path, in order, starting with the root state.

      • goldenCountinteger

        The number of goldens generated for exactly this path.

      • datasetslist of objects

        The datasets holding this path's goldens.

        Show 3 propertiesHide 3 properties
        • idstring

          The id of the dataset.

        • aliasstring

          The alias of the dataset, unique within your project.

        • goldenCountinteger

          The number of the journey's goldens this dataset holds.

    • pathsTruncatedboolean

      true when the journey has more than 50 paths, so paths lists only the first 50.

    • datasetslist of objects

      The datasets holding goldens generated from this journey.

      Show 3 propertiesHide 3 properties
      • idstring

        The id of the dataset.

      • aliasstring

        The alias of the dataset, unique within your project.

      • goldenCountinteger

        The number of the journey's goldens this dataset holds.

    • createdAtstring

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

    • updatedAtstring

      The time the journey's name or description 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