Introducing Confident Voice: Watch the Launch Video Now

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.

PUT/v2/journeys/{journeyId}/states/{stateId}
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."
}'
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • journeyIdstringRequired

    The id of the journey the state belongs to.

  • stateIdstringRequired

    The id of the state.

Request body

  • namestring

    The name of the state, unique within the journey, for what the user does. Omit it to keep the current name.

  • instructionsstring

    What 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.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Something the simulated user does at one point in a journey, with the instructions it follows there.

    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 the simulated user says or does in this state, written to them in the second person.

    • 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.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI