How to use the Atlas JavaScript SDK
Last updated October 15, 2026
Overview
The Atlas JavaScript SDK is the code that controls the Atlas widget on your website or app. With it, your developers decide when the chat starts, who the customer is, what the widget looks like and when session recording runs.
You don't need to know how to code to use this article. Each section explains what the code does and when you'd want it, so you can pick what you need and hand the code to your developers.
What you can do with the SDK
| I want to… | Use |
| Load and start the widget | The install snippet and start |
| Remove the widget from a page | shutdown |
| Tell Atlas who the customer is | identify |
| Load the widget without the chat | chat.enabled: false |
| Open the chat from my own button | chat.openWindow() |
| Hide or show the chat bubble | chat.hideBubble() and chat.showBubble() |
| Open the chat with a message already typed | showNewChat |
| Move the bubble to another corner | position and offset |
| Show the chat only in some countries | access.countries |
| Change the widget's colors, size or titles | Styling options |
| Record sessions only on some pages | recording.start() and recording.stop() |
| Open the Help Center, a category or an article | Help Center methods |
| Start a specific chatbot | triggerChatbot |
Start and stop the widget
Start the widget
The install snippet loads Atlas on the page. Add it before the </head> tag on every page where the widget should appear. YOUR_APP_ID is your workspace's app ID, which Atlas fills in for you on the installation page.
Then start the widget:
Most options in this article go inside this start call, so you set them when the widget loads.
Stop the widget
Removes the widget from the page, for example on pages where you don't offer support.
Send Atlas requests through your own server
If your company routes third-party requests through its own servers, set proxyUrl to your server's address. Atlas then sends its API requests there instead of directly to Atlas.
Tell Atlas who the customer is
Identify the customer
When a customer is logged in to your app, the identify call tells Atlas who they are. Agents then see the customer's name and details in every conversation, instead of an anonymous visitor.
Add more customer details
Use fields for standard details, like job title or address, and customFields for your own Atlas custom fields. Create the custom fields in Atlas first, then use their keys here.
Add the customer's company
Use account to link the customer to their company, so agents see which company the customer belongs to.
Control when the chat runs
By default, the chat starts with the widget. Use these options to load the widget without the chat, for example to record sessions on a page where you don't offer chat.
Load the widget without the chat
Start the chat later
Stop the chat
Control the chat bubble
The bubble is the round button customers click to open the chat. Hide it when you'd rather open the chat from your own button or link.
Hide the bubble when the widget loads
Open the chat from your own button
Hide or show the bubble at any time
⟦ HTML BLOCK 17 · Code block ⟧
⟦ HTML BLOCK 18 · Code block ⟧
Don't open the chat when an agent replies
By default, the chat window opens when a new agent message arrives. Set openIncoming to false to keep it closed, for example to show an unread counter in your own design instead.
⟦ HTML BLOCK 19 · Code block ⟧
React to new messages and to the window opening
Callbacks let your app do something when an agent sends a message (onNewAgentMessage) or when the chat window opens or closes (onWindowVisibilityChange). For example, update your own unread counter.
⟦ HTML BLOCK 20 · Code block ⟧
Open the chat with a message already typed
Opens a new chat with your text filled in, for example "I need help with billing" from a link on your billing page.
Position and layout
Move the bubble
position sets the corner and offset sets the distance from the edges, in pixels.
Run your own action from the layout menu
If your widget's layout menu has an option that should trigger something in your app, register a callback with the option's key. In this example, the hello option shows an alert.
Change settings after the widget loads
Use update to change chat settings without reloading the page.
Show the chat only in some countries
Show the chat only in specific countries
Hide the chat in specific countries
Add inverseCountries: true to hide the chat in the listed countries instead.
Style the widget
Change the widget's colors, size, launcher label, title, subtitle and logo from code. To change the widget without code, read How to configure the chat widget.
Control session recording
By default, Atlas records sessions on every page with the install snippet. Use these options to record only on some pages, for example to skip pages with sensitive information.
Don't record when the widget loads
Start recording on a page
Stop recording on a page
Get the session ID
Returns the current session's ID, so you can send it to error monitoring tools, like Sentry, and match an error to its recording.
Open the Help Center
Open your Help Center inside the widget from anywhere in your app, for example from a "Help" link.
Open the Help Center home:
Open a category:
Open a specific article. Use the article's slug, the end of its URL:
Open a search with your text:
Start a chatbot
Starts a specific chatbot, for example when a customer clicks "Talk to sales". Replace CHATBOT_KEY with the "Chatbot Key" from the chatbot's entry block.
FAQs & Troubleshooting
Do I need a developer to use this?
Yes. The SDK is code that goes into your website or app. Share this article with whoever maintains it.
Where do I find my app ID?
In "App Configuration > Getting Started > Installation" . The install snippet there already includes it.
Why doesn't Atlas show the customer's name?
The identify call is missing or runs before the install snippet. Add it after the install snippet, once the customer is logged in.

