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": "Share Order Details",
"instructions": "Give order number 48213 and the email jane@example.com."
}'{
"success": true,
"data": {
"id": "<JOURNEY-STATE-ID>",
"name": "Share Order Details",
"instructions": "Give order number 48213 and the email jane@example.com.",
"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, for what the user does. Omit it to keep the current name.
instructionsstringWhat the simulated user says or does in this state, written to them in the second person. 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.
dataobjectSomething the simulated user does at one point in a journey, with the instructions it follows 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 the simulated user says or does in this state, written to them in the second person.
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.