- Include the access token in the request header
Brand Management API (v1.0)
Use the Brand Management REST API to create a brand kit, retrieve all brand kits or a specific one including sections and subsections, and create or update the content of individual subsections.
This REST API lets you interect with:
- The brand kit object. A brand kit is a structured resource that enables organizations to manage their brand across various channels, teams, and content types. It defines the brand's identity through guidelines, tone, messaging rules, and other defining traits.
After creating a brand kit using the Brand Management REST API, you can use the Documents REST API to upload brand documents and the Pipeline REST API to initiate the brand ingestion process.
Note the following:
To use this REST API, you must authenticate your API requests.
All API requests are made in your production environment.
For more information, see the official Sitecore documentation.
The Brand Management REST API uses the OAuth 2.0 standard with JSON web tokens to authorize REST API requests.
- In the Sitecore Cloud Portal, open Stream.
- Click Admin > AI APIs keys > Create credential.
- In the Create New Client dialog, enter a name and description for the client. Then click Create. The Client ID and Client Secret display.
- Copy the Client ID and Client Secret because you won't be able to view them again in Stream. You'll use them to request an access token.
Run the following cURL command to request an access token. Replace the placeholder values with your Client ID and Client Secret.
curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={YOUR_API_KEY}' \
--data-urlencode 'client_secret={YOUR_API_SECRET}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'audience=https://api.sitecorecloud.io'In the response, the access_token key contains the access token:
{
"access_token": "{YOUR_ACCESS_TOKEN}",
"scope": "ai.org.brd:w ai.org.brd:r ai.org.docs:w ai.org.docs:r ai.org:admin",
"expires_in": 86400,
"token_type": "Bearer"
}Access tokens expire in 24 hours. If your requests unexpectedly return a response with status 401 Unauthorized, request a new access token by repeating this POST request.
We recommend that you cache the access token for 24 hours to avoid repeating this POST request while the access token is still valid.