Skip to main content
A public key identifies your organization from browser code. It is safe to ship in your frontend bundle.

What a public key can do

Every other endpoint needs a secret key and refuses a public key with 401. Because the browser decides which customer ID it sends, treat these reads as hints for your UI. Before doing protected work, check access again from your backend with the secret key.

Usage

The React SDK sends the key for you:
To call an endpoint directly, send it as a header or a query parameter:

Billing page sign-in

A public key can open the billing page for any customer ID, so the billing page asks the customer to prove who they are. It emails a one-time sign-in link to the customer’s billing email before it shows invoices or allows a cancellation. You don’t need to do anything for this, beyond giving each customer an email. See Customers.

Creating keys

In the dashboard, go to Developers → API Keys. Your first public and secret keys are shown when you create your organization.