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.
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."
}'{
"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_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
journeyIdstringRequiredThe id of the journey.
Request body
namestringThe name of the journey, unique within the project. Omit it to keep the current name.
descriptionstring | nullWhat the user is trying to get done on this journey. Send
nullto clear it, or omit it to keep the current one.
Response
Update Journey succeeded.
successbooleanIndicates if the request was successful.
dataobjectA 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
idstringThe id of the journey, generated by Confident AI.
namestringThe name of the journey, unique within the project.
descriptionstring | nullWhat the user is trying to get done on this journey, or
nullwhen none was given.rootStateIdstring | nullThe id of the root
Startstate, which every path begins at. It cannot be deleted.stateslist of objectsEvery state in the journey, oldest first.
Show 6 propertiesHide 6 properties
idstringThe id of the state, generated by Confident AI.
namestringThe name of the state, unique within the journey.
instructionsstringWhat happens at this step of the conversation, as golden generation reads it.
goldenCountintegerThe number of goldens generated for a path through this state.
createdAtstringThe time the state was created, as an ISO 8601 datetime.
updatedAtstringThe time the state was last changed, as an ISO 8601 datetime.
edgeslist of objectsEvery edge in the journey, oldest first.
Show 6 propertiesHide 6 properties
idstringThe id of the edge, generated by Confident AI.
fromStateIdstringThe id of the state the edge leaves from.
toStateIdstringThe id of the state the edge leads to.
whenstringThe 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.
createdAtstringThe time the edge was created, as an ISO 8601 datetime.
updatedAtstringThe time the edge was last changed, as an ISO 8601 datetime.
pathslist of objectsEvery route from the root state to a state with no further edges, following only edges with a non-empty
whenand never visiting a state twice. At most 50 are listed.Show 3 propertiesHide 3 properties
stateIdslist of stringsThe ids of the states along the path, in order, starting with the root state.
goldenCountintegerThe number of goldens generated for exactly this path.
datasetslist of objectsThe datasets holding this path's goldens.
Show 3 propertiesHide 3 properties
idstringThe id of the dataset.
aliasstringThe alias of the dataset, unique within your project.
goldenCountintegerThe number of the journey's goldens this dataset holds.
pathsTruncatedbooleantruewhen the journey has more than 50 paths, sopathslists only the first 50.datasetslist of objectsThe datasets holding goldens generated from this journey.
Show 3 propertiesHide 3 properties
idstringThe id of the dataset.
aliasstringThe alias of the dataset, unique within your project.
goldenCountintegerThe number of the journey's goldens this dataset holds.
createdAtstringThe time the journey was created, as an ISO 8601 datetime.
updatedAtstringThe time the journey's name or description was last changed, as an ISO 8601 datetime.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.