Dhanur AI
Docs menu· Add chat to your website

Add chat to your website

Live

Put a chat button on your own website so visitors can ask one of your agents or a workforce questions, and choose which websites may show it.

Website chat adds a small chat button to the corner of your website. When a visitor opens it, one of your agents answers, or a whole workforce with its hand-overs. Every chat shows up in Tasks with the channel Website, with its cost and any replies waiting for your approval.

You need the Owner, Admin or Builder role to set it up. Viewers can see the settings but can't change them.

No website? Share a chat link instead: a chat page with its own link and QR code.

Before you start

  • Publish the agent or workforce. The chat always uses the published version. While it is a draft or paused, the button stays hidden on your site.
  • Decide how replies go out. If Reply to the customer is set to Ask first or Ask, then run after N hours, each reply waits in Tasks until someone approves it. Visitors see "A teammate will reply shortly" and the reply appears in their chat once it's approved, as long as they keep the page open or come back to it. For instant answers, set it to Runs freely. In a workforce, each agent's own setting applies.
  • Keep your website address handy, such as sharmatraders.in.

Set up the chat

  1. Open Agents and choose the agent, then scroll down the Build tab to Website chat. For a workforce, open it in Workforces and select the Run tab.
  2. Find the Website chat section.
  3. Under Allowed websites, type your website address and select Add. Add every address your site uses. See Allowed websites below.
  4. Turn on Show a chat button on your website.
  5. Change the look if you like:
    • Title: the name at the top of the chat. Leave it empty to use the agent's or workforce's name.
    • Greeting: the first message visitors see. Leave it empty to use the agent's welcome message. For a workforce, that's the first agent's welcome message.
    • Colour and Button position (bottom left or bottom right).
  6. Check the Preview next to the settings. It changes as you type.

Settings save by themselves. The section shows Saving… and then Saved.

Add the code to your website

Under Add it to your website, select Copy code. You get one line like this:

<script src="https://app.dhanurai.com/widget.js" data-widget="wid_..." async></script>

Paste it just before </body> on every page where the chat should appear. Most website builders have a place for this:

  • WordPress: use a plugin that adds code to the footer, or your theme's footer code setting.
  • Wix: in your site's settings, open Custom code, and add it to the end of the body on all pages.
  • Shopify: Online Store, then Themes, then Edit code. Paste it before </body> in theme.liquid.
  • Your own website: paste it into your page template, before </body>.

Open your website and look for the round chat button in the corner. If you just turned the chat on, reload the page.

The code is the same for every page and doesn't change when you edit the settings. You don't need to paste it again after you change the title, greeting or colour.

Allowed websites

The code on your website isn't secret: anyone can see it in the page source. So the chat checks where it is running, and only opens on the websites in your list. If someone copies your code onto another website, the chat stays hidden there and your agent doesn't answer.

How addresses work:

You add The chat opens on It doesn't open on
sharmatraders.in sharmatraders.in www.sharmatraders.in, shop.sharmatraders.in
www.sharmatraders.in www.sharmatraders.in sharmatraders.in
*.sharmatraders.in www.sharmatraders.in, shop.sharmatraders.in sharmatraders.in itself
localhost Your own computer, on any port Other websites
localhost:3000 Your own computer, on port 3000 only Other ports

Some tips:

  • Most sites need both example.com and www.example.com.
  • You can paste a full link, such as https://www.example.com/contact. We keep only the address, www.example.com.
  • An address without a port works on any port, for both http and https.
  • *. covers subdomains only, so add the main address too if your site uses it.
  • Wildcards on shared addresses, such as *.co.in, *.vercel.app or *.myshopify.com, aren't allowed, because they would let other people's websites use your chat. Add your own full address instead, such as mystore.myshopify.com.
  • Add localhost while you try the chat on your own computer, and remove it when you are done.
  • You can add up to 20 addresses.

Ask for contact details first

Turn on Ask for contact details first to show a short form before the chat starts. Visitors enter their name and, depending on Ask for, their email, their phone number, or either one.

  • If the agent has the Save a lead tool turned on, the details are saved in the agent's Leads, linked to the chat. The agent knows who it is talking to and won't ask again.
  • For a workforce, the details are saved in Leads when at least one of its agents has Save a lead in the published workforce. The lead is linked to the first such agent.
  • If Save a lead is off, the details aren't saved in Leads. The agent still sees them during the chat.

Let visitors send photos and PDFs

Turn on Let visitors send photos and PDFs to add a paperclip to the chat. Visitors can then send a photo of a product, a bill or a damaged parcel, or a PDF, and the agent reads it with their message. It is off unless you turn it on, and the change applies straight away, without publishing.

  • Photos can be JPEG, PNG, WebP or GIF. On a phone, visitors can take a photo with the camera. Very large photos are made smaller before they upload.
  • Up to 3 files a message, 4 MB each. PDFs can have up to 20 pages.
  • Each chat can upload up to 10 files an hour, and one network up to 20 an hour. Your workspace takes up to 300 files a day across all chats and the API.
  • A visitor can open only the files they sent in their own chat. You see them on the task in Tasks.
  • Files are kept for 90 days, then deleted. A file a visitor uploads but doesn't send is deleted after a day.
  • Reading a file uses more AI than reading text, so chats with files cost more. The cost shows on each task.

Turn it on only if you need it, for example for returns or quotations. The agent's own Let people send files setting covers the test chat, Team chat and the API, not website chat.

What visitors see

  • The greeting always says that they are chatting with an AI assistant. If your greeting doesn't say so, we add "I'm agent name, an AI assistant." to it. For a workforce, that's the first agent's name, or the workforce's name when a condition picks the first agent.
  • A line under the title says "You're chatting with an AI assistant."
  • A small "Powered by Dhanur AI" link at the bottom.
  • On phones, the chat fills the screen, with a close button at the top.

A visitor's chat is kept in their browser for that website, so they can close the chat, move between pages, or come back later and carry on. If a reply arrives while the chat is closed, the button shows a small number. A chat that has had no activity for 30 days ends, and the visitor starts a new one.

Limits that protect you

To stop misuse and surprise costs, website chat has these limits:

  • A message can be up to 1,000 characters.
  • One chat can send up to 6 messages a minute.
  • One network can send up to 60 messages an hour, and start up to 10 new chats a day.
  • Each website chat takes up to 500 messages a day (India time). After that, visitors see "This chat is very busy today. Please try again tomorrow." Contact us if you need more.
  • If visitors can send files, the limits in Let visitors send photos and PDFs apply too.

The platform's spending limits and pause switch also apply. If AI work is paused, visitors see "Chat is taking a short break. Please try again in a little while." See Limits and costs.

Turn the chat off

Turn off Show a chat button on your website. Within a minute, the button no longer appears when a page loads, and open chat windows stop taking messages. Your settings and past chats stay, so you can turn it back on at any time. To stop the agent or workforce everywhere, pause it instead.

Deleting the agent removes its website chat and ends every open chat. Its tasks are deleted too, and its leads are kept. Deleting a workforce removes its website chat in the same way, and its past tasks stay in Tasks.

If something goes wrong

  • The chat button doesn't appear. Check that the agent or workforce is published and not paused, that the chat is turned on, and that your website address is in Allowed websites, exactly as it shows in your browser's address bar. Then reload the page. Your browser's developer console may also say which address to add.
  • "This chat isn't set up for this website." The address the visitor is on isn't in Allowed websites. Add it.
  • "This chat isn't available right now." The agent or workforce is a draft or paused, or the chat is turned off. For a workforce, also check that its first agent isn't paused.
  • "A teammate will reply shortly." The reply is waiting for approval in Tasks. Approve it, and the visitor sees it in their chat.
  • "You're sending messages quickly. Please wait a moment and try again." The visitor hit the limit of 6 messages a minute in one chat.
  • "This chat doesn't take files." Let visitors send photos and PDFs is off. Turn it on if visitors should be able to send files.
  • "This photo is in HEIC format…" The visitor's phone saved the photo as HEIC and the browser couldn't change it. They can send it as a JPEG instead.
  • "Add your website address first, then turn chat on." Add your website under Allowed websites, then turn the chat on.
  • "… would let other people's websites use your chat. Use your own domain." Replace the wildcard with your own full address.

Last updated 24 September 2026

Something unclear or wrong? Tell us