Apps in chat are available on Starter and Team. If a workspace returns to Free, its apps stop appearing in chat, but their settings are kept.
A widget app opens one of your product's pages inside Snoot chat. PitStop can use one for feature requests and bug reports. Snoot adds submissions to the visitor's current conversation.
Add your app
- In Settings → Widget → Apps in chat, add the app. Only workspace admins can manage apps.
- Enter a name and your app's HTTPS URL. It must use a different origin from Snoot and the website that embeds the widget. An origin includes the protocol, host, and port. Changing only the URL path does not count.
- Inbox submissions are off by default. Turn them on if visitors should send requests.
frame-ancestors
so both can embed
your app. In your Content Security Policy, let Snoot load snoot-app.js
through script-src.
Load the app helper
Copy the full helper URL from Apps in chat. Snoot generates the right URL for your deployment.
<script src="https://snoot.support/widget/snoot-app.js"></script>
Send a feature request
This example sends a feature request to the current conversation. Add the fields your team
needs, then send them with SnootApp.submitToInbox(text).
<form id="feedback-form">
<label>Title <input name="title" required></label>
<label>Details <textarea name="details" required></textarea></label>
<button type="submit" disabled>Send request</button>
</form>
<p id="feedback-status" role="status"></p>
<script>
let form = document.querySelector('#feedback-form');
let button = form.querySelector('button[type=submit]');
let status = document.querySelector('#feedback-status');
SnootApp.ready.then(({ theme }) => {
document.documentElement.dataset.theme = theme;
button.disabled = false;
});
form.addEventListener('submit', async (event) => {
event.preventDefault();
let fields = new FormData(form);
let body = `Feature request: ${fields.get('title')}\n${fields.get('details')}`;
try {
let result = await SnootApp.submitToInbox(body);
status.textContent = result.ok ? 'Request sent.' : 'Could not send the request. Try again.';
if (result.ok) form.reset();
} catch (_error) {
status.textContent = 'Could not send the request. Try again.';
}
});
</script>
How Snoot handles submissions
The helper sends messages through the Snoot widget that's already open. For each message, Snoot checks that the app belongs to this workspace, is enabled, and can send Inbox messages. It then adds a visitor message to the current conversation. Your app does not need to call a separate Snoot endpoint.
- SnootApp.ready
- Resolves when the app opens. It gives your page the app ID and the widget's light or dark theme.
- SnootApp.submitToInbox(text)
-
Accepts 1 to 2,000 characters. Resolves with
{ ok: true }on success and{ ok: false, error: 'submission_failed' }if Snoot rejects the message. The promise rejects for empty or overlong text, calls beforeready, or when eight submissions are in progress. - SnootApp.close()
- Closes the app and shows the app list.
Need details about the website widget? Read the Widget SDK reference .