Skip to content
Skip to main contentWhere does your team stand on AI adoption?
CONTACT SALESSTART BUILDING

Admin API

Use Builder's Admin API, a GraphQL API, with back-end servers or for trusted parties performing administrative tasks. The Admin API is separate from the public Content API, which is for consuming Builder content.

What to know

  • Query and modify data within your Builder Space using the GraphQL API.
  • The Admin SDK can also be used to interact with some features of the GraphQL API.

Choose your API access method

Choose whether you will access the API with the Node.js SDK or directly through the API. For more details on the Node.js SDK, see Builder's Admin SDK package repository on GitHub.

If you choose access through the GraphQL API, all Admin API queries use the following endpoint.

https://cdn.builder.io/api/v2/admin

You can also use the GraphQL Explorer to access the API through your web browser.

Authentication

Before using any operation, authenticate with the Builder.io API.

Framework

To authenticate, include the following Authorization header, replacing BUILDER_PRIVATE_KEY with your Builder's private Space key. This key should begin with the letters bpk.

import { createAdminApiClient } from '@builder.io/admin-sdk'; const adminSDK = createAdminApiClient(process.env.BUILDER_PRIVATE_KEY);

For more information about creating and organizing Private API Keys, see Managing Private Keys.

Available operations

The Admin API provides the following operations for managing Spaces, content structure, assets, access, and organization-level resources.

What's next

Continue to explore the Admin API documentation or use the GraphQL Explorer to try out these queries with your own Space and Organization. Then, visit the Admin API GraphQL Schema for more details on how to modify your queries.

Was this article helpful?