Contentstack is a headless, API-first content management system (CMS) that provides everything you need to power your web or mobile properties. To learn more about Contentstack, visit our website or refer to our documentation site to understand what we do.
This documentation provides information on endpoints, operations, parameters, and responses for the Brand Kit Management API. It includes details for creating, fetching, updating, and deleting Brand Kits and Voice Profiles.
Brand Kit is a powerful tool that serves as a centralized hub for your organization's brand identity, encompassing detailed brand information and persona guidelines. You can create, view, update, and delete multiple Brand Kits via the API requests documented.
Voice Profile lets you create distinct AI-generated brand voices for your content. You can use the API requests in this doc to manage these profiles within a Brand Kit.
Learn more about Brand Kit.
Brand Kit uses token-based authentication. You can use the Authtoken along with the Organization UID to make API requests. Read more about the different types of tokens.
To retrieve the authtoken, log in to your Contentstack account by using the Log into your account request under User Session. This request will return the authtoken in the response body.
You can generate multiple authtokens by executing the Log into your account request multiple times. These tokens do not have an expiration time limit. However, currently, there is a maximum limit of 20 valid tokens that a user can use per account at a time, to execute CMA requests.
Note: If you already have valid 20 tokens, creating a new authtoken will automatically cause the oldest authtoken to expire without warning.
For SSO-enabled organizations, the Log into your account request will not return the user authtoken for users who access the organization through Identity Provider login credentials. Consequently, any requests that require a user authtoken will not work. Only the owner of the organization and users with permission to access the Organization without SSO can use these APIs. Learn more about REST API Usage.
Rate limit is the maximum number of requests you can make using the Contentstack’s APIs in a given time period.
By default, the Brand Kit Management API enforces the following rate limits:
| API Request | Rate Limit |
|---|---|
Brand Kit Read (GET) and Write (POST/PUT/DELETE) requests | 10 requests per second per organization |
Your application will receive the HTTP 429 response code if the requests for a given time period exceed the defined rate limits.
The aforementioned limits are configurable depending on your plan. For more information, contact our Support team.
If there is something wrong with the API request, Contentstack returns an error.
Brand Kit uses conventional, standard HTTP status codes for errors, and returns a JSON body containing details about the error. In general, codes in the 2xx range signify success. The codes in the 4xx range indicate error, mainly due to information provided (for example, a required parameter or field was omitted). Lastly, codes in the 5xx range mean that there is something wrong with our servers; it is very rare though.
Let’s look at the error code and their meanings.
| HTTP status code | Description |
|---|---|
| 400 Bad Request | The request was incorrect or corrupted. |
| 401 Unauthorized User | The user is not authorized. |
| 403 Forbidden Error | The page or resource that is being accessed is forbidden. |
| 500 Internal Server Error | The server is malfunctioning and is not specific on what the problem is. |
| 502 Bad Gateway Error | A server received an invalid response from another server. |
| 504 Gateway Timeout Error | A server did not receive a timely response from another server that it was accessing while attempting to load the web page or fill another request by the browser. |
Note: The error codes that we get in the JSON response are not HTTP error codes but are custom Contentstack error codes that are used for internal purposes.
Contentstack offers you a Postman Collection that helps you try out our Brand Kit Management API. You can download this collection, connect to your Contentstack account, and try out the Brand Kit API with ease.
Learn more about how to get started with using the Postman Collection for Brand Kit Management API.
Brand Kit serves as a centralized repository for your organization's brand identity and guidelines, offering a comprehensive array of product details and overall brand persona. By using the API requests, you can create, view, update, and delete one or more Brand Kits.
The Get All Brand Kits request fetches the list of all the Brand Kits in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:read scope.
The Get a Single Brand Kit request fetches the details of a specific Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:read scope.
The Create Brand Kit request lets you create a new Brand Kit in the specified organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Here’s an example of the Request Body for creating a new Brand Kit:
{
"brand_kit": {
"name": "Sample Brand Kit",
"description": "This is a sample Brand Kit created for testing",
"api_keys": [
"bxxxxxxxxxxxx9",
"bxxxxxxxxxxxx9"
]
}
}The Update Brand Kit request lets you update an existing Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Here’s an example of the Request Body that you can use to update a Brand Kit:
{
"brand_kit": {
"name": "Sample Brand Kit",
"description": "This is the updated description for Sample Brand Kit",
"api_keys": [
"bxxxxxxxxxxxx9"
]
}
}The Delete Brand Kit request lets you delete an existing Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Voice Profiles allows you to define unique AI-generated brand voices that you can apply to your content. By using the API requests, you can create, view, update, and delete the Voice Profile in a Brand Kit.
The Get All Voice Profiles request fetches the list of all Voice Profiles in a Brand Kit within an organization.
To configure the permissions for your application via OAuth, include the brand-kits:read scope.
The Get a Single Voice Profile request fetches the specific Voice Profile from a Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:read scope.
The Create Voice Profile request lets you create a new Voice Profile in a Brand Kit within an organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Here’s an example of the Request Body for creating a new Voice Profile:
{
"voice_profile": {
"name": "Sample Voice Profile",
"description": "This is the sample description for new Voice Profile.",
"communication_style": {
"formality_level": 4,
"tone": 3,
"humor_level": 2,
"complexity_level": 1
}
}
}The Update Voice Profile request lets you update an existing Voice Profile from the Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Here’s an example of the Request Body for updating a Voice Profile:
{
"voice_profile":{
"description": "Test Brand Kit Description",
"insights": "Sample Insights",
"sample_content": "Sample Content",
"communication_style": {
"complexity_level": 1,
"formality_level": 2,
"humor_level": 3,
"tone": 4
}
}
}The Delete Voice Profile request lets you delete an existing Voice Profile from the Brand Kits in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Custom Credentials (LLM) Configuration allows you to integrate your own Large Language Model (LLM) credentials instead of using Contentstack’s default API settings. By using custom credentials, you can specify details such as the API provider, model type, and other required fields, enabling a personalized setup that aligns with your specific requirements.
The Get Custom Credentials request fetches the custom credentials from a Brand Kit in an organization.
To configure the permissions for your application via OAuth, include the brand-kits:read scope.
The Set Custom Credentials request lets you configure the custom API credentials for Brand Kit.
To configure the permissions for your application via OAuth, include the brand-kits:manage scope.
Here’s an example of the Request Body for configuring the Brand Kit using OpenAI API provider:
{
"include_decrypted_keys": true,
"llm_config": {
"mode": 1,
"config": {
"provider": "openai",
"keys": {
"api_key": "Key-XXXXXXXXXXXXXX"
},
"model": "gpt-4o-mini"
}
}
}
The Brand Kit Postman collection is a set of preconfigured REST API requests that will make it easy for you to get started with the Contentstack APIs and try out our API requests through the popular Postman REST client.
To use the Brand Kit Postman collection you will need to have the Postman. You can either download the Desktop app or use Postman for Web.
Note: If you have already installed Postman for your device, go to the Download Latest Postman Collection for Brand Kit section.
Postman is available for Windows (x32), Windows (x64), Mac (Intel Chip / Apple Chip), and Linux environments.
Once you have installed Postman on your device, click the Run in Postman button to start working with the Brand Kit Management API endpoints for Contentstack.
Note: The Brand Kit Postman collection does not support the now deprecated Postman Chrome extension. Make sure you have installed the latest version of the Postman desktop app.
This opens the Fork collection into your workspace modal from where you can proceed to download/work with the Brand Kit Postman collection in the following three ways:
Let’s look at each of the above methods in detail.
This option allows you to just view (and not try out) the API requests of the Postman collection.
Perform the following steps to view the Brand Kit Management API Postman collection:

A new tab opens up in your browser where you should see the latest collection preloaded in the left navigation.
Note: If you want to try out the API requests, you can either import a copy of the collection or fork the collection.
This option allows you to import a copy of the collection into your workspace.
To import the Brand Kit Management API collection, perform the following steps:


You will see a copy of the latest Postman collection in the left navigation panel.
This option allows you to fork, or create a copy of the collection, and perform changes to the collection without affecting the original.
To fork the Brand Kit Management API collection, perform the following steps:


Under Notifications, check Watch original collection to get notified of any changes that are made to the original collection.
Once done, click Fork Collection to fork the Postman collection into your selected workspace.
We have also hosted our Postman collection on GitHub. You can follow the steps mentioned in the Readme file to download and start using it.
You can also choose to watch the latest Postman collection to get notifications of new releases or updates.
To do so, click the following Watch button and select Watching.
When you download and install the latest version of the Brand Kit Management API Postman Collection, you also download and import the respective environment along with the environment variables.
Once your Environment is imported, next you need to set your Brand Kit account specific values.
Note: As these environment variables are referenced across multiple API requests, once you set the variables, it becomes a lot more convenient to make repeated use of the Postman Collection.
Some of the important variables that you need to set are as follows:
| Environment Variable | Value |
|---|---|
| base_url | https://ai.contentstack.com/brand-kits |
| brand_kit_uid | your_brand_kit_uid |
| authtoken | your_authtoken |
Note: The Brand Kit Postman Collection will require a valid Authtoken to make API calls. Check out the Authentication section for more details.
If you want to add your own environment variables, you can follow the procedure in the next section.
To add any new environment variables for your Postman collection, perform the following steps:
With every new API request added, we update our environment file. So, to get the latest environment variables, you need to download the collection along with the updated environment file again, compare your existing environment with the latest environment, identify and add the new variables to your existing environment.
Next, let’s see how you can run API Requests from your Brand Kit Postman collection using your environment.
With the Brand Kit Postman Collection loaded into the Postman app (on the left panel) and the environment created, you can now make API requests to the Brand Kit Management API via Postman.
To make an API request, perform the following steps:
Note: If you want to make changes to your parameters or want to add parameters of your own, you can do it here.
We strongly advise against storing your Organization UID and authtokens in your collection permanently. If you or someone else shares the collection by mistake, other users will be able to export it along with these keys.
We recommend that you provide your Brand Kit account-specific Organization UID and tokens in your environment or directly to the sample requests.
For users who use authtoken to authenticate their calls, when you make the Log in to your account API Request, your authtoken will be saved in cookies.
If you want to prevent this action, perform the steps given below:
This will allow you to access cookies of this domain in scripts programmatically.
Note: To avoid this situation, we recommend you to use the Brand Kit UID along with the Authtoken to make valid Brand Kit Management API requests. For more information, refer to Authentication.
We keep our Postman Collection updated. To get the latest version of our Postman Collection, all you need to do is to download the Postman Collection along with the updated environment again and you are good to go.
You can also choose to watch for the latest Postman Collection updates on our GitHub repository and get notifications of new releases or updates to the repository. The GitHub Readme doc will help you with the steps that you need to follow.