{"items":[{"type":"link","label":"Document Management API","link":"/ai-skills/ai-document-management-rest-api","routeSlug":"/ai-skills/ai-document-management-rest-api","content":{"contentType":"overview","meta":{"name":"Document Management API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"index.json","url":"/_bundle/ai-skills/ai-document-management-rest-api/index.json?download"},{"kind":"download","label":"index.yaml","url":"/_bundle/ai-skills/ai-document-management-rest-api/index.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"attribute","title":"License","titleTranslationKey":"info.license","label":"Closed source","value":"Closed source"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Document Management API (0.1.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the Document Management REST API to  upload documents to your organization's brand kit. You can also retrieve documents or delete them when needed."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This REST API lets you interect with:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The document object. A "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/stream/en/users/sitecore-stream/guidelines-for-uploading-brand-documents.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"brand document"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" serves as a source material for your organization's brand. These can include brand guidelines, tone of voice, or messaging frameworks."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"After uploading documents, you can use the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://api-docs.sitecore.com/ai-skills/ai-pipeline-rest-api"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Pipeline REST API"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to initiate the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/stream/en/users/sitecore-stream/brand-knowledge.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"brand ingestion"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" process. This enables Sitecore to analyze the uploaded documents, create a database of brand knowledge, and populate the brand kit's sections with relevant content."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Note the following:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To use this REST API, you must authenticate your API requests."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All API requests are made in your production environment."},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For more information, see the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"official Sitecore documentation"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"sectionId":"/ai-skills/ai-document-management-rest-api"}],"sectionId":"/ai-skills/ai-document-management-rest-api"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"section/authorization"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authorization"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Document Management REST API uses the OAuth 2.0 standard with "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/stream/en/users/sitecore-stream/generate-a-json-web-token--jwt-.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JSON web tokens"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to authorize REST API requests."},"children":[]}]}]}]}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/create-client-id-and-client-secret"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create Client ID and Client Secret"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the Sitecore Cloud Portal, open Stream."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Admin"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AI APIs keys"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" > "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create credential"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"​Create New Client​​"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" dialog, enter a name and description for the client. Then click "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The ​Client ID and Client Secret​​ display."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"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."},"children":[]}]}]}]}]}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/create-client-id-and-client-secret"}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/create-client-id-and-client-secret"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/request-an-access-token"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request an access token"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Run the following cURL command to request an access token. Replace the placeholder values with your Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n","language":"curl"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In the response, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"access_token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" key contains the access token:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"ai.org.brd:w ai.org.brd:r ai.org.docs:w ai.org.docs:r ai.org:admin\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"ai.org.brd:w ai.org.brd:r ai.org.docs:w ai.org.docs:r ai.org:admin\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n"},"children":[]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access tokens expire in 24 hours. If your requests unexpectedly return a response with status "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"401 Unauthorized"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", request a new access token by repeating this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"We recommend that you cache the access token for 24 hours to avoid repeating this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" request while the access token is still valid."},"children":[]}]}]}]}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/request-an-access-token"}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/request-an-access-token"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"section/authorization/include-the-access-token-in-the-request-header"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Include the access token in the request header"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"You can now start making REST API requests. You must include the access token in the request header of every request. For example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n-H 'Accept: application/json'\n","language":"curl"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n-H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n-H 'Accept: application/json'\n"},"children":[]}]}]}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/include-the-access-token-in-the-request-header"}],"sectionId":"/ai-skills/ai-document-management-rest-api/section/authorization/include-the-access-token-in-the-request-header"}]}]}},{"type":"group","label":"Authorization","link":"/ai-skills/ai-document-management-rest-api/section/authorization","routeSlug":"/ai-skills/ai-document-management-rest-api/section/authorization","items":[{"type":"link","label":"Create Client ID and Client Secret","link":"/ai-skills/ai-document-management-rest-api/section/authorization/create-client-id-and-client-secret","routeSlug":"/ai-skills/ai-document-management-rest-api/section/authorization/create-client-id-and-client-secret","content":null},{"type":"link","label":"Request an access token","link":"/ai-skills/ai-document-management-rest-api/section/authorization/request-an-access-token","routeSlug":"/ai-skills/ai-document-management-rest-api/section/authorization/request-an-access-token","content":null},{"type":"link","label":"Include the access token in the request header","link":"/ai-skills/ai-document-management-rest-api/section/authorization/include-the-access-token-in-the-request-header","routeSlug":"/ai-skills/ai-document-management-rest-api/section/authorization/include-the-access-token-in-the-request-header","content":null}],"content":null},{"type":"group","label":"Document","link":"/ai-skills/ai-document-management-rest-api/document","routeSlug":"/ai-skills/ai-document-management-rest-api/document","items":[{"label":"Create a document","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ai-skills/ai-document-management-rest-api/document/create_document_v2_api_documents_v2_organizations__organizationid__documents_post","routeSlug":"/ai-skills/ai-document-management-rest-api/document/create_document_v2_api_documents_v2_organizations__organizationid__documents_post","metadata":{"seo":{"title":"Create a document","description":"Uploads a new brand document and uses it as a source of brand information in the specified brand kit."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"create_document_v2_api_documents_v2_organizations__organizationId__documents_post","name":"Create a document","isWebhook":false,"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create a document","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Uploads a new brand document and uses it as a source of brand information in the specified brand kit."},{"nodeType":"security","requirements":[{"schemes":[{"name":"HTTPBearer","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"organizationId","in":"path","schemaId":"schema_818","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique identifier of your organization."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To get this value, in the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://portal.sitecorecloud.io/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sitecore Cloud Portal"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" URL, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organizationId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" comes after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organization="},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["multipart/form-data"],"mediaTypeSchemas":{"multipart/form-data":{"schemaId":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post"}},"schemaId":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post","pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/api/documents/v2/organizations/{organizationId}/documents","servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"parameters":{"path":[{"name":"organizationId","in":"path","required":true,"example":"org_ABCDef123456","schemaId":"schema_818"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"HTTPBearer","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"requestBody":{"multipart/form-data":{"schemaId":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post"}},"responseCodes":["201","400","422","500"],"pointer":"/api/documents/v2/organizations/{organizationId}/documents","href":"document/create_document_v2_api_documents_v2_organizations__organizationid__documents_post","openApiOperationId":"create_document_v2_api_documents_v2_organizations__organizationId__documents_post","summary":"Create a document"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"schemaId":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post","mediaTypes":["multipart/form-data"],"mediaTypeSchemas":{"multipart/form-data":{"schemaId":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"Document successfully created","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreateDocumentModelResponse_v2"}},"schemaId":"components/schemas/CreateDocumentModelResponse_v2"},{"code":"400","description":"Invalid file type","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}},"schemaId":"components/schemas/HTTPError"},{"code":"422","description":"Unprocessable entity","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}},"schemaId":"components/schemas/HTTPValidationError"},{"code":"500","description":"File upload failed","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}},"schemaId":"components/schemas/HTTPError"}],"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"components/schemas/CreateDocumentModelResponse_v2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/CreateDocumentModelResponse_v2"}}},{"code":"400","schemaId":"components/schemas/HTTPError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}}},{"code":"422","schemaId":"components/schemas/HTTPValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}}},{"code":"500","schemaId":"components/schemas/HTTPError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/document/create_document_v2_api_documents_v2_organizations__organizationid__documents_post"}],"panels":[]}]},"httpPath":"/api/documents/v2/organizations/{organizationId}/documents"},{"label":"List documents","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ai-skills/ai-document-management-rest-api/document/list_documents_v2_api_documents_v2_organizations__organizationid__documents_get","routeSlug":"/ai-skills/ai-document-management-rest-api/document/list_documents_v2_api_documents_v2_organizations__organizationid__documents_get","metadata":{"seo":{"title":"List documents","description":"Retrieves a list of documents in an organization. You can filter the results by various parameters, such as brand kit ID, status, type, and tags. This endpoint supports pagination and search functionality."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"list_documents_v2_api_documents_v2_organizations__organizationId__documents_get","name":"List documents","isWebhook":false,"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List documents","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieves a list of documents in an organization. You can filter the results by various parameters, such as brand kit ID, status, type, and tags. This endpoint supports pagination and search functionality."},{"nodeType":"security","requirements":[{"schemes":[{"name":"HTTPBearer","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"organizationId","in":"path","schemaId":"schema_819","required":true}],"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/get/parameters"},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"pageNumber","in":"query","schemaId":"schema_820"},{"name":"pageSize","in":"query","schemaId":"schema_821"},{"name":"search","in":"query","schemaId":"schema_822"},{"name":"searchType","in":"query","schemaId":"schema_823"},{"name":"type","in":"query","schemaId":"schema_824"},{"name":"status","in":"query","schemaId":"schema_825"},{"name":"createdBy","in":"query","schemaId":"schema_826"},{"name":"referenceType","in":"query","schemaId":"schema_827"},{"name":"referenceId","in":"query","schemaId":"schema_828"},{"name":"fileType","in":"query","schemaId":"schema_829"},{"name":"tags","in":"query","schemaId":"schema_830"},{"name":"includeDeleted","in":"query","schemaId":"schema_831"}],"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/api/documents/v2/organizations/{organizationId}/documents","servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"parameters":{"path":[{"name":"organizationId","in":"path","required":true,"example":"org_ABCDef123456","schemaId":"schema_819"}],"query":[{"name":"pageNumber","in":"query","required":false,"example":1,"schemaId":"schema_820"},{"name":"pageSize","in":"query","required":false,"example":50,"schemaId":"schema_821"},{"name":"search","in":"query","required":false,"example":"brand guidelines","schemaId":"schema_822"},{"name":"searchType","in":"query","required":false,"example":"fulltext","schemaId":"schema_823"},{"name":"type","in":"query","required":false,"example":"brand guidelines","schemaId":"schema_824"},{"name":"status","in":"query","required":false,"schemaId":"schema_825"},{"name":"createdBy","in":"query","required":false,"example":"mman","schemaId":"schema_826"},{"name":"referenceType","in":"query","required":false,"example":"brandkit","schemaId":"schema_827"},{"name":"referenceId","in":"query","required":false,"example":"8271dec7-0c30-457b-b37b-4489628d7d7b","schemaId":"schema_828"},{"name":"fileType","in":"query","required":false,"example":"application/pdf","schemaId":"schema_829"},{"name":"tags","in":"query","required":false,"example":["Global Goals","Brand Context"],"schemaId":"schema_830"},{"name":"includeDeleted","in":"query","required":false,"example":false,"schemaId":"schema_831"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"HTTPBearer","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["200","400","422"],"pointer":"/api/documents/v2/organizations/{organizationId}/documents","href":"document/list_documents_v2_api_documents_v2_organizations__organizationid__documents_get","openApiOperationId":"list_documents_v2_api_documents_v2_organizations__organizationId__documents_get","summary":"List documents"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"List of documents successfully retrieved","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ListDocumentsModelResponse_v2"}},"schemaId":"components/schemas/ListDocumentsModelResponse_v2"},{"code":"400","description":"Unsupported search type","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}},"schemaId":"components/schemas/HTTPError"},{"code":"422","description":"Unprocessable entity","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}},"schemaId":"components/schemas/HTTPValidationError"}],"pointer":"/paths/~1api~1documents~1v2~1organizations~1{organizationId}~1documents/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/ListDocumentsModelResponse_v2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ListDocumentsModelResponse_v2"}}},{"code":"400","schemaId":"components/schemas/HTTPError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}}},{"code":"422","schemaId":"components/schemas/HTTPValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/document/list_documents_v2_api_documents_v2_organizations__organizationid__documents_get"}],"panels":[]}]},"httpPath":"/api/documents/v2/organizations/{organizationId}/documents"},{"label":"Delete a document","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/ai-skills/ai-document-management-rest-api/document/delete_document_api_documents_v1_organizations__organizationid__documents__documentid__delete","routeSlug":"/ai-skills/ai-document-management-rest-api/document/delete_document_api_documents_v1_organizations__organizationid__documents__documentid__delete","metadata":{"seo":{"title":"Delete a document","description":"Deletes a brand document from a brand kit by its reference ID. You can delete a brand document from your brand kit if it’s no longer needed or was uploaded by mistake. This is an irreversible operation. After you delete a document, you cannot retrieve the document or any related information extracted from it."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"delete_document_api_documents_v1_organizations__organizationId__documents__documentId__delete","name":"Delete a document","isWebhook":false,"pointer":"/paths/~1api~1documents~1v1~1organizations~1{organizationId}~1documents~1{documentId}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Delete a document","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Deletes a brand document from a brand kit by its reference ID. You can delete a brand document from your brand kit if it’s no longer needed or was uploaded by mistake. This is an irreversible operation. After you delete a document, you cannot retrieve the document or any related information extracted from it."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"HTTPBearer","scopes":[],"type":"http","scheme":"bearer","bearerFormat":"JWT"}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"organizationId","in":"path","schemaId":"schema_832","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique identifier of your organization."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To get this value, in the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://portal.sitecorecloud.io/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sitecore Cloud Portal"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" URL, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organizationId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" comes after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organization="},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ."},"children":[]}]}]}],"required":true},{"name":"documentId","in":"path","schemaId":"schema_833","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique identifier of the document to delete. To get this value, you can retrieve the list of documents using the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"#tag/Document/operation/list_documents_v2_api_documents_v2_organizations__organizationId__documents_get"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List documents"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint. The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" field in the response contains the document ID."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Alternatively, this is the same identifier that you receive in the response when using the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"#tag/Document/operation/create_document_v2_api_documents_v2_organizations__organizationId__documents_post"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a document"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1api~1documents~1v1~1organizations~1{organizationId}~1documents~1{documentId}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/api/documents/v1/organizations/{organizationId}/documents/{documentId}","servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"parameters":{"path":[{"name":"organizationId","in":"path","required":true,"example":"org_ABCDef123456​","schemaId":"schema_832"},{"name":"documentId","in":"path","required":true,"example":"documentid123","schemaId":"schema_833"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"HTTPBearer","type":"http","scheme":"bearer","bearerFormat":"JWT"}],"scopes":[]}],"responseCodes":["204","404","422","500"],"pointer":"/api/documents/v1/organizations/{organizationId}/documents/{documentId}","href":"document/delete_document_api_documents_v1_organizations__organizationid__documents__documentid__delete","openApiOperationId":"delete_document_api_documents_v1_organizations__organizationId__documents__documentId__delete","summary":"Delete a document"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"204","description":"Document deleted successfully"},{"code":"404","description":"Document not found","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}},"schemaId":"components/schemas/HTTPError"},{"code":"422","description":"Unprocessable entity","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}},"schemaId":"components/schemas/HTTPValidationError"},{"code":"500","description":"Failed to delete document","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}},"schemaId":"components/schemas/HTTPError"}],"pointer":"/paths/~1api~1documents~1v1~1organizations~1{organizationId}~1documents~1{documentId}/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"204"},{"code":"404","schemaId":"components/schemas/HTTPError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}}},{"code":"422","schemaId":"components/schemas/HTTPValidationError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPValidationError"}}},{"code":"500","schemaId":"components/schemas/HTTPError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/HTTPError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/document/delete_document_api_documents_v1_organizations__organizationid__documents__documentid__delete"}],"panels":[]}]},"httpPath":"/api/documents/v1/organizations/{organizationId}/documents/{documentId}"}],"content":{"contentType":"group","meta":{"name":"Document"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Document","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The Docoument API lets you upload, retrieve, or delete "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://doc.sitecore.com/stream/en/users/sitecore-stream/guidelines-for-uploading-brand-documents.html"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"brand documents"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" in a brand kit."},"children":[]}]}]}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/api/documents/v2/organizations/{organizationId}/documents","summary":"Create a document","prefix":{"name":"post","color":"post"},"badges":[],"link":"/document/create_document_v2_api_documents_v2_organizations__organizationid__documents_post","deprecated":false},{"title":"/api/documents/v2/organizations/{organizationId}/documents","summary":"List documents","prefix":{"name":"get","color":"get"},"badges":[],"link":"/document/list_documents_v2_api_documents_v2_organizations__organizationid__documents_get","deprecated":false},{"title":"/api/documents/v1/organizations/{organizationId}/documents/{documentId}","summary":"Delete a document","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/document/delete_document_api_documents_v1_organizations__organizationid__documents__documentid__delete","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post":{"id":"components/schemas/Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post","kind":"json-schema","title":"Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post","data":{"properties":{"file":{"type":"string","format":"binary","description":"The PDF file to upload as a brand document. You must select a file from your local machine."},"create_request":{"type":"string","example":"{\n  \"url\": \"\",\n \"setMetadata\": true,\n  \"references\": [\n      {\n           \"type\": \"brandkit\",\n           \"id\": \"{YOUR_BRANDKIT_ID}\",\n           \"path\": \"/api/brands/v1/organizations/{YOUR_ORG_ID}/brandkits/{YOUR_BRANDKIT_ID}/references\"\n      }\n   ]\n}","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A JSON string containing the following parameters for uploading a brand document:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"url"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - 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."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"status"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the current status of the document, such as pending, processed, draft, active, archived, edited, or failed."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the document type, such as brand guidelines."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fileType"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the document's file type, such as PDF."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"size"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the document size."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"numberOfPages"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the total number of pages in the document."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pageRangeFrom"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the starting page number for processing the document."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pageRangeTo"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the ending page number for processing the document."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"title"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - the title of the document."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"summary"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - a brief description of the document."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tags"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - an array of tags associated with the document"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"references"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - an array of references associated with the document, including the type, brand kit ID, and reference."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"setMetadata"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - whether to set metadata for the document. Set this to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to automatically fill important details, such as the document's title and number of pages, which are later used during the brand ingestion process."},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"JSON structure with example values:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n \"url\": \"https://mms-delivery.{domain}/api/media/v1/delivery/protected/{mediaId}.pdf\",\n \"status\": \"draft\",\n \"type\": \"brand guidelines\",\n \"fileType\": \"PDF\",\n \"size\": \"2.5MB\",\n \"numberOfPages\": 5,\n \"pageRangeFrom\": 1,\n \"pageRangeTo\": 5,\n \"title\": \"Brand guidelines\",\n \"summary\": \"Visual and text guidelines\",\n \"tags\": [\"visual\", \"text\"],\n \"status\": \"pending\",\n \"setMetadata\": true,\n \"references\": [\n     {\n          \"type\": \"brandkit\",\n          \"id\": \"{YOUR_BRANDKIT_ID}\",\n          \"path\": \"/api/brands/v1/organizations/{YOUR_ORG_ID}/brandkits/{YOUR_BRANDKIT_ID}/references\"\n     }\n  ]\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n \"url\": \"https://mms-delivery.{domain}/api/media/v1/delivery/protected/{mediaId}.pdf\",\n \"status\": \"draft\",\n \"type\": \"brand guidelines\",\n \"fileType\": \"PDF\",\n \"size\": \"2.5MB\",\n \"numberOfPages\": 5,\n \"pageRangeFrom\": 1,\n \"pageRangeTo\": 5,\n \"title\": \"Brand guidelines\",\n \"summary\": \"Visual and text guidelines\",\n \"tags\": [\"visual\", \"text\"],\n \"status\": \"pending\",\n \"setMetadata\": true,\n \"references\": [\n     {\n          \"type\": \"brandkit\",\n          \"id\": \"{YOUR_BRANDKIT_ID}\",\n          \"path\": \"/api/brands/v1/organizations/{YOUR_ORG_ID}/brandkits/{YOUR_BRANDKIT_ID}/references\"\n     }\n  ]\n}\n"},"children":[]}]}]}},"type":"object","required":["create_request"],"title":"Body_create_document_v2_api_documents_v2_organizations__organizationId__documents_post"}},"components/schemas/CreateDocumentModelResponse_v2":{"id":"components/schemas/CreateDocumentModelResponse_v2","kind":"json-schema","title":"CreateDocumentModelResponse_v2","data":{"properties":{"organizationId":{"type":"string","description":"The unique identifier of your organization.","example":"org_ZiiCnzhCeHDpWJAU"},"id":{"type":"string","description":"The unique identifier of the document.","example":"11117df4-2412-44cf-b1e5-954330ca9230"},"status":{"description":"The current status of the document.","default":"pending","type":["string","null"],"$ref":"#/components/schemas/DocumentStatus","enum":["pending","processed","draft","active","archived","edited","failed",null]},"url":{"type":"string","description":"The URL where the PDF document is located.","example":"https://example.com/document.pdf"},"type":{"description":"The document type.","example":"null","type":["string","null"]},"fileType":{"description":"The document's file type.","example":"application/pdf","type":["string","null"]},"size":{"description":"The document size in bytes.","example":"8127298","type":["string","null"]},"numberOfPages":{"description":"The total number of pages in the document.","example":"10","default":0,"type":["integer","null"]},"pageRangeFrom":{"description":"The starting page number for processing the document.","example":2,"type":["integer","null"]},"pageRangeTo":{"description":"The ending page number for processing the document.","example":9,"type":["integer","null"]},"title":{"description":"The title of the document.","example":"Company Brand Guidelines.pdf","type":["string","null"]},"summary":{"description":"A brief description of the document.","default":"","type":["string","null"]},"tags":{"description":"An array of tags associated with the document.","default":[],"type":["array","null"],"items":{"type":"string"}},"references":{"description":"An array of references associated with the document.","default":[],"type":["array","null"],"items":{"$ref":"#/components/schemas/CreateReferenceModelResponse"}},"chunked":{"description":"Whether the document has been chunked.","example":false,"default":false,"type":["boolean","null"]},"summarized":{"description":"Whether the document has been summarized.","example":true,"default":false,"type":["boolean","null"]},"createdOn":{"description":"The date and time when the document was created, formatted in ISO 8601.","format":"date-time","example":"2025-04-23T13:55:13.308326","type":["string","null"]},"createdBy":{"description":"The user who created the document.","example":"mman","type":["string","null"]},"updatedOn":{"description":"The date and time when the document was updated, formatted in ISO 8601.","format":"date-time","example":"2025-04-23T13:55:13.308326","type":["string","null"]},"updatedBy":{"description":"The user who last updated the document.","example":"mman","type":["string","null"]}},"type":"object","required":["organizationId","id","url","type","fileType","size","title","createdOn","createdBy","updatedOn","updatedBy"],"title":"CreateDocumentModelResponse_v2"}},"components/schemas/CreateReferenceModelResponse":{"id":"components/schemas/CreateReferenceModelResponse","kind":"json-schema","title":"CreateReferenceModelResponse","data":{"properties":{"id":{"type":"string","description":"The unique identifier of the document.","example":"11117df4-2412-44cf-b1e5-954330ca9230"},"path":{"type":"string","description":"The location of the document.","example":"/path"},"type":{"type":"string","description":"The type of the document.","example":"brandkit"}},"type":"object","required":["id","path","type"]}},"components/schemas/DocumentModel_v2":{"id":"components/schemas/DocumentModel_v2","kind":"json-schema","title":"DocumentModel_v2","data":{"properties":{"organizationId":{"description":"The unique identifier of your organization.","example":"org_ZiiCnzhCeHDpWJAU","type":["string","null"]},"id":{"description":"The unique identifier of the document.","example":"11117df4-2412-44cf-b1e5-954330ca9230","type":["string","null"]},"status":{"description":"The current status of the document.","example":"pending","type":["string","null"]},"chunked":{"description":"Whether the document has been chunked.","example":false,"type":["boolean","null"]},"summarized":{"description":"Whether the document has been summarized.","example":true,"type":["boolean","null"]},"url":{"description":"The URL where the PDF document is located.","example":"https://example.com/document.pdf","type":["string","null"]},"type":{"description":"The document type.","example":"brand guidelines","type":["string","null"]},"fileType":{"description":"The document's file type.","example":"application/pdf","type":["string","null"]},"size":{"description":"The document size in bytes.","example":"8127298","type":["string","null"]},"numberOfPages":{"description":"The total number of pages in the document.","example":10,"default":0,"type":["integer","null"]},"pageRangeFrom":{"description":"The starting page number for processing the document.","example":2,"type":["integer","null"]},"pageRangeTo":{"description":"The ending page number for processing the document.","example":9,"type":["integer","null"]},"title":{"description":"The title of the document.","example":"Company Brand Guidelines.pdf","type":["string","null"]},"summary":{"description":"A brief description of the document.","example":"Visual and text guidelines","default":"","type":["string","null"]},"tags":{"description":"An array of brand kit sections associated with the document.","example":["Global Goals","Brand Context"],"default":[],"type":["array","null"],"items":{"type":"string"}},"references":{"description":"The references associated with the document.","example":[{"id":"8271dec7-0c30-457b-b37b-4489628d7d7b","path":"/api/brands/v1/organizations/org_ABCDEF/brandkits/bk_123/references","type":"brandkit"}],"default":[],"type":["array","null"],"items":{"$ref":"#/components/schemas/GetReferenceModelResponse"}},"createdOn":{"description":"The date and time when the document was created, formatted in ISO 8601.","format":"date-time","example":"2025-04-23T13:55:13.308326","type":["string","null"]},"createdBy":{"description":"The user who created the document.","example":"mman","type":["string","null"]},"updatedOn":{"description":"The date and time when the document was last updated, formatted in ISO 8601.","format":"date-time","example":"2025-04-23T13:55:13.308326","type":["string","null"]},"updatedBy":{"description":"The user who last updated the document.","example":"mman","type":["string","null"]},"searchScore":{"description":"The relevance score of the document in search results. This value is calculated based on the search query and the document's content.","example":0.85,"type":["number","null"]}},"type":"object","required":["organizationId","id","status","url","type","fileType","size","title"],"title":"DocumentModel_v2"}},"components/schemas/DocumentStatus":{"id":"components/schemas/DocumentStatus","kind":"json-schema","title":"DocumentStatus","data":{"type":"string","enum":["pending","processed","draft","active","archived","edited","failed"],"title":"DocumentStatus"}},"components/schemas/GetReferenceModelResponse":{"id":"components/schemas/GetReferenceModelResponse","kind":"json-schema","title":"GetReferenceModelResponse","data":{"properties":{"id":{"type":"string","description":"The unique identifier of the document.","example":"11117df4-2412-44cf-b1e5-954330ca9230"},"path":{"type":"string","description":"The location of the document.","example":"/api/brands/v1/organizations/org_ABCDEF/brandkits/bk_123/references"},"type":{"type":"string","description":"The type of the document reference.","example":"brandkit"}},"type":"object","required":["id","path","type"]}},"components/schemas/HTTPError":{"id":"components/schemas/HTTPError","kind":"json-schema","title":"HTTPError","data":{"properties":{"detail":{"type":"string","title":"Detail"}},"additionalProperties":false,"type":"object","required":["detail"],"title":"HTTPError"}},"components/schemas/HTTPValidationError":{"id":"components/schemas/HTTPValidationError","kind":"json-schema","title":"HTTPValidationError","data":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}},"components/schemas/ListDocumentsModelResponse_v2":{"id":"components/schemas/ListDocumentsModelResponse_v2","kind":"json-schema","title":"ListDocumentsModelResponse_v2","data":{"properties":{"totalCount":{"type":"integer","description":"The total number of documents that match the search criteria.","example":100},"pageSize":{"type":"integer","description":"The number of documents returned per page.","example":50},"pageNumber":{"type":"integer","description":"The current page number in the paginated response.","example":1},"data":{"items":{"$ref":"#/components/schemas/DocumentModel_v2"},"type":"array","description":"An array of documents that match the search criteria. Each document contains details such as its ID, title, type, status, and other metadata."}},"type":"object","required":["totalCount","pageSize","pageNumber","data"],"title":"ListDocumentsModelResponse_v2"}},"components/schemas/ValidationError":{"id":"components/schemas/ValidationError","kind":"json-schema","title":"ValidationError","data":{"properties":{"loc":{"items":{"type":["string","integer"]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"schema_818":{"kind":"json-schema","data":{"type":"string","example":"org_ABCDef123456"},"id":"schema_818"},"schema_819":{"kind":"json-schema","data":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique identifier of your organization."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To get this value, in the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://portal.sitecorecloud.io/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sitecore Cloud Portal"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" URL, the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organizationId"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" comes after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"organization="},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" ."},"children":[]}]}]}],"example":"org_ABCDef123456"},"id":"schema_819"},"schema_820":{"kind":"json-schema","data":{"type":"integer","minimum":1,"default":1,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The page number to retrieve. The default value is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". If you do not specify this parameter, the API returns the first page of results."},"children":[]}]}]}],"example":1},"id":"schema_820"},"schema_821":{"kind":"json-schema","data":{"type":"integer","maximum":100,"minimum":1,"default":50,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The number of documents to return per page. The maximum value is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"100"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and the minimum value is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". If you do not specify this parameter, the API returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"50"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" documents per page."},"children":[]}]}]}],"example":50},"id":"schema_821"},"schema_822":{"kind":"json-schema","data":{"description":"The search query to filter documents by title, summary, or tags. This parameter supports full-text search and is case-insensitive.","example":"brand guidelines","type":["string","null"]},"id":"schema_822"},"schema_823":{"kind":"json-schema","data":{"enum":["fulltext","vector","hybrid","semantic"],"type":"string","description":"The type of search to perform. If you do not specify this parameter, the API performs a full-text search.","example":"fulltext"},"id":"schema_823"},"schema_824":{"kind":"json-schema","data":{"description":"The type of document to filter by. If you do not specify this parameter, the API returns all documents.","example":"brand guidelines","type":["string","null"]},"id":"schema_824"},"schema_825":{"kind":"json-schema","data":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The status of the document to filter by. This parameter supports the following values: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"processed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"draft"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"active"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"archived"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"edited"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"failed"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". If you do not specify this parameter, the API returns documents with any status."},"children":[]}]}]}],"type":["string","null"]},"id":"schema_825"},"schema_826":{"kind":"json-schema","data":{"description":"The user who created the document. If you do not specify this parameter, the API returns documents created by any user.","example":"mman","type":["string","null"]},"id":"schema_826"},"schema_827":{"kind":"json-schema","data":{"description":"The type of document reference to filter by. If you do not specify this parameter, the API returns documents with any reference type.","example":"brandkit","type":["string","null"]},"id":"schema_827"},"schema_828":{"kind":"json-schema","data":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The unique identifier the brand kit to filter by."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To get this value, use the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"#operation/list_brand_kits_api_brands_v1_organizations__organizationId__brandkits_get"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List brand kits"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint  to return the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of each brand kit in your organization. This is the same "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" returned when you create a brand kit using the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"#operation/create_brand_kit_api_brands_v1_organizations__organizationId__brandkits_post"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a brand kit"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" endpoint."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Alternatively, you can open your brand kit in Stream. In the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"https://portal.sitecorecloud.io/"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sitecore Cloud Portal"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" URL,  the brand kit ID comes after "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"brandkits/"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":"8271dec7-0c30-457b-b37b-4489628d7d7b","type":["string","null"]},"id":"schema_828"},"schema_829":{"kind":"json-schema","data":{"description":"The file type of the document to filter by. If you do not specify this parameter, the API returns documents with any file type.","example":"application/pdf","type":["string","null"]},"id":"schema_829"},"schema_830":{"kind":"json-schema","data":{"default":[],"description":"The tags to filter documents by. This parameter supports an array of strings, where each string is a brand kit section associated with the document. If you do not specify this parameter, the API returns documents with any tags.","example":["Global Goals","Brand Context"],"type":["array","null"],"items":{"type":"string"}},"id":"schema_830"},"schema_831":{"kind":"json-schema","data":{"default":false,"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Whether to include deleted documents in the response. If set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the API returns documents that have been deleted. If set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", the API returns only active documents. The default value is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"example":false,"type":["boolean","null"]},"id":"schema_831"},"schema_832":{"kind":"json-schema","data":{"type":"string","example":"org_ABCDef123456​"},"id":"schema_832"},"schema_833":{"kind":"json-schema","data":{"type":"string","example":"documentid123"},"id":"schema_833"}},"exampleStore":{},"securitySchemeStore":{"HTTPBearer":{"id":"HTTPBearer","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"servers":[{"url":"https://edge-platform.sitecorecloud.io/stream/ai-document-api","description":"Production server"},{"url":"https://edge-platform.sitecorecloud.io/ai/ai-document-api","description":"Production server"}],"specType":"openapi"},"options":{"hideInfoMetadata":true,"sanitize":true,"sortRequiredPropsFirst":true,"corsProxyUrl":"https://cors.redoc.ly","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/ai-skills/ai-document-management-rest-api/index.json?download"},{"url":"/_bundle/ai-skills/ai-document-management-rest-api/index.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Document Management API","description":"Use the Document Management REST API to  upload documents to your organization's brand kit. You can also retrieve documents or delete them when needed. \n\n This REST API lets you interect with:\n\n - The document object. A [brand document](https://doc.sitecore.com/stream/en/users/sitecore-stream/guidelines-for-uploading-brand-documents.html) serves as a source material for your organization's brand. These can include brand guidelines, tone of voice, or messaging frameworks. \n\n After uploading documents, you can use the [Pipeline REST API](https://api-docs.sitecore.com/ai-skills/ai-pipeline-rest-api) to initiate the [brand ingestion](https://doc.sitecore.com/stream/en/users/sitecore-stream/brand-knowledge.html) process. This enables Sitecore to analyze the uploaded documents, create a database of brand knowledge, and populate the brand kit's sections with relevant content.\n\nNote the following:\n\n - To use this REST API, you must authenticate your API requests.\n\n - All API requests are made in your production environment.\n\nFor more information, see the [official Sitecore documentation](https://doc.sitecore.com/).\n\n# Authorization\nThe Document Management REST API uses the OAuth 2.0 standard with [JSON web tokens](https://doc.sitecore.com/stream/en/users/sitecore-stream/generate-a-json-web-token--jwt-.html) to authorize REST API requests.\n### Create Client ID and Client Secret\n  1. In the Sitecore Cloud Portal, open Stream.\n  2. Click **Admin** > **AI APIs keys** > **Create credential**.\n  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.\n  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.\n\n### Request an access token\nRun the following cURL command to request an access token. Replace the placeholder values with your Client ID and Client Secret.\n```curl\n  curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'client_id={YOUR_API_KEY}' \\\n  --data-urlencode 'client_secret={YOUR_API_SECRET}' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'audience=https://api.sitecorecloud.io'\n```\nIn the response, the `access_token` key contains the access token:\n```json\n  {\n    \"access_token\": \"{YOUR_ACCESS_TOKEN}\",\n    \"scope\": \"ai.org.brd:w ai.org.brd:r ai.org.docs:w ai.org.docs:r ai.org:admin\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n  }\n```\nAccess 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.\n\nWe recommend that you cache the access token for 24 hours to avoid repeating this `POST` request while the access token is still valid.\n### Include the access token in the request header\nYou can now start making REST API requests. You must include the access token in the request header of every request. For example:\n\n  ```curl\n  curl -X GET '{YOUR_BASE_URL}/v2/...' \\\n  -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \\\n  -H 'Accept: application/json'\n  ```\n","product":"AI skills"}},"baseSlug":"/ai-skills/ai-document-management-rest-api","routesMapping":{}}