Pipeline API (0.1.0)

Use the Pipeline REST API to ingest the brand documents uploaded to your brand kit using the Documents REST API.

During the brand ingestion process, the system analyzes each uploaded document page by page, extracts brand information, and breaks it down into smaller pieces called knowledge chunks. These chunks are then organized, vectorized, and stored as your brand knowledge.

The AI uses this brand knowledge to generate content for each section of the brand kit. After the sections are populated, both the comprehensive brand knowledge and the completed brand kit sections are ready for use by Sitecore copilots and other AI tools.

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 Stream documentation.

Authorization

The Document Management REST API uses the OAuth 2.0 standard with JSON web tokens to authorize REST API requests.

Create Client ID and Client Secret

  1. In the Sitecore Cloud Portal, open Stream.
  2. Click Admin > Partner keys > Create credential.
  3. In the ​Create New Client​​ dialog, enter a name and description for the client. Then click Create. The ​Client ID and Client Secret​​ display.
  4. 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.

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.

Include the access token in the request header

You can now start making REST API requests. You must include the access token in the request header of every request. For example:

curl -X GET '{YOUR_BASE_URL}/v2/...' \
-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
-H 'Accept: application/json'
Download OpenAPI description
Overview
License Apache 2.0
Languages
Servers
Production West Europe API server
https://ai-pipeline-api-euw.sitecorecloud.io/
Production East US API server
https://ai-pipeline-api-use.sitecorecloud.io/
Production Australia East API server
https://ai-pipeline-api-aue.sitecorecloud.io/
Production Japan East API server
https://ai-pipeline-api-jpe.sitecorecloud.io/

Pipeline

A pipeline is a structured process that performs a series of automated tasks, typically to analyze, transform, or move data through defined stages.

In this REST API, this specific pipeline handles brand ingestion. It processes uploaded brand documents, extracts information, converts it into knowledge chunks, and stores it as brand knowledge. This knowledge is then used to populate the brand kit and support AI copilots and agents in generating brand-aligned content.

Operations

Create a pipeline run for brand ingestion

Request

Creates a new pipeline to run the brand ingestion process. Through this process, brand documents uploaded to a brand kit are processed, analyzed, and chunked into knowledge pieces to create brand knowledge.

Path
organizationIdstring[ 1 .. 200 ] charactersrequired

The unique identifier of your organization.

To get this value, from the Sitecore Cloud Portal URL, the organizationId is what comes after organization= .

Example: org_ABCDef123456​
Bodyapplication/jsonrequired
parametersobject(BrandIngestionPipelineParameters)required
parameters.​brand_kit_idstring

The unique identifier of the brand kit to be used for brand ingestion.

Example: "98689dd5-1684-48cb-a339-d9610dbd7986"
parameters.​populateSectionsboolean or null

Whether to populate the brand kit sections with the ingested brand knowledge.

Default true
Example: true
curl -i -X POST \
  'https://ai-pipeline-api-euw.sitecorecloud.io/api/data/v1/organizations/org_ABCDef123456​/pipeline/BrandIngestionPipeline' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "parameters": {
      "brand_kit_id": "98689dd5-1684-48cb-a339-d9610dbd7986",
      "populateSections": true
    }
  }'

Responses

Brand ingestion successfully ran

Bodyapplication/json
createdOnstring or null(date-time)required

The date and time when the pipeline run was created, formatted in ISO 8601.

Example: "2025-04-23T13:55:13.308326"
createdBystring or nullrequired

The user who created the pipeline run.

Example: "mman"
updatedOnstring or null(date-time)required

The date and time when the pipeline run was last updated, formatted in ISO 8601.

Example: "2025-04-23T13:55:13.308326"
updatedBystring or nullrequired

The user who last updated the pipeline run.

Example: "mman"
idstringrequired

The unique identifier of the pipeline run.

Example: "e774b4b6-204e-11f0-a62d-3e62ff39b87e"
pipelineIdstringrequired

The name of the pipeline used to run the brand ingestion process.

Example: "BrandIngestionPipeline"
parametersobjectrequired

The parameters used for brand ingestion, such as brand kit and organization IDs and base URLs.

Example: {"brand_kit_id":"98689dd5-1684-48cb-a339-d9610dbd7986","org_id":"org_ZiiCnzhCeHDpWJAU","baseUrlDocAPI":"https://ai-documents-api-euw.sitecorecloud.io"}
runStartstring or null(date-time)required

The date and time when the pipeline run began, formatted in ISO 8601.

Example: "2025-06-18T12:46:12.718310"
runEndstring or null(date-time)required

The date and time when the pipeline run finished, formatted in ISO 8601.

Example: "2025-06-18T12:46:12.718310"
durationInMsinteger or null

The total duration of the pipeline run in milliseconds.

Default 0
Example: 3
statusstring or null

The current status of the pipeline run.

Enum"Succeeded""Failed""Cancelled""InProgress""Queued""Canceling"null
Example: "Succeeded"
messagestring or null

Additional details or any error messages related to the pipeline run. This field is empty if no message is available.

Default ""
Example: ""
Response
application/json
{ "createdOn": "2025-04-23T13:55:13.308326", "createdBy": "mman", "updatedOn": "2025-04-23T13:55:13.308326", "updatedBy": "mman", "id": "e774b4b6-204e-11f0-a62d-3e62ff39b87e", "pipelineId": "BrandIngestionPipeline", "parameters": { "brand_kit_id": "98689dd5-1684-48cb-a339-d9610dbd7986", "org_id": "org_ZiiCnzhCeHDpWJAU", "baseUrlDocAPI": "https://ai-documents-api-euw.sitecorecloud.io" }, "runStart": "2025-06-18T12:46:12.718310", "runEnd": "2025-06-18T12:46:12.718310", "durationInMs": 3, "status": "Succeeded", "message": "" }