Introducing Confident Monitor

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": "Verify identity",
  "instructions": "The agent asks for the order number and the email on the account, and checks they match before going further."
}'
200
{
  "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_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. Omit it to keep the current name.

  • instructionsstring

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

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One step of a journey: a point the conversation can reach, with instructions for what happens 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 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.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI