Skip to main content

Generating API keys

Each environment comes with its own unique users, blocks, and AI API key. Since environments are specific to a workspace, so are these API keys.

To get your API keys for a given environment, navigate to the Settings page and then click Environments. Select the environment you would like to grab API keys for.

Click the Generate API key button to generate the API key for the specified API. If you don’t see this button, but instead see a Regenerate API key button, that means the API key has already been generated and available.

Once you generate your API keys, we recommend keeping them in a safe place so they can be retreived later.


We'll only display the users API key once. Doing so keeps the key private for Dopt users who choose to identify their users from the backend. Note however that many Dopt users do expose the users API key to the client, which is a valid choice. This is safe because the users API key only has write access to user properties and will not expose any user data.

Users API keys are always prefixed with users-, blocks API keys are always prefixed with blocks-, and AI API keys are always prefixed with ai-.

If you forgot or need to revoke an API key, click the Regenerate API key button and a new API key will be generated for the specified API.


Regenerating an API key will invalidate the previous API key. This action can’t be undone so make sure you are prepared for the previous API key to no longer function.