Skip to main content

Quarterzip.open()

Triggers the agent. Creates a mini-player on the page — the call does not begin until the user clicks Join.
window.Quarterzip.open({
  workspaceToken: 'YOUR_WORKSPACE_TOKEN',
  agentId: 'YOUR_AGENT_ID',
  user: {
    email: 'jane@company.com',
  	displayName: 'Jane Smith',
    id: 'your_internal_user_id'
  },
  context: 'Plan: Pro. Country: Germany. Handed over from Intercom.'
})
ParameterRequiredDescriptionType
workspaceTokenYesUse the workspace token provided by Quarterzip.String
agentIdYesThe agent’s ID which can be copied from the Quarterzip appString
userYesThe user who will join the callObject
user.emailYesEnd user’s email addressString
user.displayNameYesEnd user’s display nameString
user.idYesYour unique internal user identifierString
contextNoAdditional context passed to the agent during the call. Max 2,000 characters.String

Quarterzip.close()

In the event where an in-progress call should be cancelled without the user’s input,.close() can be called. This ends the active call (if any), tears down the UI, and cleans up all resources.
window.Quarterzip.close();

Restricting usage by origin

Enable domain restriction in the Quarterzip app to validate the origin header on each SDK request. When enabled, only calls originating from your specified domains will be allowed.

Device requirements

Quarterzip uses the getDisplayMedia() web API for screen sharing, which is not available on most mobile devices. Guard against unsupported environments with:
const canUseQuarterzip = !!(navigator.mediaDevices?.getDisplayMedia);

SPA routing

The SDK maintains an active WebRTC connection tied to the current page lifecycle. A full page reload — from the user refreshing the browser, calling window.location.reload(), or navigating in a multi-page app — will immediately drop the call. There is no automatic reconnection; the user must rejoin. The SDK should only be used within a single-page application (SPA) where navigation is handled client-side.

CSP Directives

script-src

Ensure the following origin is included. Nonce-based inline execution with static-dynamic is recommended; unsafe-inline may be used if not viable.
https://*.quarterzip.aiQuarterzip SDK

connect-src

https://*.quarterzip.aiQuarterzip API requests
https://*.daily.co
wss://*.daily.co
Call transport layer
https://firestore.googleapis.com
https://firebasestorage.googleapis.com
Database operations
https://*.firebaseio.com
wss://*.firebaseio.com
Firestore realtime listeners
https://securetoken.googleapis.com
https://identitytoolkit.googleapis.com
User auth
https://storage.googleapis.comCDN

Permissions-Policy

If your site defines a Permissions-Policy header (or <iframe allow> attribute), these directives must be set:
  • microphone — Required for audio capture
  • display-capture — Required for screen sharing
  • speaker-selection — Required for audio output selection