Skip to the content
Docs

AI chat API and webhooks

Keys, chat calls, product upload, signed webhooks and error codes of the Jukto AI chat API for your own code.

2 min readLast updated 3 Dec 2026

The public chat API lets your own code talk to the Jukto AI chat: your own chat window, an app, or a product upload from your server. Base address: https://jukto.site/api/chatbot/v1. Every answer carries the header X-Jukto-Api-Version.

Chat calls#

CallKeyWhat it does
GET /widgetpublicThe chat look and texts, and whether the AI answers
POST /chat/sessionspublic or secretStarts a chat; returns its id and token
POST /chat/sessions/:id/messagespublic or secretSends { text }; the answer comes back in the same call as replies
GET /chat/sessions/:id/messages?after=public or secretMessages after a number, for a person's replies after a hand-over
POST /chat/sessions/:id/leadpublic or secretAn order (kind: ORDER, with an address) or a call back (kind: HANDOVER)

With the public key, every call on a chat also needs the chat's token in X-Session-Token.

text
curl -X POST https://jukto.site/api/chatbot/v1/chat/sessions \
  -H "Authorization: Bearer sk_live_..." -H "Content-Type: application/json" -d '{"locale":"bn"}'

Products#

  • PUT /products with the secret key: up to 500 products a call. Each has externalId, name, price (taka), and may have salePrice, description, category, inStock, stock, variants, imageUrls and productUrl. The same externalId updates the product.
  • DELETE /products/:externalId removes one.

Webhooks#

Set a webhook address on the On your own website page. Jukto sends lead.captured (an order request) and handover.requested (a call back) as JSON. A failed delivery is tried again up to six times, waiting longer each time.

Errors#

CodeStatusMeaning
CHATBOT_KEY_INVALID401The key is missing, wrong or stopped
ORIGIN_NOT_ALLOWED403The page's domain is not on the public key
SECRET_KEY_IN_BROWSER403A secret key was sent from a web page
MODULE_DISABLED403The chatbot is turned off for this website
RATE_LIMITED429Too many calls; wait and try again

Was this guide helpful?

Comments (0)

Anyone can comment. Please do not post phone numbers, passwords or customer details.

Never shown. Only used to tell you when someone replies.
0 / 2000