Create Journey
(v2)POST
Creates a journey with a root Start state and returns its id. Build it out by adding states and edges, or send graphSource as ai to have Confident AI draft them for you in the background. Names are unique within a project; reusing one returns a 409.
curl -X POST "https://api.confident-ai.com/v2/journeys" \
-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.",
"graphSource": "ai"
}'{
"success": true,
"data": {
"id": "<JOURNEY-ID>"
},
"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.
Request body
namestringRequiredThe name of the journey, unique within the project.
descriptionstring | nullWhat the user is trying to get done on this journey. When
graphSourceisai, the draft is written from this and the name, so say how the conversation can end.graphSourceenumSend
aito have Confident AI draft the journey's states and edges in the background with your project's platform model. Omit it to start with only the rootStartstate. The draft lands shortly after the response, so retrieve the journey to see it; if drafting fails, the journey keeps only itsStartstate.Show 1 enum valueHide 1 enum value
ai
Response
Create Journey succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to a journey by its id.
Show 1 propertyHide 1 property
idstringThe id of the journey, generated by Confident AI.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.