Skip to content
Desk ItBY PARMTECH Client Portal

Desk It Developer Docs

Test your saved assistant from an app backend or server. The Preview API returns text answers from that assistant’s own saved business knowledge.

Create a preview key

  1. Sign in with an active Desk It account.
  2. Create or open an assistant and add its business knowledge.
  3. Open Preview API key, create the key and copy it. Save it in a server secret or environment variable.
  4. Use Test API on the same page to send a question and inspect the HTTP status and JSON.

Each key is scoped to one assistant. Rotating or revoking it stops the old key from working.

Send a message

Use POST with a Bearer key and a JSON body. The message field accepts 2–400 characters. Requests are independent. Import the OpenAPI file into Postman or another API client to test the live endpoint.

curl https://deskit.parmtech.au/developer-api.php \
  -H "Authorization: Bearer $DESK_IT_PREVIEW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"What services do you offer?"}'

Example response

Example only. The reply depends on your assistant’s saved information.

{
  "assistant": "Website support",
  "answer": "We offer installation and scheduled maintenance.",
  "mode": "preview"
}

Limits and errors

Limits share the account’s preview allowance and include a network limit.

Run the starter examples

Unzip the developer kit and set DESK_IT_PREVIEW_KEY in your terminal. Store the value in your deployment’s secret settings.

node examples/chat.mjs "What services do you offer?"
python3 examples/chat.py "What services do you offer?"
php examples/chat.php "What services do you offer?"

Download OpenAPI JSON to import the endpoint into an API client.

Keep your key on your server

Use the widget or shortcode for public website visitors. Keep private Preview API keys out of browser JavaScript, mobile app builds and shared logs. Preview requests do not publish an assistant or debit customer credits.