Skip to main contentGet the benchmark report: Where does your team stand on AI adoption?
CONTACT SALESSTART BUILDING

An API key is an alphanumeric string that you can use to connect your code base with Builder. Use the Builder Public API Key to integrate with Builder.

An example of a Builder API Key is bb209db71e62412dbe0114bdae18fd15.

Tip: The Builder Public API Key is public, meaning that you don't have to keep it private. Because of this, there are no inherent security risks in it being publicly viewable, for example, on GitHub.

To find your Public API Key:

  1. Within your Builder Space, press Cmd + k (Mac) or Ctrl + k (Windows) to open the Command Palette.
  2. Start to type the letters API into the search field to filter results.
  3. Click your API key to copy to your clipboard.

Alternatively, find your Public API Key in Space Settings:

  1. Within your Builder Space, go Space Settings.
  2. Click the copy icon to the right of the Public API Key field.

The video below shows both ways of finding the Public API Key.

Most JavaScript apps use builder.init() to pass in the Public API Key. Replace YOUR_API_KEY with the Public API Key you copied from Settings.

// Replace with your Public API Key
builder.init('YOUR_API_KEY')

The following example shows what an actual Public API Key looks like when passed into builder.init().

// an example of an actual API key passed into init()
builder.init('bb209fb71eh2412dbe0114bdae18fd15')

In Angular, pass your API Key into BuilderModule.forRoot(), by replacing YOUR_API_KEY with the Public API Key you copied in Settings. Place the forRoot() method in the @NgModule() imports array.

@NgModule({
  declarations: [
    ...
  ],
  imports: [
    ...
    BuilderModule.forRoot(YOUR_API_KEY), // <-- Paste your API Key here.
    ...
  ],
  ...
})
export class AppModule {}

When you replace the YOUR_API_KEY placeholder, it looks similar to the following example.

// An example API Key in use
BuilderModule.forRoot('bb209fb71eh2412dbe0114bdae18fd15')

A Private API Key is a server-side credential that grants write access to your Builder Space. Use Private Keys when you need to:

  • Write or update content in your Builder Space programmatically
  • Fetch content that should remain private and not be publicly accessible

Only users with Admin permissions can view or create Private Keys.

Tip: Keep your Private API Key secret. Anyone with a Private Key has write access to your Builder content. Only use it in API calls from your server, not calls from public client applications.

To manage the Private Keys for your Space:

  1. Go to your Space Settings.
  2. To the right of Private Keys, click the Edit button.
  3. Create or revoke as many keys as you need.

For more information on how to use Private Keys with models, visit Create a Private Model.

In rare situations, you may need to create a Private Key for your Organization. Follow the same process, but on your Organization's Settings page. For more details on this page, visit Manage your Organization.

The video below shows going to Space Settings, creating, displaying, and copying a Private API Key:

Was this article helpful?