Update Journey State
(v2)PUT
Renames a state or rewrites its instructions, and returns it. State names are unique within a journey; taking another state's name returns a 409.
curl -X PUT "https://api.confident-ai.com/v2/journeys/{journeyId}/states/{stateId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Verify identity",
"instructions": "The agent asks for the order number and the email on the account, and checks they match before going further."
}'{
"success": true,
"data": {
"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"
},
"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 the state belongs to.
stateIdstringRequiredThe id of the state.
Request body
namestringThe name of the state, unique within the journey. Omit it to keep the current name.
instructionsstringWhat happens at this step of the conversation. The text replaces the stored one outright, so send the whole of it. Omit it to keep the current instructions.
Response
Update Journey State succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne step of a journey: a point the conversation can reach, with instructions for what happens there.
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.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.