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.
Make a prism and try it
Section titled “Make a prism and try it”-
In the app, open Prisms, choose Blank prism, name it Support routing and choose Create. That opens a draft. The prism is saved the first time you choose Create prism or import. Its slug becomes
support-routing, and that is the name you put in the URL. Renaming the prism later does not change the slug. -
On the Questions tab, choose Import questions, paste this JSON and choose Import and save. Import replaces the fields, context and questions and saves the prism.
{"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?"},{"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,
subjectandtext, and asks three questions: a Choice, a Yes / No and a Scale. Prisms, fields and questions explains each part. -
Use Try in the app to test a prism before you write code. Paste a real ticket into the fields, add a reference if you have one to match against your own records, and run it. Every try is saved as a result, so you can come back to one that looked wrong.
-
Optional: on the Lens tab, add a column for the probability of
teamand one for the average oftone. The app names themteam_probabilityandtone_averageand adds them at the end, so move each up under its question's column to match the examples here. Onurgent, tick Unsure in between, then set No below to 40% and Yes from to 60%. Choose Save Lens. The Lens covers every output.
Create an API key
Section titled “Create an API key”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.
Send your first text
Section titled “Send your first text”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." } }'const response = await fetch('https://api.prismlet.com/v1/prisms/support-routing/results', { method: 'POST', headers: { Authorization: `Bearer ${process.env.PRISMLET_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ ref: 'TCK-8812', fields: { subject: 'Charged twice this month', text: 'Hi, I was billed twice for September. Please refund the second charge before Friday.', }, }), signal: AbortSignal.timeout(45_000),});
const result = await response.json();console.log(response.status, result);import os
import requests
response = requests.post( "https://api.prismlet.com/v1/prisms/support-routing/results", headers={"Authorization": f"Bearer {os.environ['PRISMLET_API_KEY']}"}, json={ "ref": "TCK-8812", "fields": { "subject": "Charged twice this month", "text": "Hi, I was billed twice for September. Please refund the second charge before Friday.", }, }, timeout=45,)
result = response.json()print(response.status_code, result)The prism's Integrate tab shows the curl version with your prism's slug and field keys filled in, and the response its Lens gives.
Read the answer
Section titled “Read the answer”A 200 means the text was answered and saved:
{ "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", "answers": { "team": "billing", "team_probability": 0.91, "urgent": "yes", "tone": "annoyed", "tone_average": 2.05 }}This response uses the Lens from step 4. With the automatic Lens, answers holds team, urgent and tone.
| 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 Lens column, in Lens 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.
- Sending a text covers
ref, pinning a version and the size limits. - Formats shows every probability with
format=raw, and the result as a CSV row. - Errors and retries makes a call safe to repeat with
idempotency_key. - Answering many texts works through a whole list, a few calls at a time.