X-MICROCMS-API-KEY is the authentication key required for each API request (GET, POST, PUT, PATCH, DELETE). Please include the X-MICROCMS-API-KEY in the request header when sending.
API keys can be created, edited, and deleted only by users with administrator privileges.
For information on migrating from the old API key format, please see Migration from the old API (such as X-API-KEY).
The number of API Keys you can create varies by Plan. For details, see the Pricing Plans page.
Depending on the permission settings of the API key, it may be possible to write from external sources (WRITE API requests), which could lead to draft content being published. Please handle it with care.
In particular, in a configuration where the API is called directly from the client (CSR), external users can obtain the API key. In such cases, if they know the endpoint, they can call any API, so please be cautious.
Possible countermeasures include the following methods:
An API key is a type of authentication key used for authentication and access control when using an API. It is primarily used to verify whether the user utilizing the API has the appropriate access rights. In microCMS, an API key called X-MICROCMS-API-KEY is provided for authentication and other purposes.
First, click on "○ API Keys" in the sidebar to navigate to the API key list screen.

Clicking the "Add" button in the API key management list will display the API key creation modal, allowing you to create an API key.

You will set the API key name and configure the permissions granted to the API key in detail.

There are two main items in the API key settings. You can switch tabs within the modal screen, so please make the necessary settings according to your needs.
There are two types of permissions for Content API settings:
Below, we will explain each type of permission.

You can set the default permissions for all APIs of the service.
Default permissions apply to all APIs across the entire service.
The items that can be set are as follows:
The “Retrieve All Draft Content” permission is used when retrieving multiple draft contents. Please use it when you want to check the display of a list in draft status.
(To retrieve a single draft content, use draftKey.)
Retrieve All Expired Content
The “Retrieve All Expired Content” permission is used when retrieving multiple expired contents. Please use it when you need to retrieve expired content for purposes such as backup.
When setting up the retrieval of all draft content and the retrieval of all published content, it is necessary to grant "GET" permissions simultaneously.
In the case of content that is "published and in draft," even if the permission for "retrieve all draft content" is granted, it is designed to only search for published data. For more details, please refer to this help article.

You can set individual permissions for each API.
The specified API will override the default permissions.
For example, if you specify "GET" as the default permission and grant "POST" and "PUT" permissions in the individual permission settings, the corresponding API will have "POST" and "PUT" permissions granted.
The items that can be set are the same as the default permissions.
By clicking on “+ Add Individual Permissions,” you can add individual permissions for multiple APIs.

For the Management API, which is available in beta, you can enable an operation by checking the box next to it.
Open the “Management API (Beta)” tab in the API Key creation modal and configure the settings.

For details about each Management API Endpoint, see the page below.
X-MICROCMS-API-KEY permissions let you configure access according to your requirements. Set appropriate permissions based on how you plan to use the API key.
If an API key with permissions for write methods (POST, PUT, PATCH, DELETE) is leaked, there is a risk that Content could be modified without authorization. Therefore, take particular care when handling API keys with permissions for write methods.
Separating and managing permissions for read methods (GET) and write methods lets you use API keys more securely and flexibly.
Consider the following configuration and usage practices:


You may want to make all Content available to users by default, while keeping certain APIs hidden from users and using them only internally. In such cases, you can configure permissions separately for public and private Content as follows:


Creating a key with these settings lets you embed it directly in the client, eliminating the need to build an intermediary server to hide the API key.
If you support multiple devices, you can create multiple API keys with the same permissions, such as one for your website, one for iOS, and one for Android.
This lets you control update cycles and adjust access scopes for each team or device.
Other possible uses include a key for batch processing that handles rankings, or a key with minimal read permissions for easily checking data locally. There are many ways to streamline and secure development.