The Docoument API lets you upload, retrieve, or delete brand documents in a brand kit.
Uploads a new brand document and uses it as a source of brand information in the specified brand kit.
The unique identifier of your organization.
To get this value, in the Sitecore Cloud Portal URL, the organizationId comes after organization= .
A JSON string containing the following parameters for uploading a brand document:
url- if no file is uploaded from your local machine, this parameter contains the MMS-uploaded file URL. If a file is uploaded locally, this parameter is empty.status- the current status of the document, such as pending, processed, draft, active, archived, edited, or failed.type- the document type, such as brand guidelines.fileType- the document's file type, such as PDF.size- the document size.numberOfPages- the total number of pages in the document.pageRangeFrom- the starting page number for processing the document.pageRangeTo- the ending page number for processing the document.title- the title of the document.summary- a brief description of the document.tags- an array of tags associated with the documentreferences- an array of references associated with the document, including the type, brand kit ID, and reference.setMetadata- whether to set metadata for the document. Set this totrueto automatically fill important details, such as the document's title and number of pages, which are later used during the brand ingestion process.
JSON structure with example values:
{
"url": "https://mms-delivery.{domain}/api/media/v1/delivery/protected/{mediaId}.pdf",
"status": "draft",
"type": "brand guidelines",
"fileType": "PDF",
"size": "2.5MB",
"numberOfPages": 5,
"pageRangeFrom": 1,
"pageRangeTo": 5,
"title": "Brand guidelines",
"summary": "Visual and text guidelines",
"tags": ["visual", "text"],
"status": "pending",
"setMetadata": true,
"references": [
{
"type": "brandkit",
"id": "{YOUR_BRANDKIT_ID}",
"path": "/api/brands/v1/organizations/{YOUR_ORG_ID}/brandkits/{YOUR_BRANDKIT_ID}/references"
}
]
}- Production serverhttps://edge-platform.sitecorecloud.io/stream/ai-document-api/api/documents/v2/organizations/{organizationId}/documents
- Production serverhttps://edge-platform.sitecorecloud.io/ai/ai-document-api/api/documents/v2/organizations/{organizationId}/documents
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://edge-platform.sitecorecloud.io/ai/ai-document-api/api/documents/v2/organizations/org_ABCDef123456/documents \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F file=string \
-F 'create_request={
"url": "",
"setMetadata": true,
"references": [
{
"type": "brandkit",
"id": "{YOUR_BRANDKIT_ID}",
"path": "/api/brands/v1/organizations/{YOUR_ORG_ID}/brandkits/{YOUR_BRANDKIT_ID}/references"
}
]
}'Document successfully created
The unique identifier of your organization.
The unique identifier of the document.
The URL where the PDF document is located.
The date and time when the document was created, formatted in ISO 8601.
The date and time when the document was updated, formatted in ISO 8601.
The current status of the document.
An array of references associated with the document.
{ "organizationId": "org_ZiiCnzhCeHDpWJAU", "id": "11117df4-2412-44cf-b1e5-954330ca9230", "status": "pending", "url": "https://example.com/document.pdf", "type": "null", "fileType": "application/pdf", "size": "8127298", "numberOfPages": "10", "pageRangeFrom": 2, "pageRangeTo": 9, "title": "Company Brand Guidelines.pdf", "summary": "", "tags": [], "references": [], "chunked": false, "summarized": true, "createdOn": "2025-04-23T13:55:13.308326", "createdBy": "mman", "updatedOn": "2025-04-23T13:55:13.308326", "updatedBy": "mman" }