optic
Build on Optic with a server-side REST API, or embed the chat widget on your site. Everything is scoped to the organisation that owns the key.
Two key tiers, created in Settings → API keys. Keys are shown once and stored only as a hash.
sk_live_… secret — server-side only. Full org-scoped REST access. Send as Authorization: Bearer sk_live_…. Never expose in a browser.pk_live_… publishable — browser-safe. Origin-locked, widget endpoints only. Used by the embed snippet.Base URL https://getoptic.app/api/v1. Secret key required.
status defaults to todo.{ contact_email, subject, body, contact_name?, channel? }. The account is matched by email domain and impact is computed.{ type: "agent" | "note", body, author? }. An agent message on an email conversation sends a real, threaded email.curl https://getoptic.app/api/v1/conversations \ -H "Authorization: Bearer sk_live_your_key"
Paste this before </body>. Brand it in Settings → Chat widget; add your site to the key's allowed origins.
<script src="https://getoptic.app/widget.js"
data-optic-key="pk_live_your_key"></script>
<script>
// optional — link the chat to a signed-in user for impact scoring
Optic('identify', { id: 'user_123', email: 'user@company.com', name: 'Jane Doe' });
</script>Optic('identify', …) is optional — anonymous visitors work via a local session id. Commands: identify, open, close. Conversations land in your Inbox as the webchat channel; agent replies stream back to the widget live.
429.403. Secret keys are server-side and not origin-checked.401 invalid/revoked key · 403 wrong tier, missing scope, or disallowed origin · 404 not found / not yours · 429 rate limited.Manage keys in Settings → API keys.