1. Get your credentials
You need two different things, and they live in two different places. Settings → Workspace — the workspace’s publishable key (pk_…) for the
widget, and its secret key (sk_…) for POST /v1/users. Visible to the
owner and developers.
Settings → API keys — your own API token (pv_ut_…), which is what the
rest of the /v1 API and MCP take. It acts as you and carries
your workspace role.
2. Set your domain
Open Settings → Workspace and set your domain (for exampleapp.example.com).
This is what makes your publishable key safe to publish. In production, Peeve
compares the request Origin against this domain and rejects anything else.
Without a domain set, a production key only works from localhost.
See Origins for the exact rule, including the
www-insensitive match.
3. Install the widget
Drop the script tag on every page you want the agent to work on.init() call needed.
Nothing appears yet. The widget stays hidden for end users until your app has
been mapped for the first time, so a real visitor never meets an unmapped
cursor. Run the baseline capture from the dashboard to map it.
Peeve.init injects the same script tag with the same key, and is idempotent —
if you already have the tag on the page, it will not add a second one.
4. Tell Peeve who the user is
Once someone signs in, identify them. This is what turns an anonymous visitor into a named contact, and it is what lets the agent give plan-aware answers.identify carries modelled identity and is encrypted at rest. setContext is
an open key/value bag for business context — plaintext, non-secret. Put
identity in the first, everything else in the second. See
Identity and context.
5. Read your data with your API token
The quickest thing to confirm your token works — list your sessions./v1 read works this way — same envelope, same pagination, same errors.
See API conventions.
6. Push a user from your backend
This one is different: it uses the workspace secret key, so it must run on a server.What to read next
Authentication
The full key and origin model.
Widget JavaScript API
Every method the widget exposes on the page.
MCP server
Let Claude, ChatGPT or Cursor discover your product.
Rate limits
The per-plan ceilings, and what happens when you hit one.