Quarterzip.open()
Triggers the agent. Creates a mini-player on the page — the call does not begin until the user clicks Join.
| Parameter | Required | Description | Type |
|---|---|---|---|
workspaceToken | Yes | Use the workspace token provided by Quarterzip. | String |
agentId | Yes | The agent’s ID which can be copied from the Quarterzip app | String |
user | Yes | The user who will join the call | Object |
user.email | Yes | End user’s email address | String |
user.displayName | Yes | End user’s display name | String |
user.id | Yes | Your unique internal user identifier | String |
context | No | Additional 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.
Restricting usage by origin
Enable domain restriction in the Quarterzip app to validate theorigin header on each SDK request. When enabled, only calls originating from your specified domains will be allowed.
Device requirements
Quarterzip uses thegetDisplayMedia() web API for screen sharing, which is not available on most mobile devices. Guard against unsupported environments with:
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, callingwindow.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.ai | Quarterzip SDK |
|---|
connect-src
https://*.quarterzip.ai | Quarterzip API requests |
|---|---|
https://*.daily.cowss://*.daily.co | Call transport layer |
https://firestore.googleapis.comhttps://firebasestorage.googleapis.com | Database operations |
https://*.firebaseio.comwss://*.firebaseio.com | Firestore realtime listeners |
https://securetoken.googleapis.comhttps://identitytoolkit.googleapis.com | User auth |
https://storage.googleapis.com | CDN |
Permissions-Policy
If your site defines aPermissions-Policy header (or <iframe allow> attribute), these directives must be set:
microphone— Required for audio capturedisplay-capture— Required for screen sharingspeaker-selection— Required for audio output selection

