Get a key
Open the TypeSafe dashboard linked in the official quick start and obtain an API key. In your terminal, set TYPESAFE_API_KEY. Keep that terminal open for the request below. If you are still waiting for access, the downloadable router demo works without a key.
export TYPESAFE_API_KEY="your-key"
Create request.json
Open Request Builder from the link below. Keep its shipping/billing example, select JSON and download request.json. Return to your terminal and change to the folder containing that file.
Send the request
Run the cURL command below. The --fail-with-body option makes an unsuccessful HTTP response visible as a command failure while retaining its error message.
curl --fail-with-body https://api.typesafe.ai/v1/systemone \ -H "Authorization: Bearer $TYPESAFE_API_KEY" \ -H "Content-Type: application/json" \ --data @request.json
Find your answer
The builder names its question decision. In the JSON response, look under answers.decision for choice, probabilities and confidence. If you renamed the question, use that identifier instead. Compare the selected label with the labels you sent; do not expect a written explanation.
Change one input
Replace the delivery message with a payment question and send another request. Save both responses. Once you can follow a message through to its answer, move to the router lab to add a review branch.