> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Public keys

> What a public key is, test versus live, and how to rotate one.

A public key identifies your store to the quote endpoint. It is **public by design**: it ships
in your HTML, and all it can do is read the saving for an amount, the same thing any shopper
sees on your page. It is not a credential and it cannot read or change anything about your
account.

| Prefix | Environment | API host |
| - | - | - |
| `pk_test_` | Sandbox | `sandbox-api.krti.com` |
| `pk_live_` | Production | `api.krti.com` |

The script on `js.krti.com` talks to production, the one on `sandbox-js.krti.com` to the
sandbox. A key only answers on its own environment.

## Where to get one

[partners.krti.com](https://partners.krti.com), **Website messaging**: create, copy and revoke
keys yourself. The page also shows the snippets with your key filled in and a live preview.

## Rotation

Create the new key, put it on your site, then revoke the old one. A revoked key answers
`404 key_not_found` and the script renders nothing, so revoke only once the new key is live.
You can hold up to five active keys at a time.


## Related topics

- [Public API](https://docs.krti.com/api-reference/introduction.md)
- [Overview](https://docs.krti.com/on-site-messaging/overview.md)
- [Krti for developers](https://docs.krti.com/index.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.