Site keys
A Site key is the key a web page presents to read its Site. It carries the prefix psk_ (“public Site key”), it belongs to one Site, and it reads only that Site’s answer while the Site is live.
A public key
A Site key goes in your page source, your tag manager and your server-side renderer, where anyone can read it. That is why the app shows it in full, with a Copy button, for as long as it exists rather than revealing it once. What protects your data is what the Site shares, not the key: see A Site is public.
A Site key:
- reads
GET /v1/personalize/{index}/{value}and nothing else; - answers only while its Site is live — a draft or paused Site refuses it with
403 site_not_live; - answers only from the Site’s domains, when the request names an origin;
- carries no secret power: it cannot read another Site, the workspace’s other audiences, or a Store entry directly.
Which key opens which route
Each personalization surface takes exactly one kind of key, and refuses every other kind by class with 401, before anything else is checked. The refusal names the key the route takes.
| Key | Prefix | Site read /v1/personalize | Membership API /v1/members, /v1/attributes | Profile API |
|---|---|---|---|---|
| Site key | psk_ | Yes | — | — |
| Membership key | pk_ | — | Yes | — |
| Serving key | svk_ | — | — | Yes |
| MCP key / REST key | sk_ / rk_ | — | — | — |
The Site key and the membership key are both public, and both answer about realtime audiences, but they mean different things. A membership key is direct access: every realtime audience and attribute in the workspace, by id. A Site key is curated delivery: only what one Site shares, under its labels. Keeping them separate classes is what stops either from being used as the other.
Manage keys
Site keys live on the Site, under Personalize → Sites → your Site → Console → Site keys. You can mint a key on a draft Site, so the install is ready before the first publish.
| Action | What happens |
|---|---|
| Create key | Mints a key with a name and an optional description. A Site holds at most 5 active keys. |
| Rotate | Mints a new key with the same name and leaves both keys live. Put the new key in your pages, then revoke the old one once no page carries it. Rotation counts toward the five-key limit. |
| Revoke | Pages presenting the key stop receiving the Site’s answer within a minute. This cannot be undone. |
Creating and rotating keys needs api_keys.write and realtime audiences enabled for the workspace; revoking needs api_keys.delete. Revoking still works if the workspace’s entitlement has lapsed. Deleting a Site revokes all its keys.
Each key’s last used time shows whether a page still carries it. Check it before you revoke an old key after a rotation.
Next Steps
- On your website — install the SDK with the key.
- Sites — what a Site shares and how it is published.
- Membership API — direct access on a membership key.