Build a workspace app

Add a page from your product to Snoot chat and send requests to your Inbox.

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. An app can send a message to the current conversation or create a separate Snoot ticket.

Add your app

  1. In Settings → Apps in chat, add the app. Only workspace admins can manage apps.
  2. Enter a name and your app's HTTPS URL. It must use a different origin from Snoot. You can use a path on your existing site, so you do not need a separate hostname for each app. If the app shares an origin with the site that embeds the widget, its code has that site's normal browser access. Register only pages your team fully controls.
  3. Inbox messages and ticket submissions are off by default. Turn on only the actions this app needs.

Open an app from your product

Each enabled app row shows a direct-open call you can copy. After Snoot.init(), call Snoot.openApp(appId) from a link or button to open that app without showing the app list first. The request still follows your workspace's plan, embedding-origin, and pre-chat settings. For an iOS app, set widgetAppID in SnootConfiguration.

Add Snoot's and the customer site's origins to 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>

Create a ticket

This example creates a ticket in Snoot. Ask for an email only when SnootApp.ready says the visitor does not already have a contact.

<form id="feedback-form">
  <label>Title <input name="title" required></label>
  <label>Details <textarea name="details" required></textarea></label>
  <label>Email <input name="email" type="email"></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 email = form.querySelector('[name=email]');
let status = document.querySelector('#feedback-status');
let appContext;

SnootApp.ready.then((context) => {
  appContext = context;
  document.documentElement.dataset.theme = context.theme;
  email.required = context.requesterRequired;
  email.closest('label').hidden = !context.requesterRequired;
  button.disabled = false;
});

form.addEventListener('submit', async (event) => {
  event.preventDefault();
  let fields = new FormData(form);
  let requester = appContext.requesterRequired
    ? { email: fields.get('email') }
    : undefined;

  try {
    let result = await SnootApp.submitTicket({
      title: `Feature request: ${fields.get('title')}`,
      description: fields.get('details'),
      requester
    });
    if (result.ok) {
      status.textContent = 'Ticket created.';
      form.reset();
    } else if (result.error === 'requester_required') {
      status.textContent = 'Add your email to create this ticket.';
    } else {
      status.textContent = 'Could not create the ticket. Try again.';
    }
  } catch (_error) {
    status.textContent = 'Could not create the ticket. Try again.';
  }
});
</script>

How Snoot handles submissions

Inbox submissions become visitor messages in the current conversation. Ticket submissions appear in the Snoot ticket queue and do not create a chat. Snoot checks the app's current permission, origin, enabled state, and workspace plan on every submission. Your app does not need 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, and whether a requester email is needed to create a ticket.
SnootApp.submitTicket(fields)
Creates a Snoot ticket with a title and description. If requesterRequired is true, include requester: { email, name? }. Resolves with { ok: true } or a safe failure result. New contacts are not opted into email notifications.
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 before ready, or when eight submissions are in progress.
SnootApp.close()
Closes the app and shows the app list.
Snoot does not share the visitor's name, email, session key, or conversation ID with your app. Add your own sign-in flow if the app needs one. Do not rely on cross-site cookies. If pre-chat is required, visitors must complete that form before opening an app. Optional pre-chat lets them open apps first.

Need details about the website widget? Read the Widget SDK reference .