Obtain API Credentials

Locate your API credentials in Klaviyo and differentiate between public and private keys.

Klaviyo uses public and private API keys to authenticate API requests. You can obtain and make changes to your API keys from your account's Settings page under the API Keys tab. To manage API keys, you must have an Owner, Admin, or Manager role on the account.

Klaviyo API keys tab showing public and private keys, and Create Private API Key with arrow and blue backgroundKlaviyo API keys tab showing public and private keys, and Create Private API Key with arrow and blue background

Public Key

Your public key, sometimes referred to as a site ID, is a short alphanumeric string that serves as the unique identifier for your Klaviyo account.

Public keys cannot be used to access secure data in your account and are safe to share. Use your public key when you need to track people and events in client-side JavaScript code.

Private Key

Private keys will have the prefix pk_ followed by a longer alphanumeric string. Klaviyo allows you to generate multiple private keys for your applications.

Your private API keys can be used to read and write data to your Klaviyo account and should never be exposed in client-side code or made accessible from public repositories.


Did this page help you?