Skip to content

Quickstart

You'll build a prism that routes support tickets, then send it a ticket from code. You need a Prismlet account and one of curl, Node 22 or later, or Python with requests installed.

Prismlet accounts are invite-only for now. Ask your Prismlet contact for an invite.

  1. In the app, open Prisms, choose New prism, then Blank prism. Click the name, Untitled prism, and rename it Support routing. Nothing is saved yet. The prism is saved the first time you choose Save or import. Its URL name becomes support-routing, and that is the name you put in the URL. Renaming the prism later does not change it.

  2. In the prism's ... menu, choose Import JSON. Paste this JSON under Paste its reply and choose Import and save. Importing creates the prism from the JSON's fields, context and questions.

    {
    "fields": [
    { "key": "subject", "label": "Subject" },
    { "key": "text", "label": "Text" }
    ],
    "context": "We sell scheduling software to clinics.",
    "questions": [
    {
    "key": "team",
    "type": "choice",
    "text": "Which team should handle it?",
    "instructions": "Decide which team should handle the latest customer message. Use the subject only as supporting context.",
    "options": [
    {
    "key": "billing",
    "label": "Billing",
    "description": "Invoices, payments, refunds, plan changes."
    },
    { "key": "technical", "label": "Technical support" }
    ]
    },
    {
    "key": "urgent",
    "type": "yes_no",
    "text": "Does the customer explicitly describe immediate time pressure?",
    "noBelow": 0.4,
    "yesFrom": 0.6
    },
    {
    "key": "tone",
    "type": "scale",
    "text": "How does the customer sound?",
    "options": [
    { "key": "calm", "label": "Calm" },
    { "key": "annoyed", "label": "Annoyed" },
    { "key": "angry", "label": "Angry" }
    ]
    }
    ]
    }

    The prism reads two fields, subject and text, and asks three questions: a Choice, a Yes / No and a Scale. The Yes / No has the cutoffs Yes from 60% · No below 40%, and an answer between them is Unsure. Prisms, fields and questions explains each part.

  3. Use Text to try, beside the questions, to test a prism before you write code. Paste a real ticket into the fields, add a reference with Add a reference if you have one to match against your own records, and choose Run. Every try is saved as a result, so you can come back to one that looked wrong.

Open API keys and create a key. Give it a label that names the system that will use it. The app shows the full key once, so copy it now. If you lose it, create another and revoke the old one.

Put the key in an environment variable in the shell you'll run the examples from:

export PRISMLET_API_KEY="pl_..."

A key works for every prism in your account. Keep it on your server. Authentication explains why browser calls fail.

curl https://api.prismlet.com/v1/prisms/support-routing/results \
-H "Authorization: Bearer $PRISMLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ref": "TCK-8812",
"fields": {
"subject": "Charged twice this month",
"text": "Hi, I was billed twice for September. Please refund the second charge before Friday."
}
}'

The prism's Connect tab shows the curl version with your prism's URL name and field keys filled in, every value each answer can take, and your latest result.

A 200 means the text was answered and saved:

200 OK
{
"id": "0192f5c1-7c1a-7b3e-9f55-3c1d2e4a5b6c",
"ref": "TCK-8812",
"prism": "support-routing",
"version": 3,
"status": "ok",
"error": null,
"took_ms": 640,
"created_at": "2026-09-23T09:14:02.187Z",
"input_storage": "full",
"answers": {
"team": "billing",
"urgent": "yes",
"tone": "annoyed"
}
}
Key What it holds
id The result id. Read the result again with GET /v1/results/{id}.
ref The reference (ref) you sent, or null.
prism The prism's slug.
version The prism version that answered. Saving the prism creates version 1 and each save adds one, so after the import yours is 1. The example shows 3.
status ok, or failed when the model gave no usable answer.
error Why the result failed, or null.
took_ms How long the model took, in milliseconds.
created_at When the result was saved, ISO 8601 in UTC.
answers One entry per question, in question order. null when the result failed.

Answers use keys, not labels: billing rather than Billing, yes rather than Yes. Your code can compare them without worrying that someone fixed a typo in a label. Formats shows where labels appear instead.

A call can also come back as 502 with status: "failed". The failed result is saved and has the same shape, with answers: null and an error. Errors and retries shows how to handle it.